[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use cases for post-redisplay hooks
From: |
Clément Pit--Claudel |
Subject: |
Re: Use cases for post-redisplay hooks |
Date: |
Mon, 11 Jul 2016 00:17:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
On 2016-07-04 12:39, Clément Pit--Claudel wrote:
> Hi emacs-devel,
>
> As a prelude to implementing the actual functionality, I'd like to get a
> clearer picture of what use cases exist for post-redisplay hooks.
Summarizing the current discussion:
(1) Is still valid, though Richard did suggest that we could have Emacs take
the screenshots itself. It would indeed be a useful feature to have, though it
is partly orthogonal, and seems non-trivial to implement. Richard also
suggested special casing this feature and implementing only that instead of a
post-display-hook.
(2) Does not sound like it would benefit significantly from such a hook (but I
may have missed something).
(3) Does not resolve to something concrete.
Clément.
> Here are the ones that I'm currently aware of; can you think of other ones?
>
> 1. (my own) Generating emacs screenshots. You can see a demo at
> http://web.mit.edu/cpitcla/www/emacs-screencast-annot.gif (let me know what
> you think!). Other hooks do not work because:
> - pre-redisplay-functions are called too early
> - pre- and post-command-hook do not run often enough (in the screencast
> above, see the butterfly animation, for example)
> - window-related hooks do not run often enough either
> - redisplay-end-trigger-functions are tricky to use, and deprecated
>
> 2. (Keith David Bershatsky + Michael Heerdegen @
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-01/msg01013.html)
> Updating overlays after scrolling. The bug thread is pretty long and subtle,
> but this issue has also been discussed on emacs.stackexchanged IIRC.
>
> 3. (Stefan? @
> https://lists.gnu.org/archive/html/emacs-devel/2009-02/msg00785.html) Running
> code every time "something visible" happens (e.g. due to process filters)
>
> For number 1, and potentially number 3, a hook that run after redisplay
> completes entirely would work. For number 2, things are less clear. Michael,
> Keith, and Eli, do you have ideas of when in the display cycle such a hook
> should run?
>
> Thanks!
> Clément.
>
>
signature.asc
Description: OpenPGP digital signature