From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#74518: 29.4; ERC 5.6: `undo' regression on Erc 5.6 Date: Sun, 24 Nov 2024 15:43:41 -0800 Message-ID: <87o724jiz6.fsf__38890.2462714881$1732491867$gmane$org@neverwas.me> References: <87iksc46cq.fsf@tilde.club> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28902"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-erc@gnu.org, 74518@debbugs.gnu.org To: Alcor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 25 00:44:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tFMH4-0007Mj-Rn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Nov 2024 00:44:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFMGq-0005LB-6B; Sun, 24 Nov 2024 18:44:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFMGp-0005Kx-GM for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 18:44:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFMGp-0006eD-8N for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 18:44:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=aP4I6WRgtW0Ds15bc6n6y3y96BG8fgYU2q7f7NuRVW0=; b=oQTwj2SHN91j4JfIheAay5cahmlW5WYHYUSLBGWZn7zk+MvmlVYKLduv9BID+XWteisF4eDNyG6ak8+X6VMKe7hevoITfNWHboWvgJxIq8eQtET50XSqobti7dEJaKmHpVtckfxGm2335qaCtSWW4uL9uHdHJUepgkCUzoITQbsFBrG/tx8BwxCDz9hfTLr7fhF9UdAZPqwLtE/GBUeQJvCKNaCiDM7P94WDTG2ZnBZnIgnMnbbmp6HJrE5vNyj4CI7nL2VeO8uaXZu9iBxwY36JyXQSIPIa6nDZSPtTwMHJmxTmYAzU6Noxcf9xX6BmvjZMx+JKKBOgvslfmArLNw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFMGn-0002Ri-Sk for bug-gnu-emacs@gnu.org; Sun, 24 Nov 2024 18:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Nov 2024 23:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74518 X-GNU-PR-Package: emacs Original-Received: via spool by 74518-submit@debbugs.gnu.org id=B74518.17324918329378 (code B ref 74518); Sun, 24 Nov 2024 23:44:01 +0000 Original-Received: (at 74518) by debbugs.gnu.org; 24 Nov 2024 23:43:52 +0000 Original-Received: from localhost ([127.0.0.1]:36500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFMGe-0002RC-3l for submit@debbugs.gnu.org; Sun, 24 Nov 2024 18:43:52 -0500 Original-Received: from mail-108-mta46.mxroute.com ([136.175.108.46]:46739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFMGZ-0002Qz-FO for 74518@debbugs.gnu.org; Sun, 24 Nov 2024 18:43:50 -0500 Original-Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta46.mxroute.com (ZoneMTA) with ESMTPSA id 193608f4d9d0003e01.001 for <74518@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 24 Nov 2024 23:43:44 +0000 X-Zone-Loop: f1ac75a5164ab05527d64756ab937b040bf552db1e27 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=aP4I6WRgtW0Ds15bc6n6y3y96BG8fgYU2q7f7NuRVW0=; b=V0C31YqyxqT7BWUbzF/AOKLeKQ /da+NYxMb4yAgPRi71NVlUDoLEHYYT6fL+I7S1Su0fkN6I6eG60oJAq6UBTzYZl9Al3DJTfAQvd2x cc4xTOTbsGy45WCLXIMOZV1V1hrdGi16tnmRXrh+hQavF05zLYH+AOutKYnfWyPX2vcd5bLnw8+fo edE/ff2Woo8u0ljrnqi5eBr+bkwe5ls71vYMEwnH93WB68n3lgxyQ/zzmHit6mUDgd2b6Pcd+4jCX Gv4IkmnZ4NucvVv4PoG2Q16tnNaJWk07QVqt6kD+fNo3uIU5vi0TOTIHK1+bC6Hv+YiYWBlzRlkOD nNljC6kA==; In-Reply-To: <87iksc46cq.fsf@tilde.club> (Alcor via General discussion about's message of "Sun, 24 Nov 2024 23:25:25 +0100") X-Authenticated-Id: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295923 Archived-At: --=-=-= Content-Type: text/plain Alcor via General discussion about ERC 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Clear-buffer-undo-list-after-sending-input-in-ERC.patch >From 45180df71fc636d086ff87d70d377263688a133f Mon Sep 17 00:00:00 2001 From: "F. Jason Park" 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 --=-=-=--