Fix #1444: recentf hangs Emacs on quit & cleanup
Caused by using file-truename on (disconnected) remote files, which invoked TRAMP authentication. Replaces #1451
This commit is contained in:
parent
79941a4fd7
commit
d329f216e3
1 changed files with 9 additions and 4 deletions
|
@ -105,14 +105,19 @@ detected.")
|
||||||
recentf-auto-cleanup 'never
|
recentf-auto-cleanup 'never
|
||||||
recentf-max-menu-items 0
|
recentf-max-menu-items 0
|
||||||
recentf-max-saved-items 200
|
recentf-max-saved-items 200
|
||||||
recentf-filename-handlers '(file-truename abbreviate-file-name)
|
|
||||||
recentf-exclude
|
recentf-exclude
|
||||||
(list #'file-remote-p "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\)$"
|
(list "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\)$" "^/tmp/" "^/ssh:"
|
||||||
"^/tmp/" "^/ssh:" "\\.?ido\\.last$" "\\.revive$" "/TAGS$"
|
"\\.?ido\\.last$" "\\.revive$" "/TAGS$" "^/var/folders/.+$"
|
||||||
"^/var/folders/.+$"
|
|
||||||
;; ignore private DOOM temp files
|
;; ignore private DOOM temp files
|
||||||
(recentf-apply-filename-handlers doom-local-dir)))
|
(recentf-apply-filename-handlers 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 ()
|
(defun doom|recentf-touch-buffer ()
|
||||||
"Bump file in recent file list when it is switched or written to."
|
"Bump file in recent file list when it is switched or written to."
|
||||||
(when buffer-file-name
|
(when buffer-file-name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue