branch: externals/denote commit 5195f13f559d081391cc6b14e84adcc2c72de8a7 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Add optional absolute for denote--directory-files There is currently no use for it, but I am aware at least of one function we might use in the future which requires absolute paths. --- denote.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/denote.el b/denote.el index 65120ac5e2..ec81e94c93 100644 --- a/denote.el +++ b/denote.el @@ -303,14 +303,16 @@ With optional N, search in the Nth line from point." ;;;; Keywords -(defun denote--directory-files () - "List note files, assuming flat directory." +(defun denote--directory-files (&optional absolute) + "List note files, assuming flat directory. +If optional ABSOLUTE, show full paths, else only show base file +names that are relative to the variable `denote-directory'." (let* ((dir (denote-directory)) (default-directory dir)) (seq-remove (lambda (file) (file-directory-p file)) - (directory-files dir nil directory-files-no-dot-files-regexp t)))) + (directory-files dir absolute directory-files-no-dot-files-regexp t)))) (defun denote--directory-files-matching-regexp (regexp) "Return list of files matching REGEXP."