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

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

[elpa] externals/denote 02a1645f95 21/33: Tweak the behaviour of denote-


From: ELPA Syncer
Subject: [elpa] externals/denote 02a1645f95 21/33: Tweak the behaviour of denote-create-unique-file-identifier
Date: Wed, 14 Feb 2024 06:57:48 -0500 (EST)

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

    Tweak the behaviour of denote-create-unique-file-identifier
---
 denote.el | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/denote.el b/denote.el
index 8dec4e4304..9752c8aaa0 100644
--- a/denote.el
+++ b/denote.el
@@ -1544,8 +1544,9 @@ current time."
 
 The conditions are as follows:
 
-- If optional DATE conforms with `denote-valid-date-p', use it
-  as-is to get an identifier from it with `denote-get-identifier'.
+- If optional DATE is non-nil pass it to `denote-get-identifier'.
+  DATE will have to conform with `denote-valid-date-p'.  If it
+  does not, return an error.
 
 - If optional DATE is nil, use the file attributes to determine
   the last modified date and format it as an identifier.
@@ -1554,18 +1555,10 @@ The conditions are as follows:
 
 To only return an existing identifier, refer to the function
 `denote-retrieve-filename-identifier'."
-  ;; TODO 2024-02-11: Maybe we can use `denote-parse-date' here to
-  ;; simplify this?
   (let ((id (cond
-             ((denote-valid-date-p date) (denote-get-identifier date))
-             ;; FIXME 2024-02-11: Under which condition do we want
-             ;; this to happen?  I am using this is not needed, but
-             ;; keeping it here while we are still developing the new
-             ;; version 3.0.0.
-             ;;
-             ;; (date (denote-prompt-for-date-return-id))
-             ((denote--file-attributes-time file))
-             (t (denote-get-identifier)))))
+              (date (denote-get-identifier date))
+              ((denote--file-attributes-time file))
+              (t (denote-get-identifier)))))
     (denote--find-first-unused-id id used-ids)))
 
 (define-obsolete-function-alias



reply via email to

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