Skip to content

Commit 57d5155

Browse files
committed
Keep disconnected TRAMP files in recentf
1 parent e48a930 commit 57d5155

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/config-desktop.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,17 @@ where it was when you previously visited the same file."
316316
(dolist (hook recentf-used-hooks) (apply #'add-hook hook))))
317317

318318
:config
319+
(defun quark/recentf-keep-predicate (file)
320+
(cond
321+
((file-remote-p file nil t) (file-readable-p file))
322+
((file-remote-p file) t)
323+
((file-readable-p file))))
324+
319325
(setq recentf-save-file (locate-user-emacs-file "data/recentf")
320326
recentf-max-saved-items 1000
321327
recentf-max-menu-items 50
322-
recentf-auto-cleanup 30)
328+
recentf-auto-cleanup 30
329+
recentd-keep '(quark/recentf-keep-predicate))
323330
(add-to-list 'recentf-exclude (eval-when-compile
324331
(concat (rx line-start)
325332
(expand-file-name

0 commit comments

Comments
 (0)