branch: externals/denote commit 37997e69efc915c0b8760a892910590af9c00d86 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@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'.