[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote c7ac9752fb 1/8: Make denote--id-to-date more str
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote c7ac9752fb 1/8: Make denote--id-to-date more strict about the identifier |
Date: |
Sun, 1 Sep 2024 03:57:52 -0400 (EDT) |
branch: externals/denote
commit c7ac9752fbd2113cb6163cada3879073da78476c
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote--id-to-date more strict about the identifier
---
denote.el | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/denote.el b/denote.el
index b486c6d75d..3b2a70db9f 100644
--- a/denote.el
+++ b/denote.el
@@ -2058,10 +2058,12 @@ If either that or DATE is nil or an empty string, return
(defun denote--id-to-date (identifier)
"Convert IDENTIFIER string to YYYY-MM-DD."
- (replace-regexp-in-string
- "\\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)\\([0-9]\\{2\\}\\).*"
- "\\1-\\2-\\3"
- identifier))
+ (if (string-match-p (format "\\`%s\\'" denote-id-regexp) identifier)
+ (replace-regexp-in-string
+ "\\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)\\([0-9]\\{2\\}\\).*"
+ "\\1-\\2-\\3"
+ identifier)
+ (error "`%s' does not look like a Denote identifier per
`denote-id-regexp'" identifier)))
(defun denote--buffer-file-names ()
"Return file names of Denote buffers."
- [elpa] externals/denote updated (3ae863f108 -> 4eaa943f1b), ELPA Syncer, 2024/09/01
- [elpa] externals/denote addff3d4d7 3/8: Write tests for denote-identifier-p and denote--id-to-date, ELPA Syncer, 2024/09/01
- [elpa] externals/denote 87a9e5e731 4/8: Fix typo in a comment, ELPA Syncer, 2024/09/01
- [elpa] externals/denote fb375dc623 7/8: Make denote-org-extras--get-backlinks-for-heading check all prerequisites, ELPA Syncer, 2024/09/01
- [elpa] externals/denote c7ac9752fb 1/8: Make denote--id-to-date more strict about the identifier,
ELPA Syncer <=
- [elpa] externals/denote 7524aa2de8 2/8: Define denote-identifier-p function, ELPA Syncer, 2024/09/01
- [elpa] externals/denote c66521caeb 5/8: Add missing year range to denote-test.el copyright header, ELPA Syncer, 2024/09/01
- [elpa] externals/denote 839d68e8a1 6/8: Update all the header information of denote-test.el, ELPA Syncer, 2024/09/01
- [elpa] externals/denote 4eaa943f1b 8/8: Make denote-org-extras--get-backlinks-buffer-name use xrefs with absolute path, ELPA Syncer, 2024/09/01