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

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

[elpa] externals/denote-menu f901a2dba5 08/15: fix denote get path by id


From: ELPA Syncer
Subject: [elpa] externals/denote-menu f901a2dba5 08/15: fix denote get path by id
Date: Thu, 9 Mar 2023 11:00:07 -0500 (EST)

branch: externals/denote-menu
commit f901a2dba52cc1c764a670411bbf605426ac4039
Author: Mohamed Suliman <sulimanm@tcd.ie>
Commit: Mohamed Suliman <sulimanm@tcd.ie>

    fix denote get path by id
---
 denote-menu.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/denote-menu.el b/denote-menu.el
index 2b25769cce..21326d3384 100644
--- a/denote-menu.el
+++ b/denote-menu.el
@@ -111,9 +111,17 @@ list entry following the defined form. Then updates the 
buffer."
  presented in the *Denote* buffer."
   (mapcar (lambda (entry)
             (let ((id (car entry)))
-              (denote-get-path-by-id id)))
+              (denote-menu-get-path-by-id id)))
           (funcall tabulated-list-entries)))
 
+(defun denote-menu-get-path-by-id (id)
+  "Return absolute path of ID string in `denote-directory-files'."
+  (seq-find
+   (lambda (f)
+     (and (string-prefix-p id (file-name-nondirectory f))))
+   (denote-directory-files)))
+
+
 (defun denote-menu-files-matching-regexp (files regexp)
   "Return list of files matching REGEXP from FILES."
   (seq-filter (lambda (f) (string-match-p regexp f)) files))



reply via email to

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