[Top][All Lists]

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

Re: shr using `make-xwidget' incorrectly

From: Po Lu
Subject: Re: shr using `make-xwidget' incorrectly
Date: Thu, 11 Nov 2021 13:10:36 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

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

Hmm, I will try to think of a reasonable way to implement this.  But
IMO, it should be optional -- the existing behavior makes sense for many

> I'm not sure what you mean here.  Are you saying that a widget in a
> buffer might just spontaneously disappear?

No, that killing a widget might take an unreasonable amount of time and
be surprising to be implemented like evaporating overlays are.

Imagine if the erasure of a few characters took upwards of 1 second,
deleting dozens of on-disk cache files.  That is a situation that might
result from implementing evaporation of xwidgets like with overlays.

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

Better comparison: imagine if `struct image' was a Lisp object (and not
an internal structure created on the basis of an image spec), held tens
of megabytes of memory, a lot of non-replicable state, an entire
language interpreter, and control over many cache files on-disk.

Then would it still be reasonable to delete `struct image's as part of
some routine pruning operation such as flushing the image cache, or the
erasure of a few characters in a buffer?  I think not.

Thanks.  But I will try my best to find an acceptable solution to this

reply via email to

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