From 8818f50f41db91adaf9a20c0d9047bfcf1fce892 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Tue, 26 May 2020 13:46:08 +0800 Subject: [PATCH] (fix): fix symlinked directories and files not picked up (#700) The implementations for org-roam--list-files-{find,rg} did not follow symlinks, which cause them to not pick up symlinked files and directories. --- org-roam.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org-roam.el b/org-roam.el index 424bfdb..cd06f58 100644 --- a/org-roam.el +++ b/org-roam.el @@ -318,14 +318,14 @@ E.g. (\".org\") => (\"*.org\" \"*.org.gpg\")" (defun org-roam--list-files-rg (executable dir) "Return all Org-roam files located recursively within DIR, using ripgrep, provided as EXECUTABLE." (let* ((globs (org-roam--list-files-search-globs org-roam-file-extensions)) - (command (s-join " " `(,executable ,dir "--files" + (command (s-join " " `(,executable "-L" ,dir "--files" ,@(mapcar (lambda (glob) (concat "-g " glob)) globs))))) (org-roam--shell-command-files command))) (defun org-roam--list-files-find (executable dir) "Return all Org-roam files located recursively within DIR, using find, provided as EXECUTABLE." (let* ((globs (org-roam--list-files-search-globs org-roam-file-extensions)) - (command (s-join " " `(,executable ,dir "-type f \\(" + (command (s-join " " `(,executable "-L" ,dir "-type f \\(" ,(s-join " -o " (mapcar (lambda (glob) (concat "-name " glob)) globs)) "\\)")))) (org-roam--shell-command-files command)))