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

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

bug#69837: 29.2; vtable-update-object only works in visible windows


From: Adam Porter
Subject: bug#69837: 29.2; vtable-update-object only works in visible windows
Date: Sat, 16 Mar 2024 22:41:37 -0500
User-agent: Mozilla Thunderbird

Hi,

I've discovered that `vtable-update-object' only works in buffers that are in visible windows. When trying to update vtables in buffers that aren't, the object being updated or replaced fails to be found in the cache, apparently because `vtable--cache-key' uses `window-width' in its value (so maybe if, when the vtable buffer is not visible, the selected window happens to have the same width as the window in which the vtable buffer was previously displayed, it will work by chance).

In my case, the vtable is being updated in the background from a timer, so its buffer may or may not be visible. It's preferable to call `vtable-update-object' to update two rows in it rather than reverting the whole table, because it can be relatively slow to revert the whole table when it's large.

I'm not sure of the best way to fix this. Maybe the vtable's last-used window width could be cached and used for the cache key in case its buffer is not visible. I guess that would risk displaying the vtable sub-optimally if the next time it's displayed its window width is different, but that might be worth it; in that case, the user could always revert the table if necessary.

I'm willing to work on a patch for this, but I'd appreciate any guidance, since I'm far from an expert on this library, and there are many nuances when it comes to buffers, windows, their attributes, etc.

Thanks,
Adam





reply via email to

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