Variable: denote-file-name-slug-functions
denote-file-name-slug-functions is a customizable variable defined in
denote.el.
Value
((identifier . identity)
(title . denote-sluggify-title)
(signature . denote-sluggify-signature)
(keyword . denote-sluggify-keyword))
Documentation
Specify the method Denote uses to format the components of the file name.
The value is an alist where each element is a cons cell of the form (COMPONENT . METHOD).
- The COMPONENT is an unquoted symbol among identifier, title,
signature, keyword (notice the absence of s, see below),
which refers to the corresponding component of the file name.
- The METHOD is the function to be used to format the given
component. This function should take a string as its parameter
and return the string formatted for the file name. In the case
of the keyword component, the function receives a SINGLE
string representing a single keyword and return it formatted
for the file name. Joining the keywords together is handled by
Denote.
Note that the keyword function is also applied to the keywords
of the front matter.
By default, if a function is not specified for a component, we use
identity, denote-sluggify-title, denote-sluggify-keyword and
denote-sluggify-signature.
Remember that deviating from the default file-naming scheme of Denote will make things harder to search in the future, as files can/will have permutations that create uncertainty. The sluggification scheme and concomitant restrictions we impose by default are there for a very good reason: they are the distillation of years of experience. Here we give you what you wish, but bear in mind it may not be what you need. You have been warned.
This variable was added, or its default value changed, in denote version 2.3.0.
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
(defcustom denote-file-name-slug-functions
'((identifier . identity)
(title . denote-sluggify-title)
(signature . denote-sluggify-signature)
(keyword . denote-sluggify-keyword))
"Specify the method Denote uses to format the components of the file name.
The value is an alist where each element is a cons cell of the
form (COMPONENT . METHOD).
- The COMPONENT is an unquoted symbol among `identifier', `title',
`signature', `keyword' (notice the absence of `s', see below),
which refers to the corresponding component of the file name.
- The METHOD is the function to be used to format the given
component. This function should take a string as its parameter
and return the string formatted for the file name. In the case
of the `keyword' component, the function receives a SINGLE
string representing a single keyword and return it formatted
for the file name. Joining the keywords together is handled by
Denote.
Note that the `keyword' function is also applied to the keywords
of the front matter.
By default, if a function is not specified for a component, we use
`identity', `denote-sluggify-title', `denote-sluggify-keyword' and
`denote-sluggify-signature'.
Remember that deviating from the default file-naming scheme of Denote
will make things harder to search in the future, as files can/will have
permutations that create uncertainty. The sluggification scheme and
concomitant restrictions we impose by default are there for a very good
reason: they are the distillation of years of experience. Here we give
you what you wish, but bear in mind it may not be what you need. You
have been warned."
:group 'denote
:package-version '(denote . "2.3.0")
:link '(info-link "(denote) User-defined sluggification of file name components")
:type '(alist :key (choice (const title)
(const signature)
(const keyword))
:value function))