Subject: Re: bug#57728: 29.0.50; Emacs writes wrong glyph at the bottom-right corner of text terminals

From: Eli Zaretskii <[email-masked]>
Date: Sun, 11 Sep 2022 20:23:55 +0300

> From: Akib Azmain Turja <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 11 Sep 2022 21:44:11 +0600
> 
> >>   2. M-: (or any other command that asks for a string).
> >>   3. Write some garbage until the minibuffer window scrolls.  (I used
> >>      (dotimes (i 10000) (+ (% (random) 26) ?a)) to generate the garbage
> >>      in *scratch* buffer and copied to the minibuffer, but you can write
> >>      anything you want.)
> >
> > Will this do:
> >
> >   M-: ssssssssssssssssssssssssssssssssssssssssssssssssssss
> >
> > (keep typing 's' until you get past the right edge of the window, and
> > the minibuffer resizes to be 2 screen lines instead of just one)?
> 
> I don't think so.  Emacs redisplay optimizations will optimize away many
> things.

I don't understand why redisplay optimizations matter.  No
optimizations can prevent me from typing enough characters to exceed
the width of the window, at which point the line will be continued on
the next screen line, and the mini-window will be resized.

> Try to write random character like 'asn,csr,.jwsarcwasr,.cp'
> and repeat it (kill and yank yank yank...) until the mini window fills
> and scrolls some lines (maybe ten).  Make sure that
> (window-max-chars-per-line) is not a multiple of the length of the base
> string (which you killed).

I don't understand why this would be needed, because ...

> >>   5. You should now see that the last character cell (i.e. the character
> >>      cell on the bottom-left corner) contains a continuation ('\')
> >>      glyph.
> >
> > Bottom-left corner or bottom-right corner?  If bottom-right, then this
> > '\' is the continuation glyph, telling you that the line is continued
> > on the next screen line.
> 
> Ah, my mistake.  It is the bottom-right corner.

Then that '\' is the continuation glyph.  Why does it surprise you?

> >> I hope this is clearer.
> >
> > Unfortunately, not really.
> 
> Is it clear enough now?

Not yet.

Let me turn the table and ask you: why do you think that '\' is not
the usual continuation glyph that Emacs always produces when the width
of a screen line on a TTY frame is exceeded?