GNU bug report logs - #22404
25.1.50; Forcing `window-scroll-functions` to run.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 19 Jan 2016 05:50:01 UTC

Severity: wishlist

Found in version 25.1.50

Full log


Message #56 received at 22404 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Keith David Bershatsky <esq <at> lawlist.com>, 22404 <at> debbugs.gnu.org
Subject: Re: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.
Date: Fri, 29 Jan 2016 13:00:42 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> The other thing I still don't understand is how forcing
> window-scroll-functions to run could fix your problem or _avoiding_
> extra calculations.  Where and under what conditions would you call
> the function that forces Emacs to run window-scroll-functions?
> Doesn't that waste processing in those cases where normally
> window-scroll-functions didn't need to be run (because window-start
> and window-end don't change)?  IOW, aren't you running those costly
> calculations from window-scroll-functions?

FWIW, I ran into this class of problems for several times: after
scrolling had been happening, I want to do something with the newly
visible area of the buffer (e.g., place overlays).

The main problem here is that even when window-scroll-function run,
AFAIK the value of `window-end' can still be outdated, even when called
with the update argument.

I didn't need to use post-command-hook in my cases, so it's a bit
different from what Keith wants.

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.

The only solution I know of is to do things in a timer, which works, but
not nicely (you sometimes get delays).


Regards,

Michael.




This bug report was last modified 9 years and 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.