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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76457 in the body.
You can then email your comments to 76457 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Fri, 21 Feb 2025 06:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org. (Fri, 21 Feb 2025 06:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Cannot create bookmark to chained TRAMP connection
Date: Fri, 21 Feb 2025 14:20:20 +0800
X-debbugs-cc: michael.albinus <at> gmx.de

Hello,

I have a role account on a machine where I have to SSH to the machine as
spwhitton and then use sudo to do things as the role account.

I can get to it like this:

    C-x C-f /ssh:t2u-oracle|sudo:tag2upload-oracle <at> t2u-oracle:~/ RET

This opens a dired buffer, which is a useful place to start working on
the machine.

But if I then use C-x r m to create a bookmark to get back there more
quickly, the bookmark is created with the filename property set to
"/sudo:tag2upload-oracle <at> t2u-oracle:~/" which is wrong, as visiting that
bookmark would try to access an account on localhost.

I can work around this problem by manually editing my bookmarks file.

Thanks.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Fri, 21 Feb 2025 06:52:02 GMT) Full text and rfc822 format available.

Message #8 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: michael.albinus <at> gmx.de, 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Fri, 21 Feb 2025 12:21:14 +0530
[வெள்ளி பிப்ரவரி 21, 2025] Sean Whitton wrote:

> X-debbugs-cc: michael.albinus <at> gmx.de
>
> Hello,
>
> I have a role account on a machine where I have to SSH to the machine as
> spwhitton and then use sudo to do things as the role account.
>
> I can get to it like this:
>
>     C-x C-f /ssh:t2u-oracle|sudo:tag2upload-oracle <at> t2u-oracle:~/ RET
>
> This opens a dired buffer, which is a useful place to start working on
> the machine.
>
> But if I then use C-x r m to create a bookmark to get back there more
> quickly, the bookmark is created with the filename property set to
> "/sudo:tag2upload-oracle <at> t2u-oracle:~/" which is wrong, as visiting that
> bookmark would try to access an account on localhost.
>
> I can work around this problem by manually editing my bookmarks file.

I think you want tramp-save-ad-hoc-proxies to be non-nil.  See bug#65039
where a similar discussion is being held.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Fri, 21 Feb 2025 07:09:03 GMT) Full text and rfc822 format available.

Message #11 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Fri, 21 Feb 2025 08:08:04 +0100
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello,

Hi Sean,

> I have a role account on a machine where I have to SSH to the machine as
> spwhitton and then use sudo to do things as the role account.
>
> I can get to it like this:
>
>     C-x C-f /ssh:t2u-oracle|sudo:tag2upload-oracle <at> t2u-oracle:~/ RET
>
> This opens a dired buffer, which is a useful place to start working on
> the machine.
>
> But if I then use C-x r m to create a bookmark to get back there more
> quickly, the bookmark is created with the filename property set to
> "/sudo:tag2upload-oracle <at> t2u-oracle:~/" which is wrong, as visiting that
> bookmark would try to access an account on localhost.
>
> I can work around this problem by manually editing my bookmarks file.

In my local git repo, there is a pending change of the Tramp manual:

--8<---------------cut here---------------start------------->8---
   • Why saved multi-hop file names do not work in a new Emacs
     session?

     When saving ad-hoc multi-hop TRAMP file names (*note Ad-hoc
     multi-hops::) via bookmarks, recent files, filecache, bbdb, or
     another package, use the full ad-hoc file name including all
     hops, like ‘/ssh:bird <at> bastion|ssh:news.my.domain:/opt/news/etc’.
     This is achieved by setting the user option
     ‘tramp-show-ad-hoc-proxies’ to non-‘nil’.

     Alternatively, when saving abbreviated multi-hop file names like
     ‘/ssh:news <at> news.my.domain:/opt/news/etc’, the user option
     ‘tramp-save-ad-hoc-proxies’ must be set non-‘nil’ value.
--8<---------------cut here---------------end--------------->8---

Does this help?

> Thanks.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Fri, 21 Feb 2025 10:10:03 GMT) Full text and rfc822 format available.

Message #14 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: michael.albinus <at> gmx.de, 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50;
 Cannot create bookmark to chained TRAMP connection
Date: Fri, 21 Feb 2025 05:08:46 -0500
[Message part 1 (text/plain, inline)]
Awaiting further review and installation:

https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-02/msg01593.html

I tested that it handles multi-hops bookmarks.  Want to try it?

On Fri, Feb 21, 2025 at 1:21 AM Sean Whitton <spwhitton <at> spwhitton.name>
wrote:

