On next-error
in the grep or compilation window, I can use something like
(setq next-error-recenter 35)
to ensure that window displaying the match scrolls to show the whole match, as described in more detail in this stackoverflow question.
How do I do the same thing in the grep or compilation window itself? I often have grep output or compile output that is off the bottom of the window, and on days when I spend all of my time going through grep output or compile errors, switching back and forth between windows adds a significant overhead.
compilation-goto-locus
and put in arecenter
command where appropriate -- at the section that begins with the comment:If the compilation buffer window was selected . . . ,
You can recenter at different location of the window -- see the doc-string forrecenter
. – lawlist Feb 26 '16 at 7:40recenter-current-error
, bound tol
in the*Occur*
and*Grep*
buffers; the effect of this command is like callingC-l
in the window displaying the current error. This will be available in a future release Emacs-28. – Tino Feb 7 at 18:40