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

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

[elpa] externals/denote 8f8026bf56 11/17: Change denote and denote-org-c


From: ELPA Syncer
Subject: [elpa] externals/denote 8f8026bf56 11/17: Change denote and denote-org-capture to make them ready to handle empty identifiers
Date: Sun, 10 Nov 2024 00:57:52 -0500 (EST)

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

    Change denote and denote-org-capture to make them ready to handle empty 
identifiers
---
 denote.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index 2d65e1761a..3f8092b670 100644
--- a/denote.el
+++ b/denote.el
@@ -2539,7 +2539,8 @@ When called from Lisp, all arguments are optional.
                ;; will not completely work (fontification, linking, etc.).
                ;; They need to be reviewed before making this available.
                (date (or date (current-time)))
-               (id (denote--find-first-unused-id (denote-get-identifier date)))
+               (id (denote-get-identifier date))
+               (id (if (string-empty-p id) id (denote--find-first-unused-id 
id)))
                (note-path (denote--prepare-note title keywords date id 
directory file-type template signature)))
     (denote--keywords-add-to-history keywords)
     (run-hooks 'denote-after-new-note-hook)
@@ -5163,7 +5164,9 @@ Consult the manual for template samples."
                 (denote--creation-get-note-data-from-prompts))
                (`(,title ,keywords _ ,directory ,date ,template ,signature)
                 (denote--creation-prepare-note-data title keywords 'org 
directory date template signature))
-               (id (denote--find-first-unused-id (denote-get-identifier date)))
+               (date (or date (current-time)))  ; See comment in `denote' 
command.
+               (id (denote-get-identifier date))
+               (id (if (string-empty-p id) id (denote--find-first-unused-id 
id)))
                (front-matter (denote--format-front-matter title date keywords 
id signature 'org))
                (template-string (cond ((stringp template) template)
                                       ((functionp template) (funcall template))



reply via email to

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