help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default value of recenter-redisplay


From: John Shahid
Subject: Re: Default value of recenter-redisplay
Date: Sun, 29 Apr 2018 22:11:01 +0000
User-agent: mu4e 1.0-alpha3; emacs 27.0.50

Eli Zaretskii <address@hidden> writes:

>> From: John Shahid <address@hidden>
>> Date: Sun, 29 Apr 2018 14:10:29 +0000
>>
>> Today I decided to tackle a flicker issue that happens when the flycheck
>> error list is displayed for the current buffer(i.e. by calling
>> `flycheck-list-errors' interactively). It turns out the flickering is
>> caused by a call to recenter[1] that happens inside a flycheck
>> post-command-hook[2]. Setting `recenter-redisplay' to nil fixes the
>> issue.
>
> Btw, everything that was said about using 'recenter' to clean up the
> screen mess is only related to invoking that command interactively.
> If Flycheck needs to invoke it without causing flickering on TTYs, it
> can let-bind recenter-redisplay around the call.  Please consider
> suggesting that to the Flycheck developer(s).

I have given this more thought since my initial post. I understand
the arguments for not changing the default behavior and I support them
given that I have occasionally used C-l to redraw the frame. That said,
I would like to propose something else. I feel that `recenter' is a
primitive command that shouldn't combine more than one functionality
(i.e. recenter and redisplay). Could we either:

1. introduce a new lisp function for recentering and discourage the use
of `recenter' from lisp (i.e. declaring it `interactive-only'), or
2. add a new `recenter-and-redisplay' and bound it to C-l

My argument for the change is that the only use case for the redisplay
is when called interactively. I don't think the intention of calling
`recenter' in lisp code is to also redisplay the frame. I also find it
annoying to have to wrap every call to `recenter' in a let-bind.

cheers,

-js



reply via email to

[Prev in Thread] Current Thread [Next in Thread]