Subject: bug#13727: 24.3.50; terminal emacs flickers when redrawing frame

From: "Jose A. Ortega Ruiz" <[email-masked]>
Date: Thu, 21 Feb 2013 07:45:04 +0100

On Sun, Feb 17 2013, Jose A. Ortega Ruiz wrote:

> On Sat, Feb 16 2013, Eli Zaretskii wrote:
>
>>> From: "Jose A. Ortega Ruiz" <[email-masked]>
>>> Date: Sat, 16 Feb 2013 02:38:51 +0100
>>> 
>>> Since a month ago, using emacs-snapshot (so pretty close to the Bzr
>>> head), in terminal mode (both in xterm and urxvt), i'm experiencing
>>> flickers and slow redraws in several modes.  Perhaps the easiest to
>>> reproduce is using Gnus with a multiwindow layout (3 windows visible:
>>> groups, message list and message body), where entering the next group
>>> (which causes almost a complete redraw) produces a very noticeable
>>> flicker, specially when the mode lines are redrawn.
>>> 
>>> For instance, right now, composing this bug report, the flicker is very
>>> noticeable (perhaps due to the special self-deletable text in the
>>> email?), although it comes and goes...
>>> 
>>> In vanilla emacs 24.2/3 the redraw is immediate and totally invisible.
>>> 
>>> I also sometimes see flickers when fontify region is doing its thing.
>>
>> Many changes went under the bridge during the last month.  Is it
>> possible for you to bisect the last month worth of revisions to find
>> the revisions that are to blame?
>
> Not right now, but next weekend i should have time for it (i need to
> learn how to do that with bzr first).
>
>> If not, can you tell how to reproduce this with fontify region?  What
>> exactly does the last sentence mean?
>
> Sorry, i was guessing there.  When composing the bug message, and
> sometimes in fontified buffers, i've got the impression of seeing the
> window redisplaying itself, and it occurred to me that that redisplay
> could be triggered by font-lock while fontifying: but it's just
> guessing.
>
>> I don't use Gnus; is there any other way to see the flickering?

Here's a way to see the flickering:

- start emacs with -daemon -Q
- open an X client (emacsclient -c)
- start composing a bug email, using report-emacs-bug
- open a terminal client (emacsclient -t), keeping the X one open
- go to the email buffer in the terminal client and modify it: every now
  and then i can see its lines repainting if i move around, but not
  always; a systematic way of making it flicker seems to be doing C-c
  C-k and, when the yes/no prompt in the minibuffer appears, start
  typing there.

HTH,
jao