GNU bug report logs - #53223
27.2; multi-hop TRAMP with find-file-visit-truename t

Previous Next

Package: emacs;

Reported by: Aleksei Fedotov <aleksei <at> fedotov.email>

Date: Wed, 12 Jan 2022 21:35:02 UTC

Severity: normal

Tags: notabug

Found in version 27.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Aleksei Fedotov <aleksei <at> fedotov.email>
Cc: 53223 <at> debbugs.gnu.org
Subject: bug#53223: 27.2; multi-hop TRAMP with find-file-visit-truename t
Date: Thu, 13 Jan 2022 15:00:40 +0100
Aleksei Fedotov <aleksei <at> fedotov.email> writes:

> Hi,

Hi Aleksei,

> I've spotted a problem with TRAMP when using multi-hop ssh with
> find-file-visit-truename set to t.
>
> Assuming that there is a remote machine XXX.YYY.com with SSH server. On local
> machine I run emacs like that:
>
>> emacs -Q --eval '(progn \
>>       (require (quote tramp)) \
>>       (setq find-file-visit-truename t) \
>>       (with-current-buffer (find-file "/ssh:root <at> XXX.YYYY.com|ssh:localhost:") \
>>       (tramp-cleanup-all-connections) \
>>       (revert-buffer)))'
>
> It successfully connects to the remote machine and opens dired buffer with the
> correct content, but the filename name in the dired header is not
> '/ssh:XXX.YYYY.com|ssh:localhost:' as I might expect, but
> '/ssh:localhost:/root:'. After (revert-buffer) I get an error in *Messages*:
>
>> tramp-handle-access-file: Reading directory: No such file or directory /ssh:localhost:/root/
>
> The issue does not reproduce if find-file-visit-truename set to nil. It looks like 'file-truename' doesn't work correctly with multi-hop tramp file names.

Tramp behaves as expected. You use an ad-hoc multi-hop remote file
name. Such ad-hoc definitions are removed when you call
`tramp-cleanup-all-connections'. This is described in the Tramp manual
(info "(tramp) Ad-hoc multi-hops")
(info "(tramp) Cleanup remote connections")

If you want to keep multi-hop definitions permanently, configure
`tramp-default-proxies-alist' as described in the Tramp manual, or set
`tramp-save-ad-hoc-proxies' to t. See (info "(tramp) Multi-hops")

Best regards, Michael.




This bug report was last modified 3 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.