From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>,Michael Heerdegen <eliz@gnu.org>
Cc: 22404@debbugs.gnu.org
Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.
Date: Fri, 29 Jan 2016 07:54:08 -0800 [thread overview]
Message-ID: <m2d1skv0tb.wl%esq@lawlist.com> (raw)
In-Reply-To: <m260yqdsp7.wl%esq@lawlist.com>
[-- Attachment #1: Type: text/plain, Size: 2204 bytes --]
In reading the comments in `xdisp.c`, there is a lot of mention about checking to see if the function that ran changed `window-start` and whether the cursor is still visible. In my own tests over the past few days, I created something just like `post-redisplay-hook` that runs towards the end of redisplay. I felt that my own feeble attempt to create the equivalent of the `post-redisplay-hook` had no checking built-in (due to lack knowledge / experience on my part).
So, I love the idea of a `post-redisplay-hook`, but think there probably needs to be some type of check to see whether the function that ran from it did some things that require certain recalculations -- e.g., maybe cursor was moved and is no longer partially or fully visible (there is even a setting I discovered where a user can decide that a partially visible cursor is just fine), maybe some text was inserted prior to window-start (which means the prior value is outdated), etc.
Sorry that I didn't understand your previous comments about the `pre-command-hook` potentially being a substitute for the contemplated `post-redisplay-hook`. Michael is correct -- the goal is generally to have the screen looking perfectly once redisplay concludes and the `pre-command-hook` (after the fact) can't accomplish that goal. When switching windows, the `pre-command-hook` will also have the wrong window in mind -- the correct window/buffer needs to be determined after the main command finishes.
Attached is an example of what I have been using for the past few days while I continue my ongoing tinkering -- it creates a new animal just like `window-scroll-functions` but with a different name.
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
At Fri, 29 Jan 2016 16:37:16 +0200,
Eli Zaretskii wrote:
>
> > From: Michael Heerdegen <michael_heerdegen@web.de>
> > Cc: Keith David Bershatsky <esq@lawlist.com>, 22404@debbugs.gnu.org
> > Date: Fri, 29 Jan 2016 13:00:42 +0100
> >
> > Anyway, using pre-command-hook is too late for us: it's not executed
> > unless the next input arrives, so you have to hit a key until
> > decorations or whatever get updated.
>
> Then maybe we need a post-redisplay-hook.
[-- Attachment #2: wsf.diff --]
[-- Type: application/diff, Size: 8501 bytes --]
next prev parent reply other threads:[~2016-01-29 15:54 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 5:49 bug#22404: 25.1.50; Forcing `window-scroll-functions` to run Keith David Bershatsky
2016-01-19 17:50 ` Eli Zaretskii
2016-01-19 18:49 ` Keith David Bershatsky
2016-01-19 19:39 ` Eli Zaretskii
2016-01-19 18:53 ` John Wiegley
2016-01-19 19:26 ` Keith David Bershatsky
2016-01-19 20:35 ` Keith David Bershatsky
2016-01-20 13:34 ` Eli Zaretskii
2016-01-19 23:07 ` Keith David Bershatsky
2016-01-21 2:32 ` Keith David Bershatsky
2016-01-21 17:41 ` Eli Zaretskii
2016-01-21 19:54 ` Keith David Bershatsky
2016-01-21 20:28 ` Eli Zaretskii
2016-01-29 12:00 ` Michael Heerdegen
2016-01-29 14:37 ` Eli Zaretskii
2016-01-29 14:57 ` Michael Heerdegen
2016-01-29 15:33 ` Eli Zaretskii
2016-01-21 21:11 ` Keith David Bershatsky
2016-01-29 2:14 ` John Wiegley
2016-01-29 3:08 ` Keith David Bershatsky
2016-01-29 8:42 ` Eli Zaretskii
2016-01-29 15:54 ` Keith David Bershatsky [this message]
2016-02-01 3:50 ` Keith David Bershatsky
2016-02-01 19:54 ` Eli Zaretskii
2016-02-01 13:18 ` Keith David Bershatsky
2016-02-02 16:34 ` Eli Zaretskii
2016-02-02 5:58 ` Keith David Bershatsky
2016-02-02 18:16 ` Keith David Bershatsky
2016-02-02 18:43 ` Eli Zaretskii
2016-02-02 20:00 ` Keith David Bershatsky
2016-02-02 21:05 ` Keith David Bershatsky
2016-02-08 8:51 ` Keith David Bershatsky
2016-02-08 17:17 ` Eli Zaretskii
2016-02-09 16:00 ` Keith David Bershatsky
2016-02-09 17:48 ` Eli Zaretskii
2016-02-12 0:14 ` Keith David Bershatsky
2016-02-12 8:18 ` Eli Zaretskii
2016-02-16 3:39 ` Keith David Bershatsky
2016-02-12 8:25 ` Why do idle timers trigger redisplay? Eli Zaretskii
2016-02-22 6:05 ` bug#22404: 25.1.50; Forcing `window-scroll-functions` to run Keith David Bershatsky
2016-03-11 16:21 ` 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=m2d1skv0tb.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=22404@debbugs.gnu.org \
--cc=eliz@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 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.