summaryrefslogtreecommitdiff
path: root/doc/emacs/windows.texi
diff options
context:
space:
mode:
authorTino Calancha <ccalancha@suse.com>2021-02-07 16:51:07 +0100
committerTino Calancha <ccalancha@suse.com>2021-02-07 16:51:07 +0100
commit9380a7ed906e667df4fc5b9d9c8e487fafa7c654 (patch)
tree15313b2ccd2b8a7cf21d2b70f7ae694f99bd0e9c /doc/emacs/windows.texi
parent5461808c40ea5baeade203c0a4cc8200855eb00c (diff)
downloademacs-9380a7ed906e667df4fc5b9d9c8e487fafa7c654.tar.gz
Add command to recenter errors from Occur/Grep buffers
To scroll up/down the current displayed occurrence/error without abandon the Occur/Grep buffer. Add also a command 'recenter-other-window' to recenter the other window from any kind of buffer. * lisp/window.el (recenter-other-window): New command. Bind recenter-other-window to S-M-C-l (Bug#46119). * lisp/simple.el (recenter-current-error): New command. * lisp/progmodes/grep.el (grep-mode-map): Delete bidings for n and p. * lisp/progmodes/compile.el (compilation-minor-mode-map): Move here the n and p bindings. Bind `recenter-current-error' to l. * lisp/replace.el (occur-mode-map): Same. * doc/emacs/windows.texi (Other Window): * doc/emacs/display.texi (Recentering): Document recenter-other-window. * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 28.1): Announce the changes.
Diffstat (limited to 'doc/emacs/windows.texi')
-rw-r--r--doc/emacs/windows.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index e851f1b1b58..c66deb77487 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -161,6 +161,8 @@ Select another window (@code{other-window}).
Scroll the next window upward (@code{scroll-other-window}).
@item C-M-S-v
Scroll the next window downward (@code{scroll-other-window-down}).
+@item C-M-S-l
+Recenter the next window (@code{recenter-other-window}).
@item mouse-1
@kbd{mouse-1}, in the text area of a window, selects the window and
moves point to the position clicked. Clicking in the mode line
@@ -194,6 +196,8 @@ rebind a command.)
@findex scroll-other-window
@kindex C-M-S-v
@findex scroll-other-window-down
+@kindex C-M-S-l
+@findex recenter-other-window
The usual scrolling commands (@pxref{Display}) apply to the selected
window only, but there are also commands to scroll the next window.
@kbd{C-M-v} (@code{scroll-other-window}) scrolls the window that
@@ -203,7 +207,9 @@ take positive and negative arguments. (In the minibuffer, @kbd{C-M-v}
scrolls the help window associated with the minibuffer, if any, rather
than the next window in the standard cyclic order; @pxref{Minibuffer
Edit}.) @kbd{C-M-S-v} (@code{scroll-other-window-down}) scrolls the
-next window downward in a similar way.
+next window downward in a similar way. Likewise, @kbd{C-M-S-l}
+(@code{recenter-other-window}) behaves like @kbd{C-l}
+(@code{recenter-top-bottom}) in the next window.
@vindex mouse-autoselect-window
If you set @code{mouse-autoselect-window} to a non-@code{nil} value,