emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/xeft 24ddfefc30 2/2: Allow following symlinks when recu


From: ELPA Syncer
Subject: [elpa] externals/xeft 24ddfefc30 2/2: Allow following symlinks when recursively listing files (issue#6)
Date: Tue, 21 Mar 2023 17:59:43 -0400 (EDT)

branch: externals/xeft
commit 24ddfefc307037a0dc418c9bc3d80cc1e0b450f9
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Allow following symlinks when recursively listing files (issue#6)
    
    * xeft.el (xeft-recursive): Add a new possible value
    'follow-symlinks'.
    (xeft--file-list): Follow symlinks if xeft-recursive is
    'follow-symlinks'.
---
 xeft.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/xeft.el b/xeft.el
index e083302176..b5f126925e 100644
--- a/xeft.el
+++ b/xeft.el
@@ -219,12 +219,16 @@ point at the beginning of body text (ie, end of title)."
 
 Xeft doesn’t follow symlinks and ignores inaccessible
 directories. Customize ‘xeft-directory-filter’ to exclude
-subdirectories.
+subdirectories. Set this variable to ‘follow-symlinks’ to follow
+symlinks, note that this might lead to infinite recursion.
 
 Changing this variable along doesn’t remove already-indexed files
 from the database, you need to delete the database on disk and
 let xeft recreate it."
-  :type 'boolean)
+  :type '(choice (const :tag "No" nil)
+                 (const :tag "Yes" t)
+                 (const :tag "Yes, and follow symlinks"
+                        follow-symlinks )))
 
 (defcustom xeft-file-list-function #'xeft--file-list
   "A function that returns files that xeft should search from.
@@ -732,7 +736,8 @@ files and directories and check for 
‘xeft-ignore-extension’."
    xeft-file-filter
    (if xeft-recursive
        (directory-files-recursively
-        xeft-directory "" nil xeft-directory-filter)
+        xeft-directory "" nil xeft-directory-filter
+        (eq xeft-recursive 'follow-symlinks))
      (directory-files
       xeft-directory t nil t))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]