Subject: bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6

From: Alcor <[email-masked]>
Date: Sun, 24 Nov 2024 23:25:25 +0100

1. Start from a clean Emacs installation (-Q or default config).
2. Install the latest stable version of Erc via C-u M-x package-install
erc RET (At the time of writing, this is Erc 5.6).
3. Connect to Libera.Chat under any nick.
4. Once connected, type /QUERY fsbot and hit RET.
5. Interact with the bot in any way that forces a reply (e.g. type
,greet RET).
6. Wait for the bot to reply.
7. Trigger the undo function via M-x undo or C-x u.
8. Observe as the undo affects the reply text inserted by the bot.

This is a regression from Erc 5.5, where `undo' only affected the text
typed by the user within the input prompt.

In GNU Emacs 29.4 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
 cairo version 1.16.0) of 2024-06-24 built on lcy02-amd64-050
Repository revision: 176061eb965cf945e7627ce87bb16ec5a03f8a4d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12302006
System Description: Ubuntu 24.04.1 LTS

Configured using:
 'configure --prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3
 --without-xaw3d --with-modules --with-cairo
 --with-native-compilation=aot --without-pgtk --with-xinput2
 --with-tree-sitter --with-json
 'CFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include
 -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu
 -isystem/build/emacs/stage/usr/include -O2'
 'CPPFLAGS=-isystem/build/emacs/parts/emacs/install/usr/include
 -isystem/build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu
 -isystem/build/emacs/stage/usr/include'
 'LDFLAGS=-L/build/emacs/parts/emacs/install/lib
 -L/build/emacs/parts/emacs/install/usr/lib
 -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu
 -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu
 -L/build/emacs/stage/usr/lib''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM
GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: de_DE.UTF-8
  value of $LC_NUMERIC: de_DE.UTF-8
  value of $LC_TIME: de_DE.UTF-8
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  erc-services-mode: t
  erc-ring-mode: t
  erc-notifications-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-list-mode: t
  erc-irccontrols-mode: t
  erc-keep-place-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-scrolltobottom-mode: t
  erc-imenu-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-bufbar-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-autojoin-mode: t
  erc-autoaway-mode: t
  erc-networks-mode: t
  whitespace-mode: t
  display-line-numbers-mode: t
  goto-address-mode: t
  which-key-mode: t
  winner-mode: t
  windmove-mode: t
  recentf-mode: t
  global-auto-revert-mode: t
  fido-vertical-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  fido-mode: t
  desktop-save-mode: t
  minibuffer-depth-indicate-mode: t
  pixel-scroll-precision-mode: t
  delete-selection-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/alcor/.emacs.d/elpa/transient-0.7.7/transient hides /snap/emacs/current/usr/share/emacs/29.4/lisp/transient
/home/alcor/.emacs.d/elpa/erc-5.6/erc hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc
/home/alcor/.emacs.d/elpa/erc-5.6/erc-xdcc hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-xdcc
/home/alcor/.emacs.d/elpa/erc-5.6/erc-truncate hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-truncate
/home/alcor/.emacs.d/elpa/erc-5.6/erc-track hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-track
/home/alcor/.emacs.d/elpa/erc-5.6/erc-status-sidebar hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-status-sidebar
/home/alcor/.emacs.d/elpa/erc-5.6/erc-stamp hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-stamp
/home/alcor/.emacs.d/elpa/erc-5.6/erc-spelling hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-spelling
/home/alcor/.emacs.d/elpa/erc-5.6/erc-speedbar hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-speedbar
/home/alcor/.emacs.d/elpa/erc-5.6/erc-sound hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-sound
/home/alcor/.emacs.d/elpa/erc-5.6/erc-services hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-services
/home/alcor/.emacs.d/elpa/erc-5.6/erc-sasl hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-sasl
/home/alcor/.emacs.d/elpa/erc-5.6/erc-ring hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-ring
/home/alcor/.emacs.d/elpa/erc-5.6/erc-replace hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-replace
/home/alcor/.emacs.d/elpa/erc-5.6/erc-pcomplete hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-pcomplete
/home/alcor/.emacs.d/elpa/erc-5.6/erc-page hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-page
/home/alcor/.emacs.d/elpa/erc-5.6/erc-notify hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-notify
/home/alcor/.emacs.d/elpa/erc-5.6/erc-networks hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-networks
/home/alcor/.emacs.d/elpa/erc-5.6/erc-netsplit hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-netsplit
/home/alcor/.emacs.d/elpa/erc-5.6/erc-menu hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-menu
/home/alcor/.emacs.d/elpa/erc-5.6/erc-match hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-match
/home/alcor/.emacs.d/elpa/erc-5.6/erc-log hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-log
/home/alcor/.emacs.d/elpa/erc-5.6/erc-loaddefs hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-loaddefs
/home/alcor/.emacs.d/elpa/erc-5.6/erc-list hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-list
/home/alcor/.emacs.d/elpa/erc-5.6/erc-lang hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-lang
/home/alcor/.emacs.d/elpa/erc-5.6/erc-join hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-join
/home/alcor/.emacs.d/elpa/erc-5.6/erc-imenu hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-imenu
/home/alcor/.emacs.d/elpa/erc-5.6/erc-identd hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-identd
/home/alcor/.emacs.d/elpa/erc-5.6/erc-ibuffer hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-ibuffer
/home/alcor/.emacs.d/elpa/erc-5.6/erc-goodies hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-goodies
/home/alcor/.emacs.d/elpa/erc-5.6/erc-fill hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-fill
/home/alcor/.emacs.d/elpa/erc-5.6/erc-ezbounce hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-ezbounce
/home/alcor/.emacs.d/elpa/erc-5.6/erc-desktop-notifications hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-desktop-notifications
/home/alcor/.emacs.d/elpa/erc-5.6/erc-dcc hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-dcc
/home/alcor/.emacs.d/elpa/erc-5.6/erc-compat hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-compat
/home/alcor/.emacs.d/elpa/erc-5.6/erc-common hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-common
/home/alcor/.emacs.d/elpa/erc-5.6/erc-capab hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-capab
/home/alcor/.emacs.d/elpa/erc-5.6/erc-button hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-button
/home/alcor/.emacs.d/elpa/erc-5.6/erc-backend hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-backend
/home/alcor/.emacs.d/elpa/erc-5.6/erc-autoaway hides /snap/emacs/current/usr/share/emacs/29.4/lisp/erc/erc-autoaway

Features:
(shadow sort mail-extr gnus-msg emacsbug erc-services erc-ring
erc-desktop-notifications notifications erc-nicks color erc-netsplit
erc-menu erc-list erc-goodies erc-imenu imenu erc-pcomplete erc-button
erc-fill erc-stamp erc-status-sidebar erc-track erc-match erc-join
erc-autoaway cus-start erc erc-backend erc-networks erc-common
erc-compat compat compat-30 erc-loaddefs disp-table whitespace
display-line-numbers goto-addr org-element org-persist org-id org-refile
avl-tree generator oc-basic ol-eww eww url-queue thingatpt mm-url
ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015
mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill kinsoku
url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time gnus-spec
gnus-int gnus-range message yank-media puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader gnus-win ol-docview doc-view
jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex iso8601
ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete
comint ansi-osc ansi-color org-list org-footnote org-faces org-entities
noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol
org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs org-version org-compat org-macs format-spec
leuven-dark-theme sendmail rfc2047 rfc2045 ietf-drums gnus nnheader
gnus-util text-property-search time-date mail-utils range mm-util
mail-prsvr xdg which-key use-package-ensure cus-edit pp winner windmove
recentf tree-widget wid-edit autorevert filenotify icomplete desktop
frameset mb-depth pixel-scroll cua-base ring delsel cus-load edmacro
kmacro use-package-bind-key bind-key easy-mmode use-package-core
site-start comp comp-cstr warnings icons rx cl-extra help-mode
erc-irc-format-autoloads erc-autoloads markdown-mode-autoloads
rainbow-delimiters-autoloads transient-autoloads info compat-autoloads
which-key-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 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 lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 357579 13732)
 (symbols 48 27860 0)
 (strings 32 95904 3730)
 (string-bytes 1 3061178)
 (vectors 16 50450)
 (vector-slots 8 881379 27615)
 (floats 8 532 363)
 (intervals 56 597 0)
 (buffers 984 11))