(setq xeft-directory-filter 'follow-symlinks) not working
(setq xeft-directory-filter 'follow-symlinks) returns Symbol’s function definition is void: follow-symlinks
What are you trying to do?
I understand that only one folder can be set for Xeft. I would like it if it can search within my symlinks. Is this possible? Alternatively, is it possible to set up different Xeft with different folders and be able to call independently? Thank you.
Yes, add symlinks of the directories that you want to search under xeft-directory, then configure xeft to search recursively and follow symlinks.
(setq xeft-recursive 'follow-symlinks)
You can also reference this issue: https://github.com/casouri/xeft/issues/6
Out of curiosity, did you get the suggestion of (setq xeft-directory-filter 'follow-symlinks) from chatgpt or something similar?
Thanks. It's referenced here: https://github.com/casouri/xeft But you're right that it's not correctly used. I don't remember if I used ChatGPT for this, perhaps!
Once I add to my init (setq xeft-recursive 'follow-symlinks), do I have to rebuild the index of is it automatic?
I added a symlink folder to my xeft directory. Then I added
(setq xeft-recursive 'follow-symlinks)
I did xeft-full-reindex
I tried to search for a content inside the symlink folder.
No success. :(
For me (setq xeft-recursive 'follow-symlinks) also isn't working. I deleted previous index, restarted Emacs and even computer, did 'xeft-full-reindex' but that didn't work.
I changed line '(string-equal "org" (file-name-extension file-path))))' from org to md (files in symlinked directory are md) but the only difference was that I see no initial list of files though search is working and results are show.
Interestingly, I see no new index files after removing old ones in directory defined with xeft-database. But search is working and I see initial list of files after reverting back from md to org.
Relevant part of my init
(use-package xeft
:commands xeft
:bind ("C-c n x" . xeft)
:config
(setq xeft-directory org-directory
xeft-database "~/Documents/emacsdoku/xeft.db"
xeft-default-extension '("org" "txt" "md")
;; Don't follow symlinks.
;; xeft-recursive nil
;; Follow symlinks.
xeft-recursive 'follow-symlinks
xeft-file-filter
(lambda (file-path)
(string-equal "org" (file-name-extension file-path))))
(set-face-attribute 'xeft-inline-highlight nil
:inherit 'highlight)
(defun xeft-setup ()
(auto-fill-mode))
(add-hook 'xeft-find-file-hook #'xeft-setup)
(add-hook 'bklink-minor-mode-hook #'xeft-setup))
Hmm, what if you set xeft-file-filter to nil? What do you get if you evaluate (directory-files-recursively xeft-directory "" nil nil t)?