[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 171b873cb5 142/355: Require denote-retrieve (0e8
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 171b873cb5 142/355: Require denote-retrieve (0e83bee) in denote-link |
Date: |
Sun, 26 Jun 2022 23:58:15 -0400 (EDT) |
branch: externals/denote
commit 171b873cb57a6d46a6eb7f34dde82f4d7b941cb3
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Require denote-retrieve (0e83bee) in denote-link
This should fix the error reported by Kaushal Modi in issue 12:
<https://github.com/protesilaos/denote/issues/12>.
---
denote-link.el | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/denote-link.el b/denote-link.el
index 75eb13f68d..e20d24244b 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -67,7 +67,7 @@
;;; Code:
-(require 'denote)
+(require 'denote-retrieve)
(defgroup denote-link ()
"Link facility for Denote."
@@ -91,24 +91,6 @@ files."
;;;; Link to note
-(defun denote-link--find-value (regexp)
- "Return value from REGEXP by searching the file."
- (goto-char (point-min))
- (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]+\\(?1:.*\\)"
- "Regular expression for title 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.")
@@ -135,7 +117,7 @@ group 1. `denote-link--find-value' uses the group 1
sting.")
(let ((default-directory (denote-directory)))
(with-temp-buffer
(insert-file-contents-literally note)
- (denote-link--find-value regexp))))
+ (denote-retrieve--find-value regexp))))
(defun denote-link--read-file-prompt ()
"Prompt for regular file in variable `denote-directory'."
@@ -154,9 +136,9 @@ With optional BACKLINK, return a backlink pattern"
"Prepare link to FILE using PATTERN.
With optional BACKLINK, format it as a backlink."
(let* ((dir (denote-directory))
- (file-id (denote-link--retrieve-value file
denote-link--identifier-regexp))
+ (file-id (denote-link--retrieve-value file
denote-retrieve--identifier-regexp))
(file-path (file-name-completion file-id dir))
- (file-title (denote-link--retrieve-value file
denote-link--title-regexp)))
+ (file-title (denote-link--retrieve-value file
denote-retrieve--title-regexp)))
(format pattern file-path file-title file-id)))
;;;###autoload
@@ -209,7 +191,7 @@ PROOF-OF-CONCEPT."
(interactive)
(let* ((default-directory (denote-directory))
(file (file-name-nondirectory (buffer-file-name)))
- (id (denote-link--retrieve-value file denote-link--identifier-regexp))
+ (id (denote-link--retrieve-value file
denote-retrieve--identifier-regexp))
(buf (format "*denote-backlinks to %s*" id)))
(compilation-start
(format "find * -type f -exec %s --color=auto -l -m 1 -e %s- %s %s"
- [elpa] externals/denote 85e33cb523 107/355: Remove needless single quotes, (continued)
- [elpa] externals/denote 85e33cb523 107/355: Remove needless single quotes, ELPA Syncer, 2022/06/26
- [elpa] externals/denote ba7299d878 088/355: Add TODO about styling 'denote-link' command, ELPA Syncer, 2022/06/26
- [elpa] externals/denote f9b86149fc 102/355: Rephrase package overview, ELPA Syncer, 2022/06/26
- [elpa] externals/denote d8b2903fa9 077/355: Acknowledge Jack Baty for commit dfc3a8f, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 142b628c2e 127/355: Apply distinct face to keyword delimiter, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 86e437da43 150/355: Document .dir-locals.el for multi-type notes, ELPA Syncer, 2022/06/27
- [elpa] externals/denote e92137a548 148/355: Use file attribute for mod time while renaming, ELPA Syncer, 2022/06/27
- [elpa] externals/denote c9926a528e 133/355: perf: Stop searching for the title or identifier after the 1st match, ELPA Syncer, 2022/06/27
- [elpa] externals/denote f55dee06b1 143/355: Add documentation about our minibuffer histories, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 97e8c30bcf 153/355: Rewrite the package Overview, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 171b873cb5 142/355: Require denote-retrieve (0e83bee) in denote-link,
ELPA Syncer <=
- [elpa] externals/denote 6a286c97f8 154/355: Rephrase statement for clarity, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 0e83bee5b7 141/355: Add denote-retrieve for internal purposes, ELPA Syncer, 2022/06/27
- [elpa] externals/denote b42f68c8e8 156/355: Add denote-type command, ELPA Syncer, 2022/06/27
- [elpa] externals/denote e841a51ca7 155/355: Fix typo, ELPA Syncer, 2022/06/27
- [elpa] externals/denote bc93a8ecda 137/355: Update the manual on the matter of backlinks, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 45bea4166a 158/355: Update Acknowledgements, ELPA Syncer, 2022/06/27
- [elpa] externals/denote d4cbb974a5 157/355: Rewrite node on multi file types (due to b42f68c), ELPA Syncer, 2022/06/27
- [elpa] externals/denote 479899d973 162/355: Clarify wording about journal/diary extras, ELPA Syncer, 2022/06/27
- [elpa] externals/denote e9bc790675 167/355: Clarify that auto-backlinks may be removed, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 4bc7aa4dfd 166/355: Remove outdated doc string from private function, ELPA Syncer, 2022/06/27