From: Michael Albinus <michael.albinus@gmx.de>
To: Aleksei Fedotov <aleksei@fedotov.email>
Cc: 53223@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 [thread overview]
Message-ID: <87a6fzpwfr.fsf@gmx.de> (raw)
In-Reply-To: <877db48x7m.fsf@hp.cfotr.com> (Aleksei Fedotov's message of "Wed, 12 Jan 2022 22:23:41 +0100")
Aleksei Fedotov <aleksei@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@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.
next prev parent reply other threads:[~2022-01-13 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 21:23 bug#53223: 27.2; multi-hop TRAMP with find-file-visit-truename t Aleksei Fedotov
2022-01-13 14:00 ` Michael Albinus [this message]
2022-01-13 20:54 ` Aleksei Fedotov
2022-01-13 22:38 ` Michael Albinus
2022-02-23 8:40 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6fzpwfr.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=53223@debbugs.gnu.org \
--cc=aleksei@fedotov.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).