branch: externals/denote commit e6656d4fc2ca14010324c4f91ef2d0bf11bd001e Author: Jean-Philippe Gagné Guay <jeanphilippe...@gmail.com> Commit: Jean-Philippe Gagné Guay <jeanphilippe...@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)))