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

Stéphane Marks <[email protected]> Thu, 30 Jul 2026 21:55:07 +0200
Newsgroups gmane.emacs.bugs
Message-ID <CAN+1HbrtrOpJiXo6BDUV9LV1S4OsiSaWU-s4=5JghjUW_rREwA@mail.gmail.com>
On Thu, Jul 30, 2026 at 1:59 PM Juri Linkov <[email protected]> wrote:

> > Could you explain the problem in a more general manner?
>
> I think it's better to look at a concrete example
> to get a general picture applicable to all other cases:
>
> 1. A bookmark handler 'shell-bookmark-jump' calls the function 'shell',
> because for the authors it was the simplest way to implement the handler.
> The function 'shell' uses 'pop-to-buffer' with the category 'comint'
> that follows the user customization of displaying the shell buffer.
>
> 2. 'bookmark-jump' supports another customization by its argument
> 'display-func'.  A related command 'bookmark-jump-other-window'
> sets this argument to 'switch-to-buffer-other-window'.
> And the default 'display-func' is 'pop-to-buffer-same-window'.
>
> The unresolved question is whether jumping to a bookmarked shell
> should follow the customization of displaying shell buffers
> or more general customization of displaying a bookmark?
>
> Stéphane proposed to define this preference by a bookmark handler.
> But now I think this preference should be customized by the user.
>

I think it still makes sense for bookmark handlers like bufferlo's where we
really do not want any overrides.  I introduced the bookmark-inhibit
property to control similar things that we really need to control.


> Then another question how to do this without adding more complexity?
> How to customize the display preference for every bookmark handler?
>

Would those be indexed by the same strings we use in bookmark-handler-type
properties like

 (put #'shell-bookmark-jump 'bookmark-handler-type "Shell")