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: Tue, 02 Feb 2021 19:05:10 +0200 [thread overview]
Message-ID: <87v9baafyp.fsf@mail.linkov.net> (raw)
In-Reply-To: <874kivlhro.fsf@gmail.com> (Tino Calancha's message of "Mon, 01 Feb 2021 20:17:31 +0100")
> I am posting now the approach using two new commands:
>
> * lisp/window.el (recenter-other-window): New command.
> Bind recenter-other-window to M-C-l.
M-C-l can't be used because M-C-l is already bound to 'reposition-window'.
Only S-M-C-l is free.
> * lisp/simple.el (this-error-recenter): New command.
Wouldn't a better name be recenter-current-error
since existing name is compilation-current-error?
> +(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")
This is bad restriction that needs to be removed.
> + (funcall next-error-function 0 nil)
> + (recenter-top-bottom arg)
> + (pop-to-buffer next-error-last-buffer)))
`(pop-to-buffer next-error-last-buffer)' has problems
and should be replaced with `save-selected-window'.
Please see the commit 072b4c679dfd5528e74849cad18246730a991933
and bug#32607 for explanations.
next prev parent reply other threads:[~2021-02-02 17:05 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
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 [this message]
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=87v9baafyp.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.