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

From: Ship Mints <[email-masked]>
Date: Wed, 12 Feb 2025 07:31:12 -0500

Sure. I'll work on documentation and NEWS once the patch is agreed so any
alterations are captured. bookmark-jump perhaps can use an alias
bookmark-open. The concept of jumping is very document centric considering
that bookmarks can be just about anything that a handler writer wants. One
of the packages I help maintain uses bookmarks in a more expansive way for
which I will also leverage the new property to inhibit bookmark-insert.

On Wed, Feb 12, 2025 at 7:18 AM Eli Zaretskii <[email-masked]> wrote:

> > From: Ship Mints <[email-masked]>
> > Date: Tue, 11 Feb 2025 14:56:08 -0500
> > Cc: [email-masked]
> >
> > +---
>
> Should we mention this feature in the user manual?
>
> > +*** Shell buffers now support bookmarks support.
> > +
> > +You can now bookmark shell buffers using the bookmark menu
> > +'bookmark-bmenu-list', or by using the command 'bookmark-set'.  Shell
> > +bookmarks can be loaded via the menu, or by using the command
> > +'bookmark-jump'.
> > +
> > +Remote shell bookmarks remember the buffer's remote 'default-directory'
> > +at the time you create a bookmark, along with the shell you used to
> > +start the remote shell.  You can inhibit remote connections during
> > +bookmark loading.  This is useful when restoring sessions with
> > +'desktop-load', where the time delays to establish a connection for each
> > +remote shell can be long.  When you reload an unconnected remote buffer
> > +using 'C-x C-v', a connection will be initiated.
> > +
> > +You can customize the bookmark naming function to suit your preferences.
> > +The default option is to use the final component of the buffer's
> > +'default-directory'.  An alternate provided option uses the buffer's
> > +name with its 'rename-uniquely' suffix brackets "<>" stripped.  You can
> > +supply your own function.
>
> AFAU, this doesn't explain what it means to "jump to a shell
> bookmark".  Does it start a shell, does it change the current
> directory in an existing shell buffer, does it initiate a connection
> to the remote host, does it do something else?  I don't think the
> answers to these questions are trivial, so I suggest to have them
> answered in the NEWS entry.
>
> By contrast, the second and the third paragraphs describe aspects of
> secondary importance, and should perhaps be in the doc strings and not
> in NEWS.
>
> Thanks.
>