Marc Herbert <[email protected]> writes: > Hi,
Hi Marc, > I use both tramp and recentf constantly. > > I use remote systems which are sometimes off, suspended or on a > different network and I don't always remember to wake them up / > connect to the VPN / etc. on every first attempt. When I try to open a > file on a system that is unreachable, all the files on that system get > cleared from the recentf list. This should be very easy to reproduce. > It is very time-consuming when there are many files buried below long > paths with many directories. > > I configured recentf-auto-cleanup to "never" but tramp does not care > about that setting. I also tried various tramp settings but found none > that made a difference. Well, that variable is not intended for this case. > I found that this was added a few years ago because that could make > Emacs unusable: > https://lists.gnu.org/archive/html/tramp-devel/2019-02/msg00005.html > That does not seem to be the case anymore, well not for me anyway. Not > arguing about the default behavior I think it should be at least > possible to customize it and turn it off somewhere. Is it? After loading Tramp and recentf, you might call these lines in your .emacs: --8<---------------cut here---------------start------------->8--- (remove-hook 'tramp-cleanup-connection-hook #'tramp-recentf-cleanup) (remove-hook 'tramp-cleanup-all-connections-hook #'tramp-recentf-cleanup-all)))) --8<---------------cut here---------------end--------------->8--- Likely, in your case just the first form is sufficient, don't know. If this works well for you, I might add it to Tramp's FAQ. > Thanks in advance! > > Marc Best regards, Michael.
