When using recentf with tramp, recentf would clean up its file list including all remote files, which takes a lot of time when the Internet is bad. How can I ask recentf to not cleanup remote files, without disabling recent file list auto cleanup for local files?
Asked
Active
Viewed 988 times
1 Answers
7
M-x customize-option RET recentf-keep RET
, and be sure to read its description.
You can use any arbitrary or conditional expression. And that includes file-remote-p
.

Drew
- 75,699
- 9
- 109
- 225
-
sort of old, but maybe you mean't `file-remote-p` ? – joefromct Jul 16 '19 at 03:46
-
1@joefromct: Yes; updated. Thx. – Drew Jul 16 '19 at 15:26
-
I am facing the exact same issue: remote files are removed from the recentf list of my local emacs after a shut-down of the remote server. I would like for them to keep around. What exactly do I have to specify here and where do I have to do that? – CD86 Jun 20 '23 at 07:40