]> git.eshelyaron.com Git - emacs.git/commitdiff
* doc/misc/tramp.texi (Frequently Asked Questions): New item about recentf.
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 8 Apr 2021 14:35:02 +0000 (16:35 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 8 Apr 2021 14:35:02 +0000 (16:35 +0200)
doc/misc/tramp.texi

index 5ea0275bafe8c9a1d2b197eb89548fa2f2be0407..40245acb8e5c446f59114e6aa9b3ab7d20559fee 100644 (file)
@@ -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}