From 173d49b03ac945b700354f88b34fa61ea4000b42 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 8 Apr 2021 16:35:02 +0200 Subject: [PATCH] * doc/misc/tramp.texi (Frequently Asked Questions): New item about recentf. --- doc/misc/tramp.texi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5ea0275bafe..40245acb8e5 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5066,6 +5066,33 @@ path, or somewhere else entirely (including locally). @pxref{Renaming remote files}. +@item +How to prevent @value{tramp} from clearing the @code{recentf-list}? + +When @value{tramp} cleans a connection, it removes the respective +remote file name(s) from @code{recentf-list}. This is needed, because +an unresponsive remote host could trigger @code{recentf} to connect +that host again and again. + +If you find the cleanup disturbing, because the file names in +@code{recentf-list} are precious to you, you could add the following +two forms in your @file{~/.emacs} after loading the @code{tramp} and +@code{recentf} packages: + +@lisp +@group +(remove-hook + 'tramp-cleanup-connection-hook + #'tramp-recentf-cleanup) +@end group +@group +(remove-hook + 'tramp-cleanup-all-connections-hook + #'tramp-recentf-cleanup-all) +@end group +@end lisp + + @item I get a warning @samp{Tramp has been compiled with Emacs a.b, this is Emacs c.d} -- 2.39.5