all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 17678@debbugs.gnu.org
Subject: bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay
Date: Fri, 13 Jun 2014 20:55:51 +0300	[thread overview]
Message-ID: <83d2ecwv6g.fsf@gnu.org> (raw)
In-Reply-To: <m2egys7pao.wl%esq@lawlist.com>

> Date:  Fri, 13 Jun 2014 09:22:07 -0700
> From:  Keith David Bershatsky <esq@lawlist.com>
> Cc:  17678@debbugs.gnu.org
> 
> The `window-scroll-functions` hook would be more useful if the value of `window-start` could be obtained *before* running the `post-command-hook`.  At the present time, it would appear that the `post-command-hook` runs *before* the `window-scroll-functions` hook.  Therefore, the `post-command-hook` cannot presently use the `window-start` value produced from the `window-scroll-functions` hook (which occurs *after* the `post-command-hook` has already finished).

Yes, post-command-hook runs before window-scroll-functions.  That's
because post-command-hook runs immediately after a command execution
is finished and Emacs is about to return to the command loop, while
window-scroll-functions run as part of redisplay, which is entered
whenever Emacs is idle, i.e., after the return to the command loop.

Unfortunately, what you are asking for is not possible with the
current design of Emacs, because window-start is computed as part of
redisplay (it is one of the most important functions of redisplay to
compute that).

OTOH, I don't understand why do you need what you ask for.  For
example, why can't you do whatever you need from
window-scroll-functions, instead of doing some of it in
post-command-hook?  Perhaps you should describe the problem you are
trying to solve in more detail.





  reply	other threads:[~2014-06-13 17:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 17:48 bug#17678: 24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay Keith David Bershatsky
2014-06-11 18:00 ` Stefan Monnier
2014-06-11 18:45   ` Eli Zaretskii
2014-06-11 21:58     ` Stefan Monnier
2014-06-12 17:54       ` Eli Zaretskii
2014-06-13  2:11         ` Stefan Monnier
2014-06-13  6:22           ` Eli Zaretskii
2014-06-13 12:34             ` Stefan Monnier
2014-06-13 13:27               ` Eli Zaretskii
2014-06-13 14:14                 ` Stefan Monnier
2014-06-13 14:47                   ` Eli Zaretskii
2014-06-13 18:47                     ` Stefan Monnier
2014-06-13 20:21                       ` Keith David Bershatsky
2014-06-13 20:59                       ` Eli Zaretskii
2014-06-14  9:45                         ` Eli Zaretskii
2014-06-14 17:10                           ` Keith David Bershatsky
2014-06-15  2:24                         ` Stefan Monnier
2014-06-13 16:22 ` Keith David Bershatsky
2014-06-13 17:55   ` Eli Zaretskii [this message]
2014-06-13 18:24     ` Keith David Bershatsky
2014-06-13 20:54       ` Eli Zaretskii
2014-06-13 21: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=83d2ecwv6g.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17678@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    /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.