[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 79fbe2493b 135/355: Merge pull request #11 from
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 79fbe2493b 135/355: Merge pull request #11 from kaushalmodi/update-identifier-regexp |
Date: |
Sun, 26 Jun 2022 23:58:14 -0400 (EDT) |
branch: externals/denote
commit 79fbe2493b6a318cfdb1f5dd8597d760ec713498
Merge: e394057985 c9926a528e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: GitHub <noreply@github.com>
Merge pull request #11 from kaushalmodi/update-identifier-regexp
Identifier regexp improvements (support TOML and Org ID)
---
denote-link.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/denote-link.el b/denote-link.el
index 2d3d95fc69..75eb13f68d 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -94,14 +94,20 @@ files."
(defun denote-link--find-value (regexp)
"Return value from REGEXP by searching the file."
(goto-char (point-min))
- (re-search-forward regexp)
- (match-string-no-properties 3))
+ (re-search-forward regexp nil nil 1) ;Stop search after the first match
+ (match-string-no-properties 1))
-(defconst denote-link--title-regexp "^\\(#\\+\\)?\\(title:\\)[\s\t]+\\(.*\\)"
- "Regular expression for title key and value.")
+(defconst denote-link--title-regexp
"^\\(?:#\\+\\)?\\(?:title:\\)[\s\t]+\\(?1:.*\\)"
+ "Regular expression for title key and value.
-(defconst denote-link--identifier-regexp
"^\\(#\\+\\)?\\(identifier:\\)[\s\t]+\\(.*\\)"
- "Regular expression for filename key and value.")
+The match that needs to be extracted is explicityly marked as
+group 1. `denote-link--find-value' uses the group 1 sting.")
+
+(defconst denote-link--identifier-regexp
"^.?.?\\b\\(?:identifier\\|ID\\)\\s-*[:=]\\s-*\"?\\(?1:[0-9T]+\\)"
+ "Regular expression for filename key and value.
+
+The match that needs to be extracted is explicityly marked as
+group 1. `denote-link--find-value' uses the group 1 sting.")
(defconst denote-link--link-format-org "[[file:%s][%s (%s)]]"
"Format of Org link to note.")
- [elpa] externals/denote b25235e93e 331/355: Add header links to the mailing list, (continued)
- [elpa] externals/denote b25235e93e 331/355: Add header links to the mailing list, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 26069e8612 029/355: Add todo about alternative to seq-remove, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 418a21dccb 052/355: Tweak file and defgroup descriptions, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 20a915672e 056/355: Remove interactive-only from 'denote', ELPA Syncer, 2022/06/27
- [elpa] externals/denote 0519be74a9 121/355: Add PROOF-OF-CONCEPT denote-link-backlinks, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a107fbf5d7 120/355: Make minor tweaks in the manual, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 254a6cd0f3 112/355: Update date function; enforce RFC3339 when needed, ELPA Syncer, 2022/06/27
- [elpa] externals/denote f1f9f757ef 109/355: Include markdown-toml sample in the manual, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 24371b4c86 129/355: fix: Update the identifier regexp to recognize TOML identifier too, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 0cb5c9f06e 122/355: Simplify attribution comment to ox-hugo, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 79fbe2493b 135/355: Merge pull request #11 from kaushalmodi/update-identifier-regexp,
ELPA Syncer <=
- [elpa] externals/denote 808a2c29f9 140/355: Acknowledge Peter Povinec for file-naming refinements, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 083b3bfc89 144/355: Use better example for file renaming, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 561553db8e 132/355: fix: Use the correct match subgroup in `denote-link--find-value`, ELPA Syncer, 2022/06/27
- [elpa] externals/denote e1c18f5f57 136/355: Remove potentially bad advice from the manual, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 7b719e6274 152/355: Add user option to disable multi-word keywords, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 25fa79e8d9 146/355: Refine denote-retrieve internals, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 0165b00ddb 145/355: Use only denote-retrieve functions in denote-link, ELPA Syncer, 2022/06/27
- [elpa] externals/denote f57e9c5c9f 165/355: Change internal variable symbols for consistency, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 8565d36e7d 161/355: Add note in the manual about journal/diary, ELPA Syncer, 2022/06/27
- [elpa] externals/denote be58aec5db 163/355: Include journal sample that prompts for TITLE, ELPA Syncer, 2022/06/27