> X-debbugs-cc: michael.albinus <at> gmx.de
>
> Hello,
>
> I have a role account on a machine where I have to SSH to the machine as
> spwhitton and then use sudo to do things as the role account.
>
> I can get to it like this:
>
>     C-x C-f /ssh:t2u-oracle|sudo:tag2upload-oracle <at> t2u-oracle:~/ RET
>
> This opens a dired buffer, which is a useful place to start working on
> the machine.
>
> But if I then use C-x r m to create a bookmark to get back there more
> quickly, the bookmark is created with the filename property set to
> "/sudo:tag2upload-oracle <at> t2u-oracle:~/" which is wrong, as visiting that
> bookmark would try to access an account on localhost.
>
> I can work around this problem by manually editing my bookmarks file.
>
> Thanks.
>
> --
> Sean Whitton
>
>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 04:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sat, 22 Feb 2025 12:58:41 +0800
Hello Michael,

On Fri 21 Feb 2025 at 08:08am +01, Michael Albinus wrote:

> In my local git repo, there is a pending change of the Tramp manual:
>
> --8<---------------cut here---------------start------------->8---
>    • Why saved multi-hop file names do not work in a new Emacs
>      session?
>
>      When saving ad-hoc multi-hop TRAMP file names (*note Ad-hoc
>      multi-hops::) via bookmarks, recent files, filecache, bbdb, or
>      another package, use the full ad-hoc file name including all
>      hops, like ‘/ssh:bird <at> bastion|ssh:news.my.domain:/opt/news/etc’.
>      This is achieved by setting the user option
>      ‘tramp-show-ad-hoc-proxies’ to non-‘nil’.
>
>      Alternatively, when saving abbreviated multi-hop file names like
>      ‘/ssh:news <at> news.my.domain:/opt/news/etc’, the user option
>      ‘tramp-save-ad-hoc-proxies’ must be set non-‘nil’ value.
> --8<---------------cut here---------------end--------------->8---
>
> Does this help?

Thanks!  The first paragraph is helpful, but then the second paragraph
confuses me a bit.  What is the relationship between the two options?
Also, why is tramp-show-ad-hoc-proxies not non-nil by default?
Just a matter of preserving backwards compatibility?

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 05:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Ship Mints <shipmints <at> gmail.com>, Visuwesh <visuweshm <at> gmail.com>
Cc: 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sat, 22 Feb 2025 13:00:41 +0800
Hello,

On Fri 21 Feb 2025 at 05:08am -05, Ship Mints wrote:

> Awaiting further review and installation:
>
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-02/msg01593.html
>
> I tested that it handles multi-hops bookmarks.  Want to try it?

Thanks, Visuwesh and Ship Mints, for the reference.
I'd prefer not to wade into #65039 right now, though; it looks like a
very long discussion.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 09:13:04 GMT) Full text and rfc822 format available.

Message #23 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sat, 22 Feb 2025 10:12:06 +0100
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello Michael,

Hi Sean,

>> --8<---------------cut here---------------start------------->8---
>>    • Why saved multi-hop file names do not work in a new Emacs
>>      session?
>>
>>      When saving ad-hoc multi-hop TRAMP file names (*note Ad-hoc
>>      multi-hops::) via bookmarks, recent files, filecache, bbdb, or
>>      another package, use the full ad-hoc file name including all
>>      hops, like ‘/ssh:bird <at> bastion|ssh:news.my.domain:/opt/news/etc’.
>>      This is achieved by setting the user option
>>      ‘tramp-show-ad-hoc-proxies’ to non-‘nil’.
>>
>>      Alternatively, when saving abbreviated multi-hop file names like
>>      ‘/ssh:news <at> news.my.domain:/opt/news/etc’, the user option
>>      ‘tramp-save-ad-hoc-proxies’ must be set non-‘nil’ value.
>> --8<---------------cut here---------------end--------------->8---
>>
>> Does this help?
>
> Thanks!  The first paragraph is helpful, but then the second paragraph
> confuses me a bit.  What is the relationship between the two options?

I tried to say it with the beginning of the second paragraph.
"Alternatively, ..." means, that both options are independent from each
other.

My English is notoriously bad. If you have a better phrasing, pls let me know.

> Also, why is tramp-show-ad-hoc-proxies not non-nil by default?
> Just a matter of preserving backwards compatibility?

The majority of Tramp users prefers the abbreviated form "/sudo:root <at> host:"
when they have started with "/ssh:host|sudo::". This works as expected,
unless you want to keep this over Emacs session boundaries. So it is a
convenience default to initialize this option with nil.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 12:12:02 GMT) Full text and rfc822 format available.

Message #26 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sat, 22 Feb 2025 20:11:25 +0800
Hello,

