Subject: bug#65039: [PATCH] Add bookmark handler for shell-mode

From: Ship Mints <[email-masked]>
Date: Sat, 15 Feb 2025 06:24:43 -0500

Hmm. I prefer storing the fully-qualified multi-hop file name in the
bookmark itself. I share my bookmarks across machines which all have
identically structured file systems, identical ssh configurations,
identical "production" Emacs configs, and I expect my bookmarks to load
without having to copy over another file. I will occasionally share a
bookmark snippet with someone else and expect it to work (these people have
similar set ups--assuming they follow the configuration guidelines).

Can we take a look at fully-qualified file name reconstruction?

On Sat, Feb 15, 2025 at 3:21 AM Michael Albinus <[email-masked]>
wrote:

> Michael Albinus <[email-masked]> writes:
>
> >> Hi, Michael,
>
> Hi,
>
> >> If it is possible to do at bookmarking time, please tell me how. If
> >> this is not possible, we will highlight in the docs that
> >> tramp-show-ad-hoc-proxies must be t if users expect multi-hop
> >> bookmarks to be effective.
> >
> > I'll check, whether I can improve this in Tramp.
>
> Finally, it is much simpler than expected. The Tramp manual tells us
> TheTruth™,
> (info "(tramp) Frequently Asked Questions")
>
> --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@bastion|ssh:news.my.domain:/opt/news/etc’.
>
>      Alternatively, when saving abbreviated multi-hop file names
>      ‘/ssh:[email-masked]:/opt/news/etc’, the user option
>      ‘tramp-save-ad-hoc-proxies’ must be set non-‘nil’ value.
> --8<---------------cut here---------------end--------------->8---
>
> If you document to set tramp-save-ad-hoc-proxies to non-nil it should
> work out-of-the-box.
>
> >> -Stephane
>
> Best regards, Michael.
>