emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 348b7290a9 1/3: Ignore notes in batch rename (WI


From: ELPA Syncer
Subject: [elpa] externals/denote 348b7290a9 1/3: Ignore notes in batch rename (WIP)
Date: Sat, 16 Jul 2022 12:57:27 -0400 (EDT)

branch: externals/denote
commit 348b7290a9316b15848aee1c6bd200421691eafc
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    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")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]