bug#81467: [PATCH] Make bookmark-jump work with other-window/frame/tab-prefix

Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Stéphane Marks <[email protected]> writes:

> On Wed, Jul 29, 2026 at 9:54 AM Eshel Yaron <[email protected]> wrote:
>
>  Stéphane Marks <[email protected]> writes:
>
>  > On Wed, Jul 29, 2026 at 2:49 AM Eshel Yaron <[email protected]> wrote:
>  >
>  >  diff --git a/lisp/bookmark.el b/lisp/bookmark.el
>  >  index 77136308573..30b4da9c1b2 100644
>  >  --- a/lisp/bookmark.el
>  >  +++ b/lisp/bookmark.el
>  >  @@ -305,7 +305,10 @@ bookmark-alist
>  >   HANDLER is a function that provides the `bookmark-jump' behavior for a
>  >   specific kind of bookmark instead of the default `bookmark-default-handler'.
>  >   This is the case for Info bookmarks, for instance.  HANDLER must accept
>  >  -a bookmark as its single argument.
>  >  +a bookmark as its single argument.  HANDLER should set the current
>  >  +buffer (e.g. with `set-buffer') and optionally set point in that buffer.
>  >  +The command that invokes HANDLER displays the buffer that HANDLER leaves
>  >  +as current.
>  >
>  >   A function `bookmark-make-record-function' may define additional entries
>  >   in PARAM-LIST that can be used by HANDLER.")
>  >
>  > I think not.  The prevalence of bookmark handlers in the wild that have accumulated without such
>  > guidance suggests it's a bit too late and we need other mitigations.  We could adopt language that
>  > recommends such a policy but not ban it which risks lots of noise from users.
>
>  It doesn't ban anything, it only describes how the handler is used.
>  So I don't think I understand your objection, sorry.
>
> At the very least, it is not correct to say "The command that invokes HANDLER displays the buffer that
> HANDLER leaves as current."  For example, if display-function is ignore, as is the case for the bufferlo
> advice I detest, this would not be true as bufferlo handles display on its own.  As the OP pointed out, an
> Emacs built-in case is shell-bookmark-jump which calls shell which calls pop-to-buffer.

shell-bookmark-jump is not a command, it is a handler.
The command that invokes that handler goes on to display whichever
buffer the handler leaves as current.  That's just how bookmark commands
(currently) work.  The above diff is just an attempt to document it. :)


Best,

Eshel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.