Fix exclusion of doom local files in recentf
Due to a load order issue, the doom-local-dir regexp wouldn't be mapped through our custom recentf-filename-handlers. `file-in-directory-p` is more robust.
This commit is contained in:
parent
8434ae619d
commit
c0eb1f524d
1 changed files with 3 additions and 2 deletions
|
@ -111,18 +111,19 @@ detected.")
|
|||
recentf-auto-cleanup 'never
|
||||
recentf-max-menu-items 0
|
||||
recentf-max-saved-items 200
|
||||
recentf-filename-handlers '(doom--recent-file-truename abbreviate-file-name)
|
||||
recentf-exclude
|
||||
(list "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\)$" "^/tmp/" "^/ssh:"
|
||||
"\\.?ido\\.last$" "\\.revive$" "/TAGS$" "^/var/folders/.+$"
|
||||
;; ignore private DOOM temp files
|
||||
(regexp-quote (recentf-apply-filename-handlers doom-local-dir))))
|
||||
(lambda (path)
|
||||
(ignore-errors (file-in-directory-p path doom-local-dir)))))
|
||||
|
||||
(defun doom--recent-file-truename (file)
|
||||
(if (or (file-remote-p file nil t)
|
||||
(not (file-remote-p file)))
|
||||
(file-truename file)
|
||||
file))
|
||||
(setq recentf-filename-handlers '(doom--recent-file-truename abbreviate-file-name))
|
||||
|
||||
(defun doom|recentf-touch-buffer ()
|
||||
"Bump file in recent file list when it is switched or written to."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue