From: Lars Ingebrigtsen <larsi@gnus.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: shr using `make-xwidget' incorrectly
Date: Thu, 11 Nov 2021 05:56:53 +0100 [thread overview]
Message-ID: <87o86rb88a.fsf@gnus.org> (raw)
In-Reply-To: <87tugjz4dl.fsf@yahoo.com> (Po Lu's message of "Thu, 11 Nov 2021 12:46:14 +0800")
Po Lu <luangruo@yahoo.com> writes:
> BTW, it's impossible to cause an xwidget to become unavailable by
> deleting text in a buffer: it'll always be available via
> get-buffer-xwidgets, and there could be references to the xwidget in
> other places.
The same is true for overlays -- you can use `overlays-in' to find all
the overlays in the buffer, even if they aren't otherwise available. I
think modelling xwidget behaviour on overlays makes a lot of sense from
an UI point of view.
> Making xwidgets "evaporable" would cause a lot of overhead, I think.
>
> For example, WebKitGTK may elect to save or delete cached resources, if
> the reference count of the context and settings reaches zero.
>
> (Which will always happen if the widget did not have another widget
> passed to it as the `related' parameter to make-xwidget, and may happen
> regardless.)
I'm not sure what you mean here. Are you saying that a widget in a
buffer might just spontaneously disappear?
> Another solution (that doesn't involve attaching xwidgets to the buffer
> currently being rendered in) would be have shr attach xwidgets to a
> buffer used only for shr to manage xwidgets, and for shr to "recycle"
> the xwidgets each time something is rendered.
I don't think the functions that use xwidgets should have to know about
any of this stuff. Imagine if you'd have to jump through these hoops to
display images?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-11-11 4:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87sfw31mok.fsf.ref@yahoo.com>
2021-11-11 1:54 ` shr using `make-xwidget' incorrectly Po Lu
2021-11-11 3:26 ` Lars Ingebrigtsen
2021-11-11 3:38 ` Po Lu
2021-11-11 3:41 ` Lars Ingebrigtsen
2021-11-11 3:43 ` Lars Ingebrigtsen
2021-11-11 4:46 ` Po Lu
2021-11-11 4:56 ` Lars Ingebrigtsen [this message]
2021-11-11 5:10 ` Po Lu
2021-11-11 12:33 ` Lars Ingebrigtsen
2021-11-11 12:37 ` Po Lu
2021-11-11 12:43 ` Lars Ingebrigtsen
2021-11-11 12:47 ` Po Lu
2021-11-11 6:37 ` Introduce "killed" state for xwidgets (Re: shr using `make-xwidget' incorrectly) Po Lu
2021-11-11 7:59 ` Eli Zaretskii
2021-11-11 9:28 ` Po Lu
2021-11-11 12:23 ` Lars Ingebrigtsen
2021-11-11 12:25 ` Po Lu
2021-11-11 15:10 ` Eli Zaretskii
2021-11-12 0:18 ` Po Lu
2021-11-11 6:58 ` shr using `make-xwidget' incorrectly Eli Zaretskii
2021-11-11 7:05 ` Po Lu
2021-11-11 8:01 ` Eli Zaretskii
2021-11-11 9:27 ` Po Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o86rb88a.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.