On Sat 22 Feb 2025 at 10:12am +01, Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>
>> Hello Michael,
>
> Hi Sean,
>
>>> --8<---------------cut here---------------start------------->8---
>>>    • Why saved multi-hop file names do not work in a new Emacs
>>>      session?
>>>
>>>      When saving ad-hoc multi-hop TRAMP file names (*note Ad-hoc
>>>      multi-hops::) via bookmarks, recent files, filecache, bbdb, or
>>>      another package, use the full ad-hoc file name including all
>>>      hops, like ‘/ssh:bird <at> bastion|ssh:news.my.domain:/opt/news/etc’.
>>>      This is achieved by setting the user option
>>>      ‘tramp-show-ad-hoc-proxies’ to non-‘nil’.
>>>
>>>      Alternatively, when saving abbreviated multi-hop file names like
>>>      ‘/ssh:news <at> news.my.domain:/opt/news/etc’, the user option
>>>      ‘tramp-save-ad-hoc-proxies’ must be set non-‘nil’ value.
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> Does this help?
>>
>> Thanks!  The first paragraph is helpful, but then the second paragraph
>> confuses me a bit.  What is the relationship between the two options?
>
> I tried to say it with the beginning of the second paragraph.
> "Alternatively, ..." means, that both options are independent from each
> other.
>
> My English is notoriously bad. If you have a better phrasing, pls let me know.

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
    final hop, and so only the Emacs session that generated the
    abbreviated form can understand it.

    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.

    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.

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

>> Also, why is tramp-show-ad-hoc-proxies not non-nil by default?
>> Just a matter of preserving backwards compatibility?
>
> The majority of Tramp users prefers the abbreviated form "/sudo:root <at> host:"
> when they have started with "/ssh:host|sudo::". This works as expected,
> unless you want to keep this over Emacs session boundaries. So it is a
> convenience default to initialize this option with nil.

I see, cool.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 12:27:01 GMT) Full text and rfc822 format available.

Message #29 received at 76457 <at> debbugs.gnu.org (full text, mbox):

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: Re: 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)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 15:34:06 GMT) Full text and rfc822 format available.

Message #32 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76457 <at> debbugs.gnu.org, Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sat, 22 Feb 2025 16:33:13 +0100
Ship Mints <shipmints <at> gmail.com> writes:

> On Sat, Feb 22, 2025 at 7:12 AM Sean Whitton
> <spwhitton <at> spwhitton.name> wrote:

Thank you both. Finally, I have made the following changes based on your
proposals (not pushed yet):

In "5.4 Declaring multiple hops in the file name "

--8<---------------cut here---------------start------------->8---
   TRAMP adds the ad-hoc definitions as an ephemeral record to
‘tramp-default-proxies-alist’, which are available for reuse during
that Emacs session.  Subsequent TRAMP connections to the same remote
host can then use the abbreviated form ‘/ssh:you <at> remotehost:/path’.

 -- User Option: tramp-show-ad-hoc-proxies
     If this user option is non-‘nil’, ad-hoc definitions are kept in
     remote file names instead of showing the abbreviations.  This is
     useful if the ad-hoc proxy definition shall be used in further
     Emacs sessions, kept in configuration files of recentf and other
     packages.

     A non-‘nil’ setting of this option has effect only if set before
     the connection is established.

          (customize-set-variable 'tramp-show-ad-hoc-proxies t)

   Ad-hoc definitions are removed from ‘tramp-default-proxies-alist’
via the command ‘M-x tramp-cleanup-all-connections <RET>’ (*note
Cleanup remote connections::).

 -- User Option: tramp-save-ad-hoc-proxies
     For ad-hoc definitions to be saved automatically in
     ‘tramp-default-proxies-alist’ for future Emacs sessions, set
     ‘tramp-save-ad-hoc-proxies’ to non-‘nil’.  The resulting user
     option ‘tramp-default-proxies-alist’ is saved in your ‘.emacs’
     file.

     If you use saved configuration files with abbreviated ad-hoc
     proxy definitions on another host, for example by distribution of
     the ‘recentf-save-file’, you must distribute your ‘.emacs’ file
     as well.

          (customize-set-variable 'tramp-save-ad-hoc-proxies t)
--8<---------------cut here---------------end--------------->8---

In "7 Frequently Asked Questions"

--8<---------------cut here---------------start------------->8---
   • Why don't saved ad-hoc multi-hop file names work in a new Emacs
     session?

     By default, ad-hoc multi-hop file names are abbreviated after
     completing the initial connection.  These abbreviated forms
     retain only the final hop, and so only the Emacs session that
     generated the abbreviated form can understand it.  *Note Ad-hoc
     multi-hops::.

     For example, after connecting to
     ‘/ssh:bird <at> bastion|ssh:news <at> 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 fully-qualified ad-hoc multi-hop
     file name is the one that will be both displayed and saved.
     *Note tramp-show-ad-hoc-proxies::.

     Alternatively, you can customize ‘tramp-save-ad-hoc-proxies’ to a
     non-‘nil’ value which means to save the information how an
     abbreviated multi-hop file name can be expanded.  *Note
     tramp-save-ad-hoc-proxies::.
--8<---------------cut here---------------end--------------->8---

WDYT?

> 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.

No, there's a reason that ad-hoc multi-hop file names are
ad-hoc. Sometimes, it isn't desirable to save them persistently over
Emacs sessions.

> -Stephane

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 16:09:02 GMT) Full text and rfc822 format available.

Message #35 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 76457 <at> debbugs.gnu.org, Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#76457: 31.0.50;
 Cannot create bookmark to chained TRAMP connection
Date: Sat, 22 Feb 2025 11:08:35 -0500
[Message part 1 (text/plain, inline)]
On Sat, Feb 22, 2025 at 10:33 AM Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
> > On Sat, Feb 22, 2025 at 7:12 AM Sean Whitton
> > <spwhitton <at> spwhitton.name> wrote:
>
> Thank you both. Finally, I have made the following changes based on your
> proposals (not pushed yet):
>
> In "5.4 Declaring multiple hops in the file name "
>
> --8<---------------cut here---------------start------------->8---
>    TRAMP adds the ad-hoc definitions as an ephemeral record to
> ‘tramp-default-proxies-alist’, which are available for reuse during
> that Emacs session.  Subsequent TRAMP connections to the same remote
> host can then use the abbreviated form ‘/ssh:you <at> remotehost:/path’.
>
>  -- User Option: tramp-show-ad-hoc-proxies
>      If this user option is non-‘nil’, ad-hoc definitions are kept in
>      remote file names instead of showing the abbreviations.  This is
>      useful if the ad-hoc proxy definition shall be used in further
>      Emacs sessions, kept in configuration files of recentf and other
>      packages.
>

Here I think it would be good to clarify:

     If this user option is non-‘nil’, _fully-qualified_ ad-hoc definitions
are kept in

The ad-hoc nature of these connections isn't really related to
their potential abbreviations and that might confuse some people.  Perhaps
explain that multi-hop routes are not known to Emacs (can they be defined
in ssh/config?), and the user has to create them on the fly, so they are
"ad-hoc", so to speak?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sat, 22 Feb 2025 16:20:02 GMT) Full text and rfc822 format available.

