bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.


From: Michael Heerdegen
Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.
Date: Fri, 29 Jan 2016 13:00:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]