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

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

[elpa] externals/denote fc9f909061 179/355: Change denote--id to denote-


From: ELPA Syncer
Subject: [elpa] externals/denote fc9f909061 179/355: Change denote--id to denote--id-format
Date: Sun, 26 Jun 2022 23:58:21 -0400 (EDT)

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

    Change denote--id to denote--id-format
    
    It is important for clarity, otherwise I keep getting confused.
---
 denote-dired.el | 4 ++--
 denote.el       | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/denote-dired.el b/denote-dired.el
index cee702cff7..b9ef8f766f 100644
--- a/denote-dired.el
+++ b/denote-dired.el
@@ -90,7 +90,7 @@ old name followed by the new one."
 (defun denote-dired--file-attributes-time (file)
   "Return `file-attribute-modification-time' of FILE as identifier."
   (format-time-string
-   denote--id
+   denote--id-format
    (file-attribute-modification-time (file-attributes file))))
 
 (defun denote-dired--file-name-id (file)
@@ -99,7 +99,7 @@ old name followed by the new one."
    ((string-match denote--id-regexp file)
     (substring file (match-beginning 0) (match-end 0)))
    ((denote-dired--file-attributes-time file))
-   (t (format-time-string denote--id))))
+   (t (format-time-string denote--id-format))))
 
 ;;;###autoload
 (defun denote-dired-rename-file (file title keywords)
diff --git a/denote.el b/denote.el
index b808d19b53..2db4192fb9 100644
--- a/denote.el
+++ b/denote.el
@@ -195,11 +195,11 @@ is suspended: we use whatever the user wants."
 
 ;;;; Main variables
 
-(defconst denote--id "%Y%m%dT%H%M%S"
+(defconst denote--id-format "%Y%m%dT%H%M%S"
   "Format of ID prefix of a note's filename.")
 
 (defconst denote--id-regexp "\\([0-9]\\{8\\}\\)\\(T[0-9]\\{6\\}\\)"
-  "Regular expression to match `denote--id'.")
+  "Regular expression to match `denote--id-format'.")
 
 (defconst denote--file-title-regexp
   (concat denote--id-regexp "\\(--\\)\\(.*\\)\\(__\\)")
@@ -491,7 +491,7 @@ With optional ID, use it else format the current time."
   (setq denote-last-path
         (denote--format-file
          (or dir (file-name-as-directory denote-directory))
-         (or id (format-time-string denote--id))
+         (or id (format-time-string denote--id-format))
          (denote--sluggify-keywords keywords)
          (denote--sluggify title)
          (denote--file-extension))))
@@ -533,7 +533,7 @@ Use optional PATH, else create it with `denote--path'."
          (buffer (unless path (find-file p)))
          (header (denote--file-meta-header
                   title (denote--date) keywords
-                  (format-time-string denote--id))))
+                  (format-time-string denote--id-format))))
     (unless path
       (with-current-buffer buffer (insert header))
       (setq denote-last-buffer buffer))



reply via email to

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