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

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

[elpa] externals/denote c925928795 04/11: Refactor denote--directory-fil


From: ELPA Syncer
Subject: [elpa] externals/denote c925928795 04/11: Refactor denote--directory-files-matching-regexp
Date: Mon, 8 Aug 2022 23:57:31 -0400 (EDT)

branch: externals/denote
commit c9259287957c42973e9194337bf05e0f3f07447f
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>

    Refactor denote--directory-files-matching-regexp
---
 denote.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index 98fb9ebd0e..6e8b7552f0 100644
--- a/denote.el
+++ b/denote.el
@@ -482,13 +482,14 @@ names that are relative to the variable 
`denote-directory'."
    (denote--directory-files :absolute)))
 
 (defun denote--directory-files-matching-regexp (regexp)
-  "Return list of files matching REGEXP."
+  "Return list of files matching REGEXP.
+The match is performed against the file name relative to the
+variable `denote-directory'."
   (seq-filter
    (lambda (f)
      (and (denote--only-note-p f)
-          (string-match-p regexp f)
-          (not (string= (file-name-nondirectory (buffer-file-name)) f))))
-   (denote--directory-files)))
+          (string-match-p regexp 
(denote--file-name-relative-to-denote-directory f))))
+   (denote--directory-files :absolute)))
 
 ;;;; Keywords
 



reply via email to

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