Subject: Re: bug#68314: 30.0.50; incorrect redisplay of contents of current line

From: Eli Zaretskii <[email-masked]>
Date: Mon, 08 Jan 2024 14:36:57 +0200

> From: Richard Stallman <[email-masked]>
> Date: Sun, 07 Jan 2024 22:44:59 -0500
> 
> 
> and found that the `e' was missing only on the screen -- the buffer
> was correct.  Therefore I typed DEL.
> 
> This bug in redisplay has been happening every few minutes this
> morning.  I did not notice it happen yesterday, which surprises me
> now.
> 
> This example is the simplest of those I have looked at recent-keys
> for.  It has NOTHING unusual!

It is hard for me to believe that there's such a fundamental problem
in redisplay.  My suggestion is to use open-termscript to record what
the display code sends to the screen, and when the problem happens
again, look for the stuff you miss on the screen in the termscript
file.  Then we will know whether the problem is that redisplay didn't
send the correct commands to the screen or that the commands were sent
correctly, but were not executed correctly by the terminal driver.

> I have a suspicion.
> 
> I get tiny pauses even in typing ordinary input, as if something
> time-consuming were running frequently between commands.
> 
> Those tiny pauses could affect how redisplay updates for these
> inserted characters, in a random, unpredictable way.

How could some processing affect redisplay?  If you have an idea how
that could happen, please tell, because I cannot imagine how it could
happen.  It is much easier for me to suspect that your system's video
driver or some other system software related to the terminal
"swallows" commands sent to the terminal.

What happens if you type "M-x redraw-display RET" -- do the "missing"
characters come back?  What happens if you suspend Emacs and then
resume it?

> I suspect this bug usually happens in the part of redisplay
> that updates the current line onl.  Once I typed DEL and
> a character two columns leftward was erased.
> 
> On the other hand, sometimes redisplkay fails to rewrite some lines,
> below point, and leaves then blank or with old contents.
> 
> The problem seems to happen mainly in mail mode.

Did you recently change anything in your system's software, like
upgraded some drivers or maybe even moved to a new system?  Did you
update your terminfo DB or something related to it?