branch: externals/denote
commit 348b7290a9316b15848aee1c6bd200421691eafc
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Ignore notes in batch rename (WIP)
---
denote-dired.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/denote-dired.el b/denote-dired.el
index 1c34e49dca..fb009a2430 100644
--- a/denote-dired.el
+++ b/denote-dired.el
@@ -433,7 +433,10 @@ Rename marked files in Dired using the following pattern:
- the file's extension is retained;
- a prompt is asked once for the KEYWORDS field and the input is
- applied to all files."
+ applied to all files.
+
+Batch renaming ignores files that comply with Denote's
+file-naming scheme."
(interactive (list (denote--keywords-prompt)) dired-mode)
(if-let ((marks (dired-get-marked-files)))
(progn
@@ -447,7 +450,8 @@ Rename marked files in Dired using the following pattern:
keywords
(denote--sluggify title)
extension)))
- (rename-file (file-name-nondirectory file) new-name)))
+ (unless (denote--only-note-p file)
+ (rename-file (file-name-nondirectory file) new-name))))
(revert-buffer))
(user-error "No marked files; aborting")))