From 282725fe5541480bdd6d78b33c56e29dd5af5691 Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Thu, 28 Jan 2021 09:11:43 +0100 Subject: [PATCH] (fix): dailies: prevent inclusion of non-org-roam files Fixes #1398 --- org-roam-dailies.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org-roam-dailies.el b/org-roam-dailies.el index cfc1e8b835..76b9638e4c 100644 --- a/org-roam-dailies.el +++ b/org-roam-dailies.el @@ -277,13 +277,14 @@ Prefer past dates, unless PREFER-FUTURE is non-nil." (defun org-roam-dailies--list-files (&rest extra-files) "List all files in `org-roam-dailies-directory'. EXTRA-FILES can be used to append extra files to the list." - (let ((dir (org-roam-dailies-directory--get-absolute-path))) + (let ((dir (org-roam-dailies-directory--get-absolute-path)) + (regexp (rx "." (eval `(or ,@org-roam-file-extensions))))) (append (--remove (let ((file (file-name-nondirectory it))) (when (or (auto-save-file-name-p file) (backup-file-name-p file) (string-match "^\\." file)) it)) - (directory-files-recursively dir "")) + (directory-files-recursively dir regexp)) extra-files))) (defun org-roam-dailies-find-next-note (&optional n)