Eli Zaretskii writes: > That'd cover scrolling a window in a way that leaves point outside of > it. But Emacs also sets the window-start position in other > situations. Moreover, the display engine itself does that, see > redisplay_window. > So some logic and/or flags will be needed to distinguish between the > cases. We should not recenter the display in any case where the start is not forced and point is not moved. >> For instance, we could enable the code that scrolls the window to follow >> point if PT != w->point (if that makes sense). > So any change in the numerical value of point will scroll the window > to bring point into the view? That'd be fine if that's what users > expect. But do they? E.g., what happens if point is below the > window, and you paste (with the mouse) some text into the visible > portion of the window (which doesn't show point)? That's not a problem, as `mouse-yank-primary' and friends already call mouse-set-point. WDYT about the attached patch? It recenters the display whenever PT != w->last_point, and it seems to work very well. It also introduces a new variable `scroll-move-point' that controls if the scrolling commands will try to move point to stay visible.