[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shr using `make-xwidget' incorrectly
From: |
Lars Ingebrigtsen |
Subject: |
Re: shr using `make-xwidget' incorrectly |
Date: |
Thu, 11 Nov 2021 04:26:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Po Lu <luangruo@yahoo.com> writes:
> Lars, you might want to know that `make-xwidget', invoked without a
> buffer argument, will create an xwidget attached to the current buffer.
>
> That xwidget won't be killed until you kill the buffer it's attached to.
Can't we fix that, though? The xwidget code could check whether it's
still displayed and then kill itself it it's not. It could work along
the lines of the `evaporate' overlay property mechanism, perhaps.
> Which reminds me of another problem (in the Emacs 28 xwidget code as
> well): If an xwidget's buffer is killed, but references to it still
> exist somewhere, crashes can happen, because the GTK resources allocated
> to the xwidget are killed in `kill_buffer_xwidgets' and not during
> garbage collection.
Yes, I've experienced that once already while testing.
> I think the best thing to do in this case would be to introduce a
> `dead' state for xwidgets, not unlike killed buffers and dead frames,
> which an xwidget is set to after being killed.
>
> Then, performing any sort of operation on a killed xwidget can either
> throw an error, or do nothing.
Sounds good to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- shr using `make-xwidget' incorrectly, Po Lu, 2021/11/10
- Re: shr using `make-xwidget' incorrectly,
Lars Ingebrigtsen <=
- Re: shr using `make-xwidget' incorrectly, Po Lu, 2021/11/10
- Re: shr using `make-xwidget' incorrectly, Lars Ingebrigtsen, 2021/11/10
- Re: shr using `make-xwidget' incorrectly, Lars Ingebrigtsen, 2021/11/10
- Re: shr using `make-xwidget' incorrectly, Po Lu, 2021/11/10
- Re: shr using `make-xwidget' incorrectly, Lars Ingebrigtsen, 2021/11/10
- Re: shr using `make-xwidget' incorrectly, Po Lu, 2021/11/11
- Re: shr using `make-xwidget' incorrectly, Lars Ingebrigtsen, 2021/11/11
- Re: shr using `make-xwidget' incorrectly, Po Lu, 2021/11/11
- Re: shr using `make-xwidget' incorrectly, Lars Ingebrigtsen, 2021/11/11
- Re: shr using `make-xwidget' incorrectly, Po Lu, 2021/11/11