Function: denote-dired-rename-marked-files-using-front-matter
denote-dired-rename-marked-files-using-front-matter is an interactive
and natively compiled function defined in denote.el.
Signature
(denote-dired-rename-marked-files-using-front-matter)
Documentation
Call denote-rename-file-using-front-matter over the Dired marked files.
Refer to the documentation of that command for the technicalities.
Marked files must count as notes for the purposes of Denote, which means
that they at least have an identifier in their file name and use a
supported file type, per the user option denote-file-type(var)/denote-file-type(fun). Files that
do not meet this criterion are ignored because Denote cannot know if
they have front matter and what that may be.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/yld6spsps5sfn9w4rjyhkvqlvdgsmvpq-emacs-packages-deps/share/emacs/site-lisp/elpa/denote-4.2.3/denote.el
;;;###autoload
(defun denote-dired-rename-marked-files-using-front-matter ()
"Call `denote-rename-file-using-front-matter' over the Dired marked files.
Refer to the documentation of that command for the technicalities.
Marked files must count as notes for the purposes of Denote, which means
that they at least have an identifier in their file name and use a
supported file type, per the user option `denote-file-type'. Files that
do not meet this criterion are ignored because Denote cannot know if
they have front matter and what that may be."
(interactive nil dired-mode)
(if-let* ((marks (seq-filter
(lambda (m)
(and (file-regular-p m)
(denote-file-is-writable-and-supported-p m)
(denote-file-has-identifier-p m)))
(dired-get-marked-files))))
(let ((denote-used-identifiers (denote--get-all-used-ids)))
(dolist (file marks)
(denote-rename-file-using-front-matter file))
(denote-update-dired-buffers))
(user-error "No marked Denote files; aborting")))