Skip to content

Renaming files interface for developers or advanced users

Variable denote-rename-rewrite-front-matter

When non-nil, rewrite the front matter if appropriate. The purpose of this variable is to be let bound to nil by a caller of the command denote-rename-file or related. This will have the effect of not rewriting the file’s front matter.

Function denote-rename-file-prompt

Prompt to rename file named ‘OLD-NAME’ to ‘NEW-NAME’. If denote-rename-confirmations does not contain modify-file-name, return t without prompting.

Function denote-rename-file-and-buffer

Rename file named ‘OLD-NAME’ to ‘NEW-NAME’, updating buffer name.

Function denote-prepend-front-matter

Prepend front matter to ‘FILE’. The ‘TITLE’, ‘KEYWORDS’, ‘DATE’, ‘ID’, ‘SIGNATURE’, and ‘FILE-TYPE’ are passed from the renaming command and are used to construct a new front matter block if appropriate.

Function denote-rewrite-front-matter

Rewrite front matter of note after denote-rename-file (or related). The ‘FILE’, ‘TITLE’, ‘KEYWORDS’, ‘SIGNATURE’, ‘DATE’, ‘IDENTIFIER’, and ‘FILE-TYPE’ arguments are given by the renaming command and are used to construct new front matter values if appropriate. If denote-rename-confirmations contains rewrite-front-matter, prompt to confirm the rewriting of the front matter. Otherwise produce a y-or-n-p prompt to that effect.

Function denote-add-front-matter-prompt

Prompt to add a front-matter to ‘FILE’. Return non-nil if a new front matter should be added. If denote-rename-confirmations does not contain add-front-matter, return t without prompting.

Function denote-rewrite-keywords

Rewrite ‘KEYWORDS’ in ‘FILE’ outright according to ‘FILE-TYPE’. Do the same as denote-rewrite-front-matter for keywords, but do not ask for confirmation. With optional ‘SAVE-BUFFER’, save the buffer corresponding to ‘FILE’. This function is for use in the commands denote-keywords-add, denote-keywords-remove, denote-dired-rename-files, or related.

Function denote-update-dired-buffers

Update Dired buffers of variable denote-directory. Also revert the current Dired buffer even if it is not inside the denote-directory. Note that the denote-directory accepts a directory-local value for what we internally refer to as “silos” (Maintain separate directories for notes).