GNU bug report logs - #76457
31.0.50; Cannot create bookmark to chained TRAMP connection

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Fri, 21 Feb 2025 06:21:02 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 30.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: Ship Mints <shipmints <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Michael Albinus <michael.albinus <at> gmx.de>, 76457 <at> debbugs.gnu.org
Subject: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP connection
Date: Sat, 22 Feb 2025 07:26:08 -0500
[Message part 1 (text/plain, inline)]
On Sat, Feb 22, 2025 at 7:12 AM Sean Whitton <spwhitton <at> spwhitton.name>
wrote:

> Here's an attempt:
>
>     Why don't saved multi-hop file names work in a new Emacs session?
>
>     By default, multi-hop file names are abbreviated after completing
>     the initial connection.  These abbreviated forms mention only the
>

I'd say retain instead of mention.


>     final hop, and so only the Emacs session that generated the
>     abbreviated form can understand it.
>

How about ...the originating Emacs session maintains an ephemeral record of
the hops, and this will not be available to other Emacs sessions...

    For example, after connecting to
>     /ssh:bird <at> bastion|ssh:news.my.domain:/opt/news/etc, the file name
>     becomes /ssh:news <at> news.my.domain:/opt/news/etc.  If the abbreviated
>     form is saved in a bookmark, the recent files list, bbdb, or
>     similar, a new Emacs session has no way to know that the connection
>     must go through bird <at> bastion first.
>
>     There are two mechanisms to deal with this.  The first is to
>     customize tramp-show-ad-hoc-proxies to a non-nil value, which
>     disables abbreviation.  Then the full multi-hop file name is the one
>     that will be both displayed and saved.
>

How about ...fully-qualified multi-hop file name...

One nuance is that tramp-show-ad-hoc-proxies must be customized to non-nil
_in advance_ of making connections.

    Alternatively, you can customize tramp-save-ad-hoc-proxies to a
>     non-nil value which means to save the full file names, but display
>     the abbreviated ones.
>

...fully-qualified file names...

One nuance here is that proxies saved via tramp-save-ad-hoc-proxies are
stored in a file local to the originating Emacs session.  If one expects to
share bookmarks, etc., outside that host, show trumps save, though they are
not mutually exclusive options.  That would also assume that one's
.ssh/config, etc., are also synchronized.  Mine are.  And I want my Emacs
sessions to work as identically as I can manage across hosts modulo
platform specifics and perhaps different directory tree contents, and even
then, I tend to use identical hierarchies everywhere.

... but is this actually a correct description of the behaviour?
>

Based on my recent testing and discussions with Michael, this is correct.
The Tramp UI could be improved so that fully-qualified names are always
retained yet made convenient to use abbreviated file names.  That would
solve for both persisting remote file names and interactive convenience.

-Stephane
[Message part 2 (text/html, inline)]

This bug report was last modified 89 days ago.

Previous Next


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