bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Po Lu
Subject: bug#52856: 29.0.50; Problematic handling of webkit xwidget bookmarks
Date: Wed, 29 Dec 2021 19:25:52 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Stephen Berman <stephen.berman@gmx.net> writes:

> 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.

Okay, thanks -- some comments below:

> +                 (with-temp-buffer
> +                   (xwidget-webkit-new-session url)
> +                   (current-buffer))

Why with-temp-buffer?

xwidget-webkit-new-session creates a new buffer and switches to it,
which is not appropriate if you want to obtain a buffer containing the
new xwidget.  I suggest that you write a new function that creates the
buffer, displays the xwidget, and returns the buffer, preferably also
updating xwidget-webkit-new-session to use it as well.

> +    (switch-to-buffer curbuf)
> +    (set-buffer xwbuf)))

See above.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]