3

That's to be expected because this is the Emacs Lisp reference, not the Emacs manual. It explains how a developer can adjust the vertical scrolling in a fine-grained way. Emacs 26.1 introduced pixel-scroll-mode which demonstrates this capability.


2

The closest existing tool to what I have asked for is follow-mode: Emacs wiki: https://www.emacswiki.org/emacs/FollowMode Source in Emacs mirror on Github: https://github.com/emacs-mirror/emacs/blob/master/lisp/follow.el Cliffs: M-x follow-mode to trigger manually (setq follow-auto t) to trigger automatically C-c . 1 or M-x follow-delete-other-windows-...


2

If you add the built-in scroll-lock-mode to your code, you should get behavior like what you want. Here's a slightly more-expansive update to your mode that fixes two other issues I found (the buffer-local version works normally and it doesn't change recenter-positions globally). Following your comments, I've also updated it not to rely directly on scroll-...


1

This can be done using scrolling commands written in elisp. ;; Scrolling that re-centers, keeping the cursor vertically centered. ;; Also clamps window top when scrolling down, ;; so the text doesn't scroll off-screen. (defun my-scroll-and-clamp--forward-line (n) "Wrap `forward-line', supporting Emacs built-in goal column. Argument N the number of lines, ...


1

You can just use C-l at any time during Isearch, to center the current search hit vertically in the window.


1

The O.P. has indicated in a comment underneath the original question that a previous suggestion by this author resolved the issue, and this answer is a write-up of that solution.... There is no need to use any advice-.... Instead, the O.P. could use one of two potential conditions: For just one exception, modify the function line-change as follows: (...


Only top voted, non community-wiki answers of a minimum length are eligible