emacs-devel
[Top][All Lists]
Advanced

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

Re: Redisplay hook


From: Clément Pit--Claudel
Subject: Re: Redisplay hook
Date: Mon, 4 Jul 2016 12:07:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 2016-07-04 03:55, Stefan Monnier wrote:
> I guess part of the question is what would be the use of such a hook.
> The difference between a pre-redisplay-hook and a
> post-redisplay-hook is not very large since most of the result of
> redisplay is "invisible" to Elisp.

Hi Stefan,

My main use case is described above in this thread; it's a very convenient way 
to generate relatively compact, but accurate, emacs screencasts. We don't 
currently have such a facility. Arthur's excellent 
https://github.com/Malabarba/camcorder.el comes close, but it still depends on 
recordmydesktop, an external application that records frames at a fixed rate. 
This means it sometimes misses frames, or captures too many, or shows 
intermediate display states.

With a post-redisplay hook, I can let emacs drive the capture process. Here's 
an example: http://web.mit.edu/cpitcla/www/emacs-screencast.gif (as I mentioned 
earlier in the thread, notice the xref pulsing and the M-x butterfly animation)

Additionally, since Emacs is driving, I can record plenty of per-frame data, 
such as which key is being pressed with each frame. Here's an example, which 
was fairly easy to assemble using this new hook and a bit of ImageMagick: 
http://web.mit.edu/cpitcla/www/emacs-screencast-annot.gif (it may take a bit of 
time to load). What do you think of the result?

I think a feature to generate such annotated screencasts would be very nice. 
I'll be happy to contribute the lisp code if we can find a nice way to add the 
necessary hooks.

Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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