unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6
@ 2024-11-24 22:25 Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 4+ messages in thread
From: Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-24 22:25 UTC (permalink / raw)
  To: 74518; +Cc: emacs-erc


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))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6
       [not found] <87iksc46cq.fsf@tilde.club>
@ 2024-11-24 23:43 ` J.P.
       [not found] ` <87o724jiz6.fsf@neverwas.me>
  1 sibling, 0 replies; 4+ messages in thread
From: J.P. @ 2024-11-24 23:43 UTC (permalink / raw)
  To: Alcor; +Cc: emacs-erc, 74518

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Alcor via General discussion about ERC <emacs-erc@gnu.org> writes:

> 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.

Thanks for reporting this.

Hoping this patch will address the issue.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Clear-buffer-undo-list-after-sending-input-in-ERC.patch --]
[-- Type: text/x-patch, Size: 1449 bytes --]

From 45180df71fc636d086ff87d70d377263688a133f Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Sun, 24 Nov 2024 15:30:02 -0800
Subject: [PATCH] Clear buffer-undo-list after sending input in ERC

* lisp/erc/erc.el (erc-send-current-line): Set `buffer-undo-list' to nil
because it should only record editing changes in the prompt area, which
has just been cleared.  ERC did this via `erc-display-prompt' prior to
5.6, but it now leaves the prompt alone by default.  (Bug#74518)
---
 lisp/erc/erc.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 7028d0a68cc..c6978728dd6 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -8200,10 +8200,9 @@ erc-send-current-line
                   ;; Fix the buffer if the command didn't kill it
                   (when (buffer-live-p old-buf)
                     (with-current-buffer old-buf
-                      (save-restriction
-                        (widen)
-                        (let ((buffer-modified (buffer-modified-p)))
-                          (set-buffer-modified-p buffer-modified))))))
+                      (setq buffer-undo-list nil)
+                      ;; `set-buffer-modified-p' used to do this here.
+                      (force-mode-line-update))))
 
                 ;; Only when last hook has been run...
                 (run-hook-with-args 'erc-send-completed-hook str)))
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6
       [not found] ` <87o724jiz6.fsf@neverwas.me>
@ 2024-11-25  7:19   ` Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-12-02  3:52     ` J.P.
  0 siblings, 1 reply; 4+ messages in thread
From: Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-25  7:19 UTC (permalink / raw)
  To: J.P.; +Cc: emacs-erc, 74518

"J.P." <jp@neverwas.me> writes:

Hi J.P.,

> Hoping this patch will address the issue.

After applying the patch to Erc 5.6 (as released on ELPA), I can confirm
it does fix the issue. Thanks :)

Cheers,
-A.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6
  2024-11-25  7:19   ` Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-02  3:52     ` J.P.
  0 siblings, 0 replies; 4+ messages in thread
From: J.P. @ 2024-12-02  3:52 UTC (permalink / raw)
  To: Alcor; +Cc: emacs-erc, 74518-done

Alcor <alcor@tilde.club> writes:

> "J.P." <jp@neverwas.me> writes:
>
> Hi J.P.,
>
>> Hoping this patch will address the issue.
>
> After applying the patch to Erc 5.6 (as released on ELPA), I can confirm
> it does fix the issue. Thanks :)
>
> Cheers,
> -A.

Installed as

  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e0d2c6f2

Thanks and closing.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-02  3:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87iksc46cq.fsf@tilde.club>
2024-11-24 23:43 ` bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6 J.P.
     [not found] ` <87o724jiz6.fsf@neverwas.me>
2024-11-25  7:19   ` Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-02  3:52     ` J.P.
2024-11-24 22:25 Alcor via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).