Jan Vroonhof writes:
[...]
However it turns out everybody and his dog is using the
(save-window-configuration
(select-window w)
idiom.. This is suggests two things...
1. record-buffer-hook is called way to often to do expensive things.
The solution is standard. Change the hook to simply set a flag and
then put the real update function at some other point that is less
expensive (pre-idle-hook? There isn't a pre-redisplay-hook that I
can see).[1]
Yep, that's what I meant by the comment. pre-idle-hook is the
only one I see that fits.
2. save-window-configuration is expensive. If so much code needs to
do
it there is probably something missing in the api. Some functions
need window arguments?
You have to select a window to do scrolling and to otherwise
conveniently affect window point. By conveniently I mean
window point automatically tracking the current buffer point.
Footnotes:
[1] It could be you meant this in the first place. But then I
disagree with the statement that is as is always been for lisp,
because the appropriate hooks seem to be missing.
I just meant that Lisp code is written to assume that intermediate
display states won't be visible unless redisplay is explicitly
called. The gutter update code seems to want to display window
state changes immediately. Hence we see flicker when it turns out
those changes were only temporary.