help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with multi-hop in TRAMP


From: Michael Albinus
Subject: Re: Issues with multi-hop in TRAMP
Date: Mon, 25 Feb 2019 12:52:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Michael Albinus <michael.albinus@gmx.de> writes:

> Hi Jordan,

Hi Jordan,

>> I use recentf.el. It can see in `recentf-open-files' files retrieved
>> using that multi-hop are labelled like
>> "/sshx:username@machine2:/home/jordan/hello.txt"
>
> Well, that's the problem. Multi-hop remote files, as you use them, are
> called "ad-hoc". The reason is that this syntax is intended for the
> moment, and not suited to survive Emacs sessions. Tramp reduces the file
> name "/method1:host1|method2:host2:" to "/method2:host2", just for
> convenience. The needed hop for host2 is kept internally during the
> Emacs session.
>
> When you open a new Emacs session, and recentf reads its initial file
> with the shortened file name, this information is lost.
>
> So you shall either declare multi-hop by means of
> `tramp-default-proxies-alist' (see the Tramp manual, node "Multi-hops"),
> or you shall set `tramp-save-ad-hoc-proxies' to t (see the Tramp manual,
> node "Ad-hoc multi-hops"), which stores that information persistently.
>
> Anyway, it is an error in recentf to store such shortened remote file
> name, missing the ad-hoc multi-hop information. I will check, whether
> this could be fixed.

Well, I've extended `tramp-cleanup-all-connections' such a way, that it
removes all remote files from recentf lists. This should help in such
cases, at least to get rid of reloading such files again and again.

Available in the Emacs master branch.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]