unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Default behavior of C-l causes flickering on TTY frames
       [not found] <m1o85m7xie.fsf.ref@yahoo.es>
@ 2021-12-12 13:39 ` Daniel Martín
  2021-12-12 13:50   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Martín @ 2021-12-12 13:39 UTC (permalink / raw)
  To: emacs-devel


When Emacs runs on a TTY console, the common operation of recentering
the window with C-l causes some unpleasant screen flickering most of the
time.  After some investigation, I see that this happens because the
default value of the variable 'recenter-redisplay' is 'tty', which means
that C-l clears and redisplays the screen.

Is there a reason Emacs still does that by default on TTY frames?  Is
the possibility of the screen becoming garbled so common these days (on
TTY frames) that we pay the price of a redisplay on each C-l?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Default behavior of C-l causes flickering on TTY frames
  2021-12-12 13:39 ` Default behavior of C-l causes flickering on TTY frames Daniel Martín
@ 2021-12-12 13:50   ` Eli Zaretskii
  2021-12-12 14:51     ` Daniel Martín
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2021-12-12 13:50 UTC (permalink / raw)
  To: Daniel Martín; +Cc: emacs-devel

> From: Daniel Martín <mardani29@yahoo.es>
> Date: Sun, 12 Dec 2021 14:39:37 +0100
> 
> 
> When Emacs runs on a TTY console, the common operation of recentering
> the window with C-l causes some unpleasant screen flickering most of the
> time.  After some investigation, I see that this happens because the
> default value of the variable 'recenter-redisplay' is 'tty', which means
> that C-l clears and redisplays the screen.
> 
> Is there a reason Emacs still does that by default on TTY frames?

Yes, it's to redraw a potentially garbled TTY display.

> Is the possibility of the screen becoming garbled so common these
> days (on TTY frames) that we pay the price of a redisplay on each
> C-l?

Yes.

But why don't you customize that variable if you dislike the redraws
and OTOH don't have the problem with garbled displays?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Default behavior of C-l causes flickering on TTY frames
  2021-12-12 13:50   ` Eli Zaretskii
@ 2021-12-12 14:51     ` Daniel Martín
  2021-12-12 15:00       ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Martín @ 2021-12-12 14:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>
> But why don't you customize that variable if you dislike the redraws
> and OTOH don't have the problem with garbled displays?

Yes, I know.  I suppose there's a lot of variability in the
implementation quality of terminals, so this default cannot be changed.

I don't use terminal Emacs a lot, but I always thought the
flickering was a bug or a poor implementation somewhere, because I
didn't experience the same flickering effect in other terminal-based
text editors.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Default behavior of C-l causes flickering on TTY frames
  2021-12-12 14:51     ` Daniel Martín
@ 2021-12-12 15:00       ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2021-12-12 15:00 UTC (permalink / raw)
  To: Daniel Martín; +Cc: emacs-devel

> From: Daniel Martín <mardani29@yahoo.es>
> Cc: emacs-devel@gnu.org
> Date: Sun, 12 Dec 2021 15:51:41 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >
> > But why don't you customize that variable if you dislike the redraws
> > and OTOH don't have the problem with garbled displays?
> 
> Yes, I know.  I suppose there's a lot of variability in the
> implementation quality of terminals, so this default cannot be changed.

It's not just the terminals.  It's enough to C-z out of Emacs and run
something that messes up the terminal to need this feature.  It is
also consistent with other programs that have similar features: Bash,
GDB, etc.: they clear the display when you type C-l.  So having this
in Emacs requires less Emacs-specific muscle memory.

> I don't use terminal Emacs a lot, but I always thought the
> flickering was a bug or a poor implementation somewhere, because I
> didn't experience the same flickering effect in other terminal-based
> text editors.

It flickers _only_ when you manually type C-l, not when the function
is invoked from Lisp.  So it's you yourself who causes the flickering,
so to say ;-)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-12 15:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m1o85m7xie.fsf.ref@yahoo.es>
2021-12-12 13:39 ` Default behavior of C-l causes flickering on TTY frames Daniel Martín
2021-12-12 13:50   ` Eli Zaretskii
2021-12-12 14:51     ` Daniel Martín
2021-12-12 15:00       ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).