Function: denote-dired-rename-marked-files-with-keywords
denote-dired-rename-marked-files-with-keywords is an autoloaded,
interactive and byte-compiled function defined in denote.el.
Signature
(denote-dired-rename-marked-files-with-keywords)
Documentation
Rename marked files in Dired to a Denote file name by writing keywords.
Specifically, do the following:
- retain the file's existing name and make it the TITLE field,
per Denote's file-naming scheme;
- sluggify the TITLE, according to our conventions (check the
user option denote-file-name-slug-functions);
- prepend an identifier to the TITLE;
- preserve the file's extension, if any;
- prompt once for KEYWORDS and apply the user's input to the
corresponding field in the file name, rewriting any keywords
that may exist while removing keywords that do exist if
KEYWORDS is empty;
- add or rewrite existing front matter to the underlying file, if it is
recognized as a Denote note (per the user option denote-file-type(var)/denote-file-type(fun)),
such that it includes the new keywords.
Construct the file name in accordance with the user option
denote-file-name-components-order.
Run the denote-after-rename-file-hook after renaming is done.
Also see the specialized commands to only add or remove keywords:
- denote-dired-rename-marked-files-add-keywords.
- denote-dired-rename-marked-files-remove-keywords.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/denote-4.2.3/denote.el
;;;###autoload
(defun denote-dired-rename-marked-files-with-keywords ()
"Rename marked files in Dired to a Denote file name by writing keywords.
Specifically, do the following:
- retain the file's existing name and make it the TITLE field,
per Denote's file-naming scheme;
- sluggify the TITLE, according to our conventions (check the
user option `denote-file-name-slug-functions');
- prepend an identifier to the TITLE;
- preserve the file's extension, if any;
- prompt once for KEYWORDS and apply the user's input to the
corresponding field in the file name, rewriting any keywords
that may exist while removing keywords that do exist if
KEYWORDS is empty;
- add or rewrite existing front matter to the underlying file, if it is
recognized as a Denote note (per the user option `denote-file-type'),
such that it includes the new keywords.
Construct the file name in accordance with the user option
`denote-file-name-components-order'.
Run the `denote-after-rename-file-hook' after renaming is done.
Also see the specialized commands to only add or remove keywords:
- `denote-dired-rename-marked-files-add-keywords'.
- `denote-dired-rename-marked-files-remove-keywords'."
(declare (interactive-only t))
(interactive nil dired-mode)
(denote-dired-rename-marked-files--change-keywords
:replace "Rename marked files with KEYWORDS, overwriting existing (empty to ignore/remove)"))