GNU bug report logs - #46119
28.0.50; this-error-recenter

Previous Next

Package: emacs;

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 #23 received at 46119 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 46119 <at> debbugs.gnu.org, uyennhi.qm <at> gmail.com,
 Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#46119: 28.0.50; this-error-recenter
Date: Sat, 30 Jan 2021 21:41:30 +0100 (CET)

On Sat, 30 Jan 2021, Juri Linkov wrote:

> Like the existing command scroll-other-window-down bound to 'S-C-M-v',
> a new command could be named recenter-other-window bound to 'S-C-l'.
I like that.

>> (defun this-error-recenter (&optional arg)
>>   "Recenter the current displayed error in the `next-error' buffer.
>> If called not from a `next-error' buffer, then it just calls
>> `recenter-top-bottom' in the other window."
>>   (interactive "P")
>>   (if (not (or (eq major-mode 'occur-mode) (derived-mode-p 'compilation-mode)))
>>       (with-selected-window (other-window-for-scrolling) (recenter-top-bottom arg))
>>     (funcall next-error-function 0 nil)
>>     (recenter-top-bottom arg)
>>     (pop-to-buffer next-error-last-buffer)))
>
> But then no special case is needed for occur/compilation-mode.

I expected someone will ask that; I should write my reason in the previous 
email: I like to see the pulse highlight, as with `next-error-no-select', 
that's why I call `next-error-function' here.
[I customize `next-error-highlight' and `next-error-highlight-no-select' 
to 3 s]




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.