GNU bug report logs -
#46119
28.0.50; this-error-recenter
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Tue, 26 Jan 2021 21:22:01 UTC
Severity: wishlist
Tags: patch
Found in version 28.0.50
Done: Tino Calancha <tino.calancha <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #47 received at 46119 <at> debbugs.gnu.org (full text, mbox):
> 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.
This bug report was last modified 4 years and 163 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.