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

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

[elpa] externals/denote 37997e69ef: Fix denote-directory-files filter pr


From: ELPA Syncer
Subject: [elpa] externals/denote 37997e69ef: Fix denote-directory-files filter predicate
Date: Sat, 5 Nov 2022 12:57:30 -0400 (EDT)

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

    Fix denote-directory-files filter predicate
    
    The previous one was omitting all files in subdirectories when the
    test would return nil (such as with the default value of the new
    denote-excluded-directories-regexp).
    
    Thanks to Elias Storms for reporting the regression on the GitHub
    mirror: 
<https://github.com/protesilaos/denote/pull/112#issuecomment-1304568517>.
---
 denote.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index d5874d6046..40c76b0571 100644
--- a/denote.el
+++ b/denote.el
@@ -657,8 +657,11 @@ value, as explained in its doc string."
      directory-files-no-dot-files-regexp
      :include-directories
      (lambda (f)
-       (when-let ((regexp denote-excluded-directories-regexp))
-         (not (string-match-p regexp f))))))))
+       (cond
+        ((when-let ((regexp denote-excluded-directories-regexp))
+           (not (string-match-p regexp f))))
+        ((file-readable-p f))
+        (t)))))))
 
 (defun denote-directory-text-only-files ()
   "Return list of text files in variable `denote-directory'.



reply via email to

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