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

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

[elpa] externals/denote 67bef2d964 1/3: Move code to denote-rename-file


From: ELPA Syncer
Subject: [elpa] externals/denote 67bef2d964 1/3: Move code to denote-rename-file
Date: Mon, 11 Nov 2024 03:57:51 -0500 (EST)

branch: externals/denote
commit 67bef2d96468cbae066faeb3c259f391499b6384
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>

    Move code to denote-rename-file
---
 denote.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/denote.el b/denote.el
index 0f66779c0f..c151dd72dd 100644
--- a/denote.el
+++ b/denote.el
@@ -3118,6 +3118,12 @@ Respect `denote-rename-confirmations', 
`denote-save-buffers' and
          (keywords (denote-keywords-sort keywords))
          (directory (file-name-directory file))
          (extension (file-name-extension file :include-period))
+         ;; Handle nil date
+         (date (cond (date date)
+                     ((or (eq denote-generate-identifier-automatically t)
+                          (eq denote-generate-identifier-automatically 
'on-rename))
+                      (or (file-attribute-modification-time (file-attributes 
file))
+                          (current-time)))))
          (old-id (or (denote-retrieve-filename-identifier file) ""))
          (id (denote-get-identifier date))
          (id (if (or (string-empty-p id) (string= old-id id))
@@ -3179,11 +3185,6 @@ renaming commands."
          ;; condition).
          (unless (denote-file-has-identifier-p file)
            (setq date (denote-valid-date-p (denote-date-prompt)))))))
-    (when (and (null date)
-               (or (eq denote-generate-identifier-automatically t)
-                   (eq denote-generate-identifier-automatically 'on-rename)))
-      (setq date (or (file-attribute-modification-time (file-attributes file))
-                     (current-time))))
     (list title keywords signature date)))
 
 ;;;###autoload



reply via email to

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