From: Juri Linkov <juri@jurta.org>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 46119@debbugs.gnu.org, uyennhi.qm@gmail.com
Subject: bug#46119: 28.0.50; this-error-recenter
Date: Wed, 27 Jan 2021 11:19:19 +0200 [thread overview]
Message-ID: <87czxqbwp4.fsf@mail.linkov.net> (raw)
In-Reply-To: <8735yn1jjn.fsf@gmail.com> (Tino Calancha's message of "Tue, 26 Jan 2021 22:21:16 +0100")
> +(defun this-error-recenter (&optional arg)
> + "Recenter the current displayed error in the `next-error' buffer."
> + (interactive "P")
> + (if (not (or (eq major-mode 'occur-mode)
> + (derived-mode-p 'compilation-mode)))
> + (user-error "This command is for *Occur* or *Grep* buffers")
> + (funcall next-error-function 0 nil)
> + (recenter-top-bottom arg)
> + (pop-to-buffer next-error-last-buffer)))
I wonder why restrict this only to occur and compilation?
Like C-M-v/C-M-S-v and M-PgUp/M-PgDown can scroll up/down other window
in any mode, you can use such code to recenter other window everywhere:
(with-selected-window (other-window-for-scrolling) (recenter-top-bottom))
next prev parent reply other threads:[~2021-01-27 9:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 21:21 bug#46119: 28.0.50; this-error-recenter Tino Calancha
2021-01-27 9:19 ` Juri Linkov [this message]
2021-01-30 15:01 ` Tino Calancha
2021-01-30 18:40 ` Juri Linkov
2021-01-30 20:41 ` Tino Calancha
2021-01-31 9:29 ` Juri Linkov
2021-01-31 15:56 ` Tino Calancha
2021-01-31 21:43 ` Juri Linkov
2021-02-01 17:19 ` Juri Linkov
2021-02-01 18:45 ` Tino Calancha
2021-02-02 17:04 ` Juri Linkov
2021-02-02 21:10 ` Tino Calancha
2021-02-01 19:17 ` Tino Calancha
2021-02-02 17:05 ` Juri Linkov
2021-02-02 21:16 ` Tino Calancha
2021-02-03 8:58 ` Juri Linkov
2021-02-03 13:03 ` Tino Calancha
2021-02-03 17:39 ` Juri Linkov
2021-02-07 15:56 ` Tino Calancha
2021-01-28 6:38 ` Richard Stallman
2021-01-30 14:50 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czxqbwp4.fsf@mail.linkov.net \
--to=juri@jurta.org \
--cc=46119@debbugs.gnu.org \
--cc=tino.calancha@gmail.com \
--cc=uyennhi.qm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.