all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Cc: michael_heerdegen@web.de, Eli Zaretskii <eliz@gnu.org>,
	esq@lawlist.com, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Use cases for post-redisplay hooks
Date: Mon, 4 Jul 2016 12:39:50 -0400	[thread overview]
Message-ID: <577A9156.9070007@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1434 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2016-07-04 16:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 16:39 Clément Pit--Claudel [this message]
2016-07-04 17:02 ` Use cases for post-redisplay hooks Eli Zaretskii
2016-07-04 17:15   ` Clément Pit--Claudel
2016-07-04 21:45 ` Stefan Monnier
2016-07-10 22:17 ` Clément Pit--Claudel
2016-07-11  3:34   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2016-07-04 21:42 Keith David Bershatsky
2016-07-04 22:06 ` Stefan Monnier
2016-07-05  2:35 ` Eli Zaretskii
2016-07-04 22:50 Keith David Bershatsky
2016-07-05  8:12 ` Stefan Monnier
2016-07-07 16:08 ` Clément Pit--Claudel
2016-07-05 17:45 Keith David Bershatsky
2016-07-07 17:53 Keith David Bershatsky
2016-07-07 19:44 ` Clément Pit--Claudel
2016-07-07 20:19 Keith David Bershatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577A9156.9070007@gmail.com \
    --to=clement.pit@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esq@lawlist.com \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.