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

From: Juri Linkov <juri <at> jurta.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 46119 <at> debbugs.gnu.org, uyennhi.qm <at> gmail.com
Subject: Re: bug#46119: 28.0.50; this-error-recenter
Date: Sun, 31 Jan 2021 23:43:24 +0200
>>   (with-selected-window (other-window-for-scrolling)
>>     (recenter-top-bottom)
>>     (pulse-momentary-highlight-one-line (point)))
>>
>> and customize pulse-delay to 3 s, and pulse-iterations to 1.
>
> There is a problem: It is not guaranteed that
> Occur/Grep will scroll the right target window.  Users might have
> divided the frame in 3 or more windows.
>
> For Occur/Grep, to ensure we scroll the right window, we would need to
> let bind `other-window-scroll-buffer' to the right targets (available at
> *Occur* and *Grep* as text properties); that part complicates the code.

This is exactly what we need for bug#45688 where other-window-scroll-buffer
could help to find the previous-window where the previous error
or grep hit was displayed, and display the next error in the same window.

> The original implementation, i.e.:
> +    (funcall next-error-function 0 nil)
> +    (recenter-top-bottom arg)
> +    (pop-to-buffer next-error-last-buffer)))
>
> automatically takes care of finding the target.
>
> I'd prefer adding them as two separated entities:
> - recenter-other-window:
>   as you have suggested, including the pulse.
>
> - recenter-this-error (or this-error-recenter):
>   For occur/grep with the original proposal.
>
> Another small benefit is that for occur/grep, the pulse highlight
> automatically behaves the same as in `next-error-no-select':
> it matches only the occurrence/error.
>
> 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.




This bug report was last modified 4 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.