bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46119: 28.0.50; this-error-recenter


From: Juri Linkov
Subject: bug#46119: 28.0.50; this-error-recenter
Date: Mon, 01 Feb 2021 19:19:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> Do you agree with adding two separated commands?
>
> Maybe two commands is fine.  Then the users can decide what command
> better suites user's needs.

Actually everything is much simpler.  The hint is in the default value
of 'xref-after-jump-hook' that contains 'recenter' by default.
So when you customize 'xref-after-jump-hook' to the value:

  (recenter-top-bottom xref-pulse-momentarily)

you can use 'C-o' to recenter another window from xref buffer,
exactly like 'C-l' does for the selected window.

The same way you can add:

  (add-hook 'next-error-hook 'recenter-top-bottom)

then use 'C-o' in any next-error capable buffer (compilation, occur, ...)
to recenter its corresponding window exactly like you want.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]