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

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

[elpa] externals/denote e6656d4fc2 04/10: Make it possible to change the


From: ELPA Syncer
Subject: [elpa] externals/denote e6656d4fc2 04/10: Make it possible to change the date/id of a note
Date: Mon, 18 Nov 2024 03:57:59 -0500 (EST)

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

    Make it possible to change the date/id of a note
---
 denote.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/denote.el b/denote.el
index 35421add56..b65d495f69 100644
--- a/denote.el
+++ b/denote.el
@@ -3377,12 +3377,9 @@ renaming commands."
                           signature
                           (format "Rename `%s' with SIGNATURE (empty to 
remove)" file-in-prompt))))
         ('date
-         ;; TODO: We currently prompt only if the current file has no
-         ;; identifier. Eventually, we may want to allow modifying the
-         ;; date/id. Then, it will be better to prompt according to
-         ;; `denote-prompts`, like other components (ie remove this
-         ;; condition).
-         (unless (denote-file-has-identifier-p file)
+         (if (and (denote-file-has-identifier-p file)
+                  (denote--file-has-backlinks-p file))
+             (user-error "The date cannot be modified because the file has 
backlinks")
            (setq date (denote-valid-date-p (denote-date-prompt)))))))
     (list title keywords signature date)))
 



reply via email to

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