branch: externals/denote
commit 7cc62eb5fb6b10da82696eceb7452bd8c3d235ca
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Make denote--directory-all-files-recursively accept DIRECTORIES and add 
FIXME about it
---
 denote.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index da8f89ac7e..cbc1a86d0f 100644
--- a/denote.el
+++ b/denote.el
@@ -1349,8 +1349,11 @@ Return t if FILE is valid, else return nil."
      ((denote--exclude-directory-regexp-p rel) nil)
      ((file-readable-p file)))))
 
-(defun denote--directory-all-files-recursively ()
-  "Return list of all files in variable `denote-directory'.
+;; FIXME 2025-12-14: The parameter should not be optional.  I am doing
+;; it like this for now because there are places where the function is
+;; called without an argument.
+(defun denote--directory-all-files-recursively (&optional directories)
+  "Return list of all files in DIRECTORIES or `denote-directories'.
 Avoids traversing dotfiles (unconditionally) and whatever matches
 `denote-excluded-directories-regexp'."
   (apply #'append
@@ -1362,7 +1365,7 @@ Avoids traversing dotfiles (unconditionally) and whatever 
matches
              :include-directories
              #'denote--directory-files-recursively-predicate
              :follow-symlinks))
-          (denote-directories))))
+          (or directories (denote-directories)))))
 
 (defun denote--file-excluded-p (file)
   "Return non-file if FILE matches `denote-excluded-files-regexp'."

Reply via email to