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

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

[elpa] externals/denote add8f657bb 09/27: Merge pull request #25 from gg


From: ELPA Syncer
Subject: [elpa] externals/denote add8f657bb 09/27: Merge pull request #25 from ggjp/subdir-support
Date: Sun, 3 Jul 2022 00:57:34 -0400 (EDT)

branch: externals/denote
commit add8f657bb69f75c60945a13e7d2ed03fc4fc196
Merge: 01618516ff c020d25a21
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #25 from ggjp/subdir-support
    
    Fix denote-link--ol-resolve-link-to-target
---
 denote-link.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/denote-link.el b/denote-link.el
index 9b92a24468..83f6026c5a 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -553,11 +553,12 @@ inserts links with just the identifier."
 With optional PATH-ID return a cons cell consisting of the path
 and the identifier."
   (let* ((search (and (string-match "::\\(.*\\)\\'" link)
-                             (match-string 1 link)))
-            (id (if (and (stringp search) (not (string-empty-p search)))
+                      (match-string 1 link)))
+         (id (if (and (stringp search) (not (string-empty-p search)))
                  (substring link 0 (match-beginning 0))
                link))
-         (path (expand-file-name (file-name-completion id 
(denote-directory)))))
+         (path (cl-find-if (lambda (f) (string-prefix-p id 
(file-name-nondirectory f)))
+                           (denote--directory-files :absolute))))
     (cond
      (path-id
       (cons (format "%s" path) (format "%s" id)))



reply via email to

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