emacs-devel
[Top][All Lists]
Advanced

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

Use cases for post-redisplay hooks


From: Clément Pit--Claudel
Subject: Use cases for post-redisplay hooks
Date: Mon, 4 Jul 2016 12:39:50 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

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.

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.


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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