Subject: bug#52856: 29.0.50; Problematic handling of webkit xwidget bookmarks

From: Stephen Berman <[email-masked]>
Date: Wed, 29 Dec 2021 11:50:26 +0100

On Wed, 29 Dec 2021 15:26:11 +0800 Po Lu <[email-masked]> wrote:

> Stephen Berman <[email-masked]> writes:
>
>> If you make a bookmark to a webkit xwidget (i.e. to a URL displayed by
>> the xwidget) and then use `bookmark-jump-other-window' or
>> `bookmark-jump-other-frame' to jump to the bookmarked URL, the xwidget
>> is displayed in both the original window and the other window or other
>> frame.
>
> Does "original window" mean the window that was selected before you ran
> `bookmark-jump-other-window' (or frame)?

Yes.

> If so, you should customize `xwidget-webkit-bookmark-jump-new-session'
> to a non-nil value instead.

I did, but that just ensures that jumping to the bookmarked xwidget
creates a new xwidget session -- it does not prevent the xwidget from
being displayed both in the other window/frame and in the originally
selected window.  My patch ensures that the bookmarked xwidget is
displayed only in the other window/frame, which is consistent with the
behavior of `bookmark-jump-other-window' and `bookmark-jump-other-frame'
with other types of bookmarks (e.g. to PDFs in the pdf-tools package),
regardless of whether a new xwidget session is created.

However, my bug report was mistaken in reporting that jumping to a
bookmarked xwidget before loading xwidget.el raises an error -- with
the existing code it succeeds, because there the bookmark uses
`xwidget-webkit-browse-url', which is autoloaded.  I must have tested
that after applying my patch but before adding the autoload cookie
(which is needed with my patch).  Sorry for the confusion.

Steve Berman