File path interface for developers or advanced users
Function denote-file-name-relative-to-denote-directory
Return name of ‘FILE’ relative to the variable denote-directory. ‘FILE’ must be an absolute path.
Function denote-slug-keep-only-ascii
Remove all non-ASCII characters from ‘STR’ and replace them with spaces. This is useful as a helper function to construct denote-file-name-slug-functions (Custom sluggification to remove non-ASCII characters).
Function denote-sluggify-and-apply-rules (alias denote-sluggify)
Make ‘STR’ an appropriate slug for file name ‘COMPONENT’ (Sluggification of file name components). Apply the function specified in denote-file-name-slug-function to ‘COMPONENT’ which is one of ‘title’, ‘signature’, ‘keyword’. If the resulting string still contains consecutive ‘-’,=_= or =, they are replaced by a single occurence of the character, if necessary according to ‘COMPONENT’. If ‘COMPONENT’ is keyword, remove underscores from ‘STR’ as they are used as the keywords separator in file names. Also enforce the rules of the file-naming scheme.
Function denote-sluggify-keyword
Sluggify ‘STR’ while joining separate words.
Function denote-sluggify-signature
Make ‘STR’ an appropriate slug for signatures (Sluggification of file name components).
Function denote-sluggify-keywords-and-apply-rules
Sluggify ‘KEYWORDS’, which is a list of strings (Sluggification of file name components).
Function denote-format-file-name
Format file name. ‘DIR-PATH’, ‘ID’, ‘KEYWORDS’, ‘TITLE’, ‘EXTENSION’ and ‘SIGNATURE’ are expected to be supplied by denote or equivalent command.
‘DIR-PATH’ is a string pointing to a directory. It ends with a forward slash (the function denote-directory makes sure this is the case when returning the value of the variable denote-directory). ‘DIR-PATH’ cannot be nil or an empty string.
‘ID’ is a string holding the identifier of the note. It can be an empty string, in which case its respective file name component is not added to the base file name.
‘DIR-PATH’ and ‘ID’ form the base file name.
‘KEYWORDS’ is a list of strings that is reduced to a single string by denote-keywords-combine. ‘KEYWORDS’ can be an empty list or a nil value, in which case the relevant file name component is not added to the base file name.
‘TITLE’ and ‘SIGNATURE’ are strings. They can be an empty string, in which case their respective file name component is not added to the base file name.
‘EXTENSION’ is a string that contains a dot followed by the file type extension. It can be an empty string or a nil value, in which case it is not added to the base file name.