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

From: Richard Stallman <[email-masked]>
Date: Sun, 07 Jan 2024 22:44:59 -0500

Here's the input I typed (at the end of a line containing
"US streaming dis-services have deleted many programs.  ").
Then I saw that the `e' at the end of `article' was missiing.

 SPC     ;; self-insert-command
 T       ;; self-insert-command
 h       ;; self-insert-command
 i       ;; self-insert-command
 s       ;; self-insert-command
 SPC     ;; self-insert-command
 a       ;; self-insert-command
 r       ;; self-insert-command
 t       ;; self-insert-command
 i       ;; self-insert-command
 c       ;; self-insert-command
 l       ;; self-insert-command
 e       ;; self-insert-command
 SPC     ;; self-insert-command
 g       ;; self-insert-command
 i       ;; self-insert-command
 v       ;; self-insert-command
 e       ;; self-insert-command
 s       ;; self-insert-command
 RET     ;; newline
 m       ;; self-insert-command
 a       ;; self-insert-command
 n       ;; self-insert-command
 y       ;; self-insert-command
 SPC     ;; self-insert-command
 d       ;; self-insert-command
 e       ;; self-insert-command
 t       ;; self-insert-command
 a       ;; self-insert-command
 i       ;; self-insert-command
 l       ;; self-insert-command
 s       ;; self-insert-command
 .       ;; self-insert-command
 ESC DEL ;; backward-kill-word
 e       ;; self-insert-command
 x       ;; self-insert-command
 a       ;; self-insert-command
 m       ;; self-insert-command
 p       ;; self-insert-command
 l       ;; self-insert-command
 e       ;; self-insert-command
 s       ;; self-insert-command
 .       ;; self-insert-command

So I tried to fix that

 C-p     ;; previous-line
 C-e     ;; move-end-of-line
 ESC b   ;; backward-word
 C-b     ;; backward-char
 e       ;; self-insert-command
 C-l     ;; recenter-top-bottom
 DEL     ;; delete-backward-char

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!

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.

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.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 2.24.32, cairo version 1.16.0) of 2024-01-02 built on freetop
Repository revision: 1c369263db826a02e01d4209c7b6b8617971c37c
Repository branch: master
System Description: Trisquel GNU/Linux Nabia (10.0)

Configured using:
 'configure 'CFLAGS=-O0 -g' --with-gnutls=ifavailable'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GPM GSETTINGS HARFBUZZ JPEG JSON LIBOTF
LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2
XPM GTK2 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: RMAIL

Minor modes in effect:
  gpm-mouse-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: linux
  auto-encryption-mode: t
  auto-compression-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(bug-reference find-func profiler time-stamp texinfo texinfo-loaddefs
arc-mode archive-mode doc-view filenotify jka-compr image-mode exif
ffap compare-w log-edit add-log vc-hg vc-git vc-bzr vc-src vc-sccs
vc-svn smerge-mode diff-mode vc vc-dispatcher mule-diag noutline
outline icons two-column pp shadow emacsbug shortdoc comp-common
rmail-spam-filter rmailedit rmailsort undigest kmacro cl-extra
parse-time iso8601 vc-cvs vc-rcs log-view easy-mmode pcvs-util
mhtml-mode css-mode eww xdg url-queue mm-url gnus nnheader range
wid-edit color js c-ts-common cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode
facemenu format-spec battery dbus diff help-fns radix-tree mule-util
display-line-numbers grep compile etags fileloop generator xref quail
epa-mail sh-script rx smie treesit executable shell pcomplete comint
ansi-osc ring tabify imenu man ansi-color rect thingatpt help-mode
novice project misearch multi-isearch ispell textsec uni-scripts
idna-mapping ucs-normalize uni-confusable textsec-check shr pixel-fill
kinsoku url-file svg xml dom dabbrev mailalias rmailout rmailkwd qp
rmailmm message sendmail yank-media puny rfc822 mml mml-sec epa epg
epg-config gnus-util text-property-search time-date mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231
files-x dired-aux dired dired-loaddefs t-mouse term/linux view derived
disp-table advice rmailsum rmail rfc6068 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils finder-inf osm-autoloads info
compat-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win
x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer
select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk x-toolkit xinput2 x multi-tty
move-toolbar make-network-process emacs)

Memory information:
((conses 16 711365 165293) (symbols 48 21608 35)
 (strings 32 121559 15771) (string-bytes 1 2901740) (vectors 16 97591)
 (vector-slots 8 2218489 87800) (floats 8 283 617)
 (intervals 56 60611 1987) (buffers 976 93))
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)