emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] EWW - use revert--buffer-function to reload, and allow reloa


From: Adam Porter
Subject: Re: [PATCH] EWW - use revert--buffer-function to reload, and allow reload in eww-list-buffer
Date: Mon, 14 Oct 2024 23:01:30 -0500
User-agent: Mozilla Thunderbird

On 10/14/24 21:59, Sebastián Monía wrote:
I was looking into it, we "just" need a good 'buffer-stale-function'.
All I could think of was to store the list used to populate the vtable
in a buffer-local variable, and check if the list has changed?

AFAIK it's generally good to avoid adding more buffer-local variables, as their presence has a performance penalty in general.

Updating a buffer list buffer automatically could be done by hooking into the machinery that renders a single EWW buffer and having it update a buffer list buffer if one exists. But I guess that wouldn't work exactly like `auto-revert-mode` and `buffer-stale-function`.

Another option could be to use a special, non-buffer-local variable to store 1) a timestamp of the last time any EWW buffer was updated, then update that timestamp in an EWW post-render hook (haven't looked for appropriate one), and 2) the time that the list buffer was last updated (in the same variable, using e.g. an alist), and compare the timestamps in the buffer-stale-function.

I don't mean to say what you should do; just throwing out some ideas.  :)

--Adam



reply via email to

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