[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote df3e090edb 1/2: Make denote-find-link work insid
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote df3e090edb 1/2: Make denote-find-link work inside of a silo |
Date: |
Wed, 28 Aug 2024 06:57:46 -0400 (EDT) |
branch: externals/denote
commit df3e090edb8a58f4ef62d773c7dffd959571997e
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make denote-find-link work inside of a silo
Thanks to kolmas for reporting the bug in issue 416:
<https://github.com/protesilaos/denote/issues/416>.
---
denote.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/denote.el b/denote.el
index 7b032d0950..a0f5427e06 100644
--- a/denote.el
+++ b/denote.el
@@ -3953,9 +3953,9 @@ function."
(push (match-string-no-properties 1) matches)))
matches))
-(defun denote-link--expand-identifiers (regexp)
- "Expend identifiers matching REGEXP into file paths."
- (let ((files (denote-directory-files))
+(defun denote-link--expand-identifiers (regexp files)
+ "Expand identifiers matching REGEXP in FILES into file paths."
+ (let ((files files)
found-files)
(dolist (file files)
(dolist (i (denote-link--collect-identifiers regexp))
@@ -3989,10 +3989,11 @@ Also see `denote-link-return-backlinks'."
(when-let ((current-file (or file (buffer-file-name)))
((denote-file-has-supported-extension-p current-file))
(file-type (denote-filetype-heuristics current-file))
- (regexp (denote--link-in-context-regexp file-type)))
+ (regexp (denote--link-in-context-regexp file-type))
+ (files (denote-directory-files)))
(with-temp-buffer
(insert-file-contents current-file)
- (denote-link--expand-identifiers regexp))))
+ (denote-link--expand-identifiers regexp files))))
(defalias 'denote-link-return-forelinks 'denote-link-return-links
"Alias for `denote-link-return-links'.")