Message #38 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 76457 <at> debbugs.gnu.org, Sean Whitton <spwhitton <at> spwhitton.name>
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sat, 22 Feb 2025 17:19:13 +0100
Ship Mints <shipmints <at> gmail.com> writes:

Hi,

> The ad-hoc nature of these connections isn't really related to their
> potential abbreviations and that might confuse some people.  Perhaps
> explain that multi-hop routes are not known to Emacs (can they be
> defined in ssh/config?), and the user has to create them on the fly,
> so they are "ad-hoc", so to speak?

Hop abbreviations can happen only in ad-hoc multi-hop file
names. "Traditional" multi-hop files don't use neither ad-hoc
definitions nor abbreviations. See (info "(tramp) Multi-hops")

People tend to forget this.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sun, 23 Feb 2025 04:27:02 GMT) Full text and rfc822 format available.

Message #41 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Michael Albinus <michael.albinus <at> gmx.de>, 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sun, 23 Feb 2025 12:25:48 +0800
Hello,

On Sat 22 Feb 2025 at 07:26am -05, Ship Mints wrote:

>      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...

I think talking about what Emacs can understand is more accessible for
the average user.

-- 
Sean Whitton




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76457; Package emacs. (Sun, 23 Feb 2025 04:32:02 GMT) Full text and rfc822 format available.

Message #44 received at 76457 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Ship Mints <shipmints <at> gmail.com>, 76457 <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sun, 23 Feb 2025 12:31:05 +0800
Hello,

On Sat 22 Feb 2025 at 04:33pm +01, Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
>> On Sat, Feb 22, 2025 at 7:12 AM Sean Whitton
>> <spwhitton <at> spwhitton.name> wrote:
>
> Thank you both. Finally, I have made the following changes based on your
> proposals (not pushed yet):

LGTM, many thanks!

-- 
Sean Whitton




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Sun, 23 Feb 2025 09:52:01 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Sun, 23 Feb 2025 09:52:02 GMT) Full text and rfc822 format available.

Message #49 received at 76457-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Ship Mints <shipmints <at> gmail.com>, 76457-done <at> debbugs.gnu.org
Subject: Re: bug#76457: 31.0.50; Cannot create bookmark to chained TRAMP
 connection
Date: Sun, 23 Feb 2025 10:51:19 +0100
Version: 30.2

Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Hello,

Hi,

>> Thank you both. Finally, I have made the following changes based on your
>> proposals (not pushed yet):
>
> LGTM, many thanks!

Thanks for the feedback. I've pushed this to the repositories, closing
the bug.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Mar 2025 11:24:44 GMT) Full text and rfc822 format available.

This bug report was last modified 88 days ago.

Previous Next


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