unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Use cases for post-redisplay hooks
Date: Sun, 10 Jul 2016 23:34:05 -0400	[thread overview]
Message-ID: <jwv37ngdfji.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 5782C967.8020905@gmail.com

> 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.

On a related note, there could be some use for some kind of
"post-redisplay-hook" in follow-mode.  But it wouldn't just be
`post-redisplay-hook': it would need some way to control also the order
in which windows are redisplayed, and it would have to be run "between
windows" (at the end of computing the new matrices for a window).

The way I imagine this could work is by turning "redisplay" into an
Elisp function which internally would use some lower-level C functions
such as `recompute-matrices-of-window', `update-display-for-window`,
`update-display-for-frame`, and `find-windows-needing-redisplay`.

There would also be a need to control what happens when point needs to
be moved, or when scrolling is needed.
E.g. recompute-matrices-of-window could signal an error of some sort if
point is not within the window, and then `redisplay' could react to such
an error by either moving point or calling `window-try-scrolling'
if/when applicable.


        Stefan




  reply	other threads:[~2016-07-11  3:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 16:39 Use cases for post-redisplay hooks Clément Pit--Claudel
2016-07-04 17:02 ` 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 [this message]
  -- 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv37ngdfji.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).