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

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

[elpa] externals/denote a3cc59acfe 4/4: Make denote-link-find-file find


From: ELPA Syncer
Subject: [elpa] externals/denote a3cc59acfe 4/4: Make denote-link-find-file find file reliably
Date: Mon, 5 Sep 2022 07:57:34 -0400 (EDT)

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

    Make denote-link-find-file find file reliably
    
    The current code works even if the link is stored in a file outside the
    'denote-directory'.  It works for as long as the target file is in the
    'denote-directory'.
    
    I discovered this problem while exchanging views with Marc Fargas
    regarding commit dd086b7:
    <https://lists.sr.ht/~protesilaos/denote/patches/35137>.
---
 denote.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 1b43801a6e..eaf8222974 100644
--- a/denote.el
+++ b/denote.el
@@ -2058,7 +2058,10 @@ format is always [[denote:IDENTIFIER]]."
   (interactive)
   (if-let* ((regexp (denote-link--file-type-regexp (buffer-file-name)))
             (files (denote-link--expand-identifiers regexp)))
-      (find-file (denote-link--find-file-prompt files))
+      (find-file ; TODO 2022-09-05: Revise for possible refinement
+       (denote--get-note-path-by-id
+        (denote-link--id-from-string
+         (denote-link--find-file-prompt files))))
     (user-error "No links found in the current buffer")))
 
 ;;;;; Link buttons



reply via email to

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