From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 15:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23785@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146617576829206 (code B ref -1); Fri, 17 Jun 2016 15:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jun 2016 15:02:48 +0000 Received: from localhost ([127.0.0.1]:44403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDvIF-0007az-PA for submit@debbugs.gnu.org; Fri, 17 Jun 2016 11:02:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDvID-0007an-IS for submit@debbugs.gnu.org; Fri, 17 Jun 2016 11:02:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDvI7-0003zk-C9 for submit@debbugs.gnu.org; Fri, 17 Jun 2016 11:02:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvI7-0003zf-9O for submit@debbugs.gnu.org; Fri, 17 Jun 2016 11:02:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvI5-0002HS-CB for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 11:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDvI0-0003vl-Jm for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 11:02:36 -0400 Received: from mail.muc.de ([193.149.48.3]:40029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDvI0-0003uG-9E for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 11:02:32 -0400 Received: (qmail 86867 invoked by uid 3782); 17 Jun 2016 15:02:30 -0000 Received: from acm.muc.de (p548C685D.dip0.t-ipconnect.de [84.140.104.93]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 17 Jun 2016 17:02:29 +0200 Received: (qmail 6855 invoked by uid 1000); 17 Jun 2016 15:02:45 -0000 Date: Fri, 17 Jun 2016 15:02:45 +0000 Message-ID: <20160617150245.GB3316@acm.fritz.box> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello, Emacs. Summary: `undo' is broken in Emacs 25. In GNU Emacs 25.0.94.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) of 2016-06-07 built on acm Repository revision: 9d5ccebeba0506f7280662630f0ee85a52c8a327 Configured using: 'configure --with-tiff=no --with-gif=no --with-gpm' 1. emacs -Q 2. C-x C-f decls-6.cc ; file is attached. 3. Move point to BOL 17. 4. C-o, and insert the line "Type var = init;". Call this line 16½. 5. M-x revert-buffer. 6. Move point to "[" on L16, and use C-M-k to delete "[3 * peq]". 7. C-_. This restores "[3 * peq]" (correctly) but also reinserts line 16½ (which is a bug). [For reference, the pertinent part of the file looks like this. In the actual file "Type" is at column zero: 14. Type var = init, x = Type(); 15. Type (*var) = init; 16. Type var[3 * peq] = init; 16½. Type var = init; <======== inserted line. 17. Type (var) = init; 18. Type int = "int"; // int ]. -- Alan Mackenzie (Nuremberg, Germany). --G4iJoqBmSsgzjUCe Content-Type: text/x-c; charset=us-ascii Content-Disposition: attachment; filename="decls-6.cc" __INLINE__ FOO Type var, x; __INLINE__ FOO Type *var; __INLINE__ FOO Type var[3 * peq]; // This is an init paren that currently incorrectly causes the // variable to be recognized as a function. __INLINE__ FOO Type var (peq); __INLINE__ FOO Type var = init, x = Type(); __INLINE__ FOO Type (*var) = init; __INLINE__ FOO Type var[3 * peq] = init; __INLINE__ FOO Type var int = "int"; // int Type var = init, x = Type(); Type (*var) = init; Type var[3 * peq] = init; Type (var) = init; Type int = "int"; // int const Type var; const Type (*var); const Type var[3 * peq]; const Type (var); Type (*foo) (Type *, Type (*)[x], Type (*var)[x], // An incorrect one that gets "var" recorded as a type. Type (var*)[x], Type &); Type2 var; Type var; Type (*var); // Currently treated as function call. Type (*var)[3]; Type var[3 * peq]; Type (var); // Currently treated as function call. Type (var)(); ::Type var; unsigned foo bar; long long x; long double y; int x y; // Invalid int int y; // Invalid // This should be last to check a certain case. #define low_assign_multiset_index(TO, NODE) do { \ struct svalue *_ms_index_to2_ = (TO); \ } while (0) --G4iJoqBmSsgzjUCe-- From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 23785@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14661836698999 (code B ref 23785); Fri, 17 Jun 2016 17:15:02 +0000 Received: (at 23785) by debbugs.gnu.org; 17 Jun 2016 17:14:29 +0000 Received: from localhost ([127.0.0.1]:44460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDxLg-0002L5-TE for submit@debbugs.gnu.org; Fri, 17 Jun 2016 13:14:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDxLf-0002Kr-4u for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 13:14:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDxLV-00037q-Mq for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 13:14:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDxLV-00037a-Jg; Fri, 17 Jun 2016 13:14:17 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4555 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bDxLT-00084h-S4; Fri, 17 Jun 2016 13:14:16 -0400 Date: Fri, 17 Jun 2016 20:15:18 +0300 Message-Id: <83r3bvbuu1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20160617150245.GB3316@acm.fritz.box> (message from Alan Mackenzie on Fri, 17 Jun 2016 15:02:45 +0000) References: <20160617150245.GB3316@acm.fritz.box> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Date: Fri, 17 Jun 2016 15:02:45 +0000 > From: Alan Mackenzie > > Summary: `undo' is broken in Emacs 25. > > In GNU Emacs 25.0.94.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) > of 2016-06-07 built on acm > Repository revision: 9d5ccebeba0506f7280662630f0ee85a52c8a327 > Configured using: > 'configure --with-tiff=no --with-gif=no --with-gpm' > > 1. emacs -Q > 2. C-x C-f decls-6.cc ; file is attached. > 3. Move point to BOL 17. > 4. C-o, and insert the line "Type var = init;". Call this line 16½. > 5. M-x revert-buffer. > 6. Move point to "[" on L16, and use C-M-k to delete "[3 * peq]". > 7. C-_. This restores "[3 * peq]" (correctly) but also reinserts line > 16½ (which is a bug). Why does this minor issue deserve to declare 'undo' "broken"? Looks like an exaggeration to me. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 17:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146618552711737 (code B ref 23785); Fri, 17 Jun 2016 17:46:01 +0000 Received: (at 23785) by debbugs.gnu.org; 17 Jun 2016 17:45:27 +0000 Received: from localhost ([127.0.0.1]:44470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDxpe-00033E-Ol for submit@debbugs.gnu.org; Fri, 17 Jun 2016 13:45:26 -0400 Received: from mail.muc.de ([193.149.48.3]:27370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDxpb-000333-Fx for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 13:45:25 -0400 Received: (qmail 40561 invoked by uid 3782); 17 Jun 2016 17:45:22 -0000 Received: from acm.muc.de (p548C685D.dip0.t-ipconnect.de [84.140.104.93]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 17 Jun 2016 19:45:20 +0200 Received: (qmail 8145 invoked by uid 1000); 17 Jun 2016 17:45:35 -0000 Date: Fri, 17 Jun 2016 17:45:35 +0000 Message-ID: <20160617174535.GD3316@acm.fritz.box> References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <83r3bvbuu1.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hello, Eli. On Fri, Jun 17, 2016 at 08:15:18PM +0300, Eli Zaretskii wrote: > > Date: Fri, 17 Jun 2016 15:02:45 +0000 > > From: Alan Mackenzie > > Summary: `undo' is broken in Emacs 25. > > In GNU Emacs 25.0.94.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) > > of 2016-06-07 built on acm > > Repository revision: 9d5ccebeba0506f7280662630f0ee85a52c8a327 > > Configured using: > > 'configure --with-tiff=no --with-gif=no --with-gpm' > > 1. emacs -Q > > 2. C-x C-f decls-6.cc ; file is attached. > > 3. Move point to BOL 17. > > 4. C-o, and insert the line "Type var = init;". Call this line 16½. > > 5. M-x revert-buffer. > > 6. Move point to "[" on L16, and use C-M-k to delete "[3 * peq]". > > 7. C-_. This restores "[3 * peq]" (correctly) but also reinserts line > > 16½ (which is a bug). > Why does this minor issue deserve to declare 'undo' "broken"? Looks > like an exaggeration to me. I don't think it's all that minor an issue. `undo' can no longer be depended upon to restore a buffer to its unchanged state. I've suffered several similar annoyances with `undo' in the emacs-25 branch. Each buffer changing command is meant to have its own undo boundary (with the exception of self-insert-command and the single character deleting command). And having to undo/redo command sequences by hand is _very_ irritating when testing. I think there's a case to be made for fixing this bug for Emacs 25.1. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 20:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: 23785@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146619398924894 (code B ref 23785); Fri, 17 Jun 2016 20:07:01 +0000 Received: (at 23785) by debbugs.gnu.org; 17 Jun 2016 20:06:29 +0000 Received: from localhost ([127.0.0.1]:44521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE028-0006TS-NZ for submit@debbugs.gnu.org; Fri, 17 Jun 2016 16:06:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33945) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE027-0006TB-H9 for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 16:06:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bE01y-0000bt-8C for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 16:06:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bE01y-0000bn-5B; Fri, 17 Jun 2016 16:06:18 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4648 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bE01w-0001M4-5F; Fri, 17 Jun 2016 16:06:16 -0400 Date: Fri, 17 Jun 2016 23:07:18 +0300 Message-Id: <83oa6zbmvd.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20160617174535.GD3316@acm.fritz.box> (message from Alan Mackenzie on Fri, 17 Jun 2016 17:45:35 +0000) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Date: Fri, 17 Jun 2016 17:45:35 +0000 > Cc: 23785@debbugs.gnu.org > From: Alan Mackenzie > > > > 1. emacs -Q > > > 2. C-x C-f decls-6.cc ; file is attached. > > > 3. Move point to BOL 17. > > > 4. C-o, and insert the line "Type var = init;". Call this line 16½. > > > 5. M-x revert-buffer. > > > 6. Move point to "[" on L16, and use C-M-k to delete "[3 * peq]". > > > 7. C-_. This restores "[3 * peq]" (correctly) but also reinserts line > > > 16½ (which is a bug). > > > Why does this minor issue deserve to declare 'undo' "broken"? Looks > > like an exaggeration to me. > > I don't think it's all that minor an issue. You are being unreasonably subjective on this one. > `undo' can no longer be depended upon to restore a buffer to its > unchanged state. Undo is about undoing changes, and it is documented to lump several changes together in some situations. So your expectations are unreasonably unrealistic to begin with. > Each buffer changing command is meant to have its own undo boundary > (with the exception of self-insert-command and the single character > deleting command). I don't think this is true, and in any case see no big difference between several commands each deleting one character and a single command deleting several characters at once. > I think there's a case to be made for fixing this bug for Emacs 25.1. It depends on what the fix will look like. If it's simple and safe enough, I'll agree. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 21:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146619864132316 (code B ref 23785); Fri, 17 Jun 2016 21:25:01 +0000 Received: (at 23785) by debbugs.gnu.org; 17 Jun 2016 21:24:01 +0000 Received: from localhost ([127.0.0.1]:44552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE1FB-0008P7-9s for submit@debbugs.gnu.org; Fri, 17 Jun 2016 17:24:01 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:47324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE1F9-0008Oq-BR for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 17:23:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=5+CCJovaI/p3QAAYYVRxFcmdyzLnyRboEy7DvGYT/cs=; b=kfJ8pj9bOKKHKOs2YhpmvZiE2q LOo+VWgTH82iLV4Voz/lsAWEaOAvYY2dg2GoSFP6cPg/s/E5PPrZjU7faNQ46FUcc/HrPKmv2VJlW RfCAgmDdK5KX/na1GD+SQ6BLt3DRG7NYbYQGb2iQHru6QePmNLbBZbiQA9LkVsEmWRU8gwx8YPIsc vOIL3TJW7JUkp1qkSUxziZ44BGI4xIhn0G6lTy1HpewPB44W6u9l/BqFy9YrKyIvX9xryBy27oBK5 AvG7dcJhJiT+yqHoQAxNlhFSy5WmDmgcfYlQcCmdbIMifup/izMdWsHcsE4RbIIJCwBuv2llMZVIb UAyfdEMw==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:50418 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bE1F3-001XCT-0N; Fri, 17 Jun 2016 22:23:53 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> Date: Fri, 17 Jun 2016 22:23:51 +0100 In-Reply-To: <20160617174535.GD3316@acm.fritz.box> (Alan Mackenzie's message of "Fri, 17 Jun 2016 17:45:35 +0000") Message-ID: <877fdny0ew.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Alan Mackenzie writes: > Hello, Eli. > > On Fri, Jun 17, 2016 at 08:15:18PM +0300, Eli Zaretskii wrote: >> > Date: Fri, 17 Jun 2016 15:02:45 +0000 >> > From: Alan Mackenzie > >> > Summary: `undo' is broken in Emacs 25. > >> > In GNU Emacs 25.0.94.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) >> > of 2016-06-07 built on acm >> > Repository revision: 9d5ccebeba0506f7280662630f0ee85a52c8a327 >> > Configured using: >> > 'configure --with-tiff=3Dno --with-gif=3Dno --with-gpm' > >> > 1. emacs -Q >> > 2. C-x C-f decls-6.cc ; file is attached. >> > 3. Move point to BOL 17. >> > 4. C-o, and insert the line "Type var =3D init;". Call this line 16= =C2=BD. >> > 5. M-x revert-buffer. >> > 6. Move point to "[" on L16, and use C-M-k to delete "[3 * peq]". >> > 7. C-_. This restores "[3 * peq]" (correctly) but also reinserts line >> > 16=C2=BD (which is a bug). > >> Why does this minor issue deserve to declare 'undo' "broken"? Looks >> like an exaggeration to me. > > I don't think it's all that minor an issue. `undo' can no longer be > depended upon to restore a buffer to its unchanged state. > > I've suffered several similar annoyances with `undo' in the emacs-25 > branch. If you report them, then I will look at them, and I would appreciate if you do report them. I changed undo in a way that *was* supposed to change its semantics, and this may have had negative side effects. Or my changes may have caused unexpected changes in semantics that I did not intend. > Each buffer changing command is meant to have its own undo boundary > (with the exception of self-insert-command and the single character > deleting command). The problem in this case seems to be specific to revert-buffer. A much simpler test case is as follows 1) Open a file with a single line in it 2) Add a new line at the start 3) M-x revert-buffer Look at buffer-undo-list *** Before undo changes (nil ("\n" . -1) (# . -1) (# . -1) (# . -1) nil (1 . 2) (t 22372 26717 127527 392000)) *** After undo changes (("\n" . -1) (# . -1) (# . -1) nil (1 . 2) (t 22372 26717 127527 392000)) So, the issue seems to be specific to M-x revert-buffer. After my changes, the list no longer has a undo-boundary as its first element. Got to be honest, I am surprised that M-x revert-buffer maintains the undo-list; I'd have expected it to blitz the whole list, but it doesn't. No idea why, although I suspect that it's the same issue Stefan found with viper -- undo-boundary no longer gets called after all commands only those that change the buffer. I will investigate. Phil From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Stefan Monnier Cc: Alan Mackenzie , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14662000511975 (code B ref 23785); Fri, 17 Jun 2016 21:48:01 +0000 Received: (at 23785) by debbugs.gnu.org; 17 Jun 2016 21:47:31 +0000 Received: from localhost ([127.0.0.1]:44562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE1bu-0000Vn-Lb for submit@debbugs.gnu.org; Fri, 17 Jun 2016 17:47:30 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:48327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE1bs-0000VX-Bc for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 17:47:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=TG1uuc/JweNswVRl8BdkBWLqzVXNrwekJsxy8duPuGQ=; b=1706RxTEl4j3ZMZX9KwK7/yh07 SsmpTvjoxBgynFXJ4suxgkB0iuj3UQs1ucxuPy0QEb3qP5fF0frGX1d0jf+++O3asvTfaEpIIDH9I iLyV3zpiFp8/AaZPjjegMv4fn7HaR7IniAxBbMOJ3zz3EJLv5VdOSGQUksZWQn3k4SfzJ/V1b6UWy RDlacT4h4KU8LYYZOloix9oAXSblLR6Cu5WfyaNXgumfGEcn8Hdw7Ve1oU+3heDbobM2qQjWB9hRX TyzRtlIQIxKDpD6FcGqmf0hKQbF830K9HHtG0oLzLbPvEw/9WqeOiE6q9xLKfIJEjNl3uRIBU9oRT cJlAEFLQ==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:50444 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bE1bl-001awA-Nb; Fri, 17 Jun 2016 22:47:21 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> Date: Fri, 17 Jun 2016 22:47:20 +0100 In-Reply-To: <83oa6zbmvd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Jun 2016 23:07:18 +0300") Message-ID: <87ziqjwkrb.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> I think there's a case to be made for fixing this bug for Emacs 25.1. > > It depends on what the fix will look like. If it's simple and safe > enough, I'll agree. The following patch addresses the issue in my hands. I'd welcome confirmation. Stefan what do you think? You suggested something like this for Bug#22295 also. I think that the problem is the same; if I read insert-file-contents correctly, it disables collection of undo information. I may well be reading it wrong though. Given that this has turned up in two places now, it may be a wider problem, and the more general solution might be the better one. It might also invalidate the necessity for 12e009e52, but I haven't tested that yet. Alternatively, revert-buffer could just force undo-boundary. Phil --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-missing-undo-boundary-after-revert-buffer.patch >From 2ab1f314ad6fe0e68420cc510445495467d82b8f Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Fri, 17 Jun 2016 22:34:50 +0100 Subject: [PATCH] Fix missing undo-boundary after revert-buffer * lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after every command whether it (apparently) changes the buffer or not. Addresses Bug#23785 --- lisp/simple.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index b66827d..3110430 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2875,6 +2875,10 @@ undo-auto--boundaries "Check recently changed buffers and add a boundary if necessary. REASON describes the reason that the boundary is being added; see `undo-last-boundary' for more information." + ;; (Bug #23785) All commands should ensure that there is an undo + ;; boundary whether they have changed the current buffer or not. + (when (eq cause 'command) + (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))) (dolist (b undo-auto--undoably-changed-buffers) (when (buffer-live-p b) (with-current-buffer b -- 2.8.4 --=-=-=-- From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 21:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie Cc: Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14662002022211 (code B ref 23785); Fri, 17 Jun 2016 21:51:02 +0000 Received: (at 23785) by debbugs.gnu.org; 17 Jun 2016 21:50:02 +0000 Received: from localhost ([127.0.0.1]:44566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE1eM-0000ZY-3g for submit@debbugs.gnu.org; Fri, 17 Jun 2016 17:50:02 -0400 Received: from smtp21.acens.net ([86.109.99.145]:57031 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE1eK-0000Z0-FN for 23785@debbugs.gnu.org; Fri, 17 Jun 2016 17:50:01 -0400 X-CTCH-RefID: str=0001.0A0B0207.57647081.00A8, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (217.125.182.141) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 574060E70161AAF6; Fri, 17 Jun 2016 21:49:53 +0000 From: =?UTF-8?Q?=C3=93scar?= Fuentes References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> Date: Fri, 17 Jun 2016 23:49:52 +0200 In-Reply-To: <20160617174535.GD3316@acm.fritz.box> (Alan Mackenzie's message of "Fri, 17 Jun 2016 17:45:35 +0000") Message-ID: <87inx7iiyn.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Alan Mackenzie writes: > I don't think it's all that minor an issue. `undo' can no longer be > depended upon to restore a buffer to its unchanged state. > > I've suffered several similar annoyances with `undo' in the emacs-25 > branch. Me too, although I'm not sure about Emacs being the culprit. I use Evil and it adds some heuristics on top of Emacs'. > Each buffer changing command is meant to have its own undo boundary > (with the exception of self-insert-command and the single character > deleting command). > > And having to undo/redo command sequences by hand is _very_ irritating > when testing. Only when testing? :-) I've observed cases where sequences of char inserts were undone one at a time and cases where entire edit sessions across multiple areas of the file vanished with one `undo'. > I think there's a case to be made for fixing this bug for Emacs 25.1. FWIW, this is the change that enabled keeping the undo log after revert-buffer (a feature I asked for, BTW): commit 22513e526eba97bd1014e4bacde0a8649fbe7870 Author: Stefan Monnier Date: Tue May 28 21:07:53 2013 -0400 * src/fileio.c (Finsert_file_contents): Preserve undo info when reverting a buffer. Fixes: debbugs:8447 From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 04:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: Alan Mackenzie , Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146622511212983 (code B ref 23785); Sat, 18 Jun 2016 04:46:01 +0000 Received: (at 23785) by debbugs.gnu.org; 18 Jun 2016 04:45:12 +0000 Received: from localhost ([127.0.0.1]:44678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE888-0003NK-Ih for submit@debbugs.gnu.org; Sat, 18 Jun 2016 00:45:12 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE886-0003NC-J2 for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 00:45:11 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u5I4jCsh010360; Sat, 18 Jun 2016 00:45:12 -0400 Received: by ceviche.home (Postfix, from userid 20848) id BBDDA661DE; Sat, 18 Jun 2016 00:46:44 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> Date: Sat, 18 Jun 2016 00:46:44 -0400 In-Reply-To: <87ziqjwkrb.fsf@russet.org.uk> (Phillip Lord's message of "Fri, 17 Jun 2016 22:47:20 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5709=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5709> : inlines <4940> : streams <1653781> : uri <2233217> X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) > Stefan what do you think? You suggested something like this for > Bug#22295 also. I think that the problem is the same; if I read > insert-file-contents correctly, it disables collection of undo > information. I may well be reading it wrong though. Looks OK to me, yes. > Given that this has turned up in two places now, it may be a wider > problem, and the more general solution might be the better one. It > might also invalidate the necessity for 12e009e52, but I haven't > tested that yet. It probably makes 12e009e52 unnecessary, indeed, but I'd argue that it is wrong of viper-adjust-undo to remove the topmost undo-boundary, so IMO we should keep 12e009e52 (if not in emacs-25 at least in master). Similarly I think it's still a bug that revert-buffer removes a pre-existing undo-boundary (even if that bug ends up hidden by adding current-buffer unconditionally in undo-auto--boundaries). Stefan From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 07:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146623644530247 (code B ref 23785); Sat, 18 Jun 2016 07:55:02 +0000 Received: (at 23785) by debbugs.gnu.org; 18 Jun 2016 07:54:05 +0000 Received: from localhost ([127.0.0.1]:44697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEB4u-0007rn-RO for submit@debbugs.gnu.org; Sat, 18 Jun 2016 03:54:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEB4t-0007rK-KM for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 03:54:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEB4l-0004Lh-DJ for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 03:53:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEB4l-0004Ld-9o; Sat, 18 Jun 2016 03:53:55 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1055 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bEB4j-0006rc-Bq; Sat, 18 Jun 2016 03:53:53 -0400 Date: Sat, 18 Jun 2016 10:54:56 +0300 Message-Id: <83eg7vaq3z.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87ziqjwkrb.fsf@russet.org.uk> (phillip.lord@russet.org.uk) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: Alan Mackenzie , 23785@debbugs.gnu.org > Date: Fri, 17 Jun 2016 22:47:20 +0100 > > The following patch addresses the issue in my hands. I'd welcome > confirmation. > > Stefan what do you think? You suggested something like this for > Bug#22295 also. I think that the problem is the same; if I read > insert-file-contents correctly, it disables collection of undo > information. I may well be reading it wrong though. > > Given that this has turned up in two places now, it may be a wider > problem, and the more general solution might be the better one. It might > also invalidate the necessity for 12e009e52, but I haven't tested that > yet. > > Alternatively, revert-buffer could just force undo-boundary. > > >From 2ab1f314ad6fe0e68420cc510445495467d82b8f Mon Sep 17 00:00:00 2001 > From: Phillip Lord > Date: Fri, 17 Jun 2016 22:34:50 +0100 > Subject: [PATCH] Fix missing undo-boundary after revert-buffer > > * lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after > every command whether it (apparently) changes the buffer or not. > > Addresses Bug#23785 > --- > lisp/simple.el | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lisp/simple.el b/lisp/simple.el > index b66827d..3110430 100644 > --- a/lisp/simple.el > +++ b/lisp/simple.el > @@ -2875,6 +2875,10 @@ undo-auto--boundaries > "Check recently changed buffers and add a boundary if necessary. > REASON describes the reason that the boundary is being added; see > `undo-last-boundary' for more information." > + ;; (Bug #23785) All commands should ensure that there is an undo > + ;; boundary whether they have changed the current buffer or not. > + (when (eq cause 'command) > + (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))) > (dolist (b undo-auto--undoably-changed-buffers) > (when (buffer-live-p b) > (with-current-buffer b I'd indeed suggest to have on emacs-25 a change that only affects revert-buffer, and have the above on master. It sounds too scary to make a change that affects all commands this late in the pretest. Thanks. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Phillip Lord Cc: Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14662716867189 (code B ref 23785); Sat, 18 Jun 2016 17:42:01 +0000 Received: (at 23785) by debbugs.gnu.org; 18 Jun 2016 17:41:26 +0000 Received: from localhost ([127.0.0.1]:45368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEKFK-0001rs-Ba for submit@debbugs.gnu.org; Sat, 18 Jun 2016 13:41:26 -0400 Received: from mail.muc.de ([193.149.48.3]:59003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEKFJ-0001ri-2f for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 13:41:25 -0400 Received: (qmail 46150 invoked by uid 3782); 18 Jun 2016 17:41:24 -0000 Received: from acm.muc.de (p548C67AF.dip0.t-ipconnect.de [84.140.103.175]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 18 Jun 2016 19:41:22 +0200 Received: (qmail 6026 invoked by uid 1000); 18 Jun 2016 17:41:36 -0000 Date: Sat, 18 Jun 2016 17:41:36 +0000 Message-ID: <20160618174136.GC5796@acm.fritz.box> References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <877fdny0ew.fsf@russet.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877fdny0ew.fsf@russet.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hello, Phil. On Fri, Jun 17, 2016 at 10:23:51PM +0100, Phillip Lord wrote: > Alan Mackenzie writes: > > I don't think it's all that minor an issue. `undo' can no longer be > > depended upon to restore a buffer to its unchanged state. > > I've suffered several similar annoyances with `undo' in the emacs-25 > > branch. > If you report them, then I will look at them, and I would appreciate if > you do report them. For example, at times I've deleted a character, moved point, then deleted another character. Undo has undone both deletions as a single operation, despite the point movement between them. > I changed undo in a way that *was* supposed to change its semantics, > and this may have had negative side effects. Or my changes may have > caused unexpected changes in semantics that I did not intend. The lack of configurability seems to be a problem. There have been times, testing times, when I've felt that each deletion of a character is its own atomic operation. Yet I can't configure undo to respect this wish. [ .... ] > I will investigate. > Phil -- Alan Mackenzie (Nuremberg, Germany). From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 18:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 23785@debbugs.gnu.org, Phillip Lord Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146627533719623 (code B ref 23785); Sat, 18 Jun 2016 18:43:02 +0000 Received: (at 23785) by debbugs.gnu.org; 18 Jun 2016 18:42:17 +0000 Received: from localhost ([127.0.0.1]:45405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bELCC-00056R-VM for submit@debbugs.gnu.org; Sat, 18 Jun 2016 14:42:17 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:43323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bELCA-00056D-Vz for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 14:42:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+FgA731xV/0P0SC1cgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FtQQjhBQigngBAQE X-IPAS-Result: A0A+FgA731xV/0P0SC1cgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FtQQjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="241822216" Received: from 45-72-244-67.cpe.teksavvy.com (HELO pastel.home) ([45.72.244.67]) by ironport2-out.teksavvy.com with ESMTP; 18 Jun 2016 14:42:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9A5A964BF4; Sat, 18 Jun 2016 14:42:07 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> Date: Sat, 18 Jun 2016 14:42:07 -0400 In-Reply-To: <83eg7vaq3z.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Jun 2016 10:54:56 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I'd indeed suggest to have on emacs-25 a change that only affects > revert-buffer, and have the above on master. It sounds too scary to > make a change that affects all commands this late in the pretest. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] 1.0 FSL_HELO_HOME No description available. -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I'd indeed suggest to have on emacs-25 a change that only affects > revert-buffer, and have the above on master. It sounds too scary to > make a change that affects all commands this late in the pretest. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 FSL_HELO_HOME No description available. 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders > I'd indeed suggest to have on emacs-25 a change that only affects > revert-buffer, and have the above on master. It sounds too scary to > make a change that affects all commands this late in the pretest. FWIW, this change you say is scary brings the behavior much closer to that of Emacs<25, so I think it's the safer choice. Stefan From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 19:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: acm@muc.de, 23785@debbugs.gnu.org, phillip.lord@russet.org.uk Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146627648721645 (code B ref 23785); Sat, 18 Jun 2016 19:02:01 +0000 Received: (at 23785) by debbugs.gnu.org; 18 Jun 2016 19:01:27 +0000 Received: from localhost ([127.0.0.1]:45433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bELUk-0005d3-Rb for submit@debbugs.gnu.org; Sat, 18 Jun 2016 15:01:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bELUi-0005cn-Di for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 15:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bELUa-0007Vg-Aq for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 15:01:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bELUa-0007Va-7S; Sat, 18 Jun 2016 15:01:16 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1972 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bELUX-0008Fm-2P; Sat, 18 Jun 2016 15:01:14 -0400 Date: Sat, 18 Jun 2016 22:02:07 +0300 Message-Id: <83bn2y9v80.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Stefan Monnier on Sat, 18 Jun 2016 14:42:07 -0400) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: Stefan Monnier > Cc: phillip.lord@russet.org.uk (Phillip Lord), acm@muc.de, 23785@debbugs.gnu.org > Date: Sat, 18 Jun 2016 14:42:07 -0400 > > > I'd indeed suggest to have on emacs-25 a change that only affects > > revert-buffer, and have the above on master. It sounds too scary to > > make a change that affects all commands this late in the pretest. > > FWIW, this change you say is scary brings the behavior much closer > to that of Emacs<25, so I think it's the safer choice. My concern is not with the behavior the proposed change intends to get us, the concern is with the unintended consequences of the change. At this late stage, I'd like to keep the risk of unintended consequences to the minimum, unless we want this change so badly we agree to extend the pretesting by another month or two. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 23785@debbugs.gnu.org, phillip.lord@russet.org.uk Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146627954326268 (code B ref 23785); Sat, 18 Jun 2016 19:53:02 +0000 Received: (at 23785) by debbugs.gnu.org; 18 Jun 2016 19:52:23 +0000 Received: from localhost ([127.0.0.1]:45456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEMI3-0006pc-0Z for submit@debbugs.gnu.org; Sat, 18 Jun 2016 15:52:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:60967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEMI0-0006pO-0E for 23785@debbugs.gnu.org; Sat, 18 Jun 2016 15:52:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+FgA731xV/0P0SC1cgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWHgUFCws0EhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtAQS1BCOEFCKCeAEBAQ X-IPAS-Result: A0A+FgA731xV/0P0SC1cgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWHgUFCws0EhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtAQS1BCOEFCKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="241903351" Received: from 45-72-244-67.cpe.teksavvy.com (HELO pastel.home) ([45.72.244.67]) by ironport2-out.teksavvy.com with ESMTP; 18 Jun 2016 15:52:14 -0400 Received: by pastel.home (Postfix, from userid 20848) id B657D64BE9; Sat, 18 Jun 2016 15:52:13 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> Date: Sat, 18 Jun 2016 15:52:13 -0400 In-Reply-To: <83bn2y9v80.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Jun 2016 22:02:07 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > My concern is not with the behavior the proposed change intends to get > us, the concern is with the unintended consequences of the change. At > this late stage, I'd like to keep the risk of unintended consequences > to the minimum, unless we want this change so badly we agree to extend > the pretesting by another month or two. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] 1.0 FSL_HELO_HOME No description available. -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > My concern is not with the behavior the proposed change intends to get > us, the concern is with the unintended consequences of the change. At > this late stage, I'd like to keep the risk of unintended consequences > to the minimum, unless we want this change so badly we agree to extend > the pretesting by another month or two. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 FSL_HELO_HOME No description available. 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders > My concern is not with the behavior the proposed change intends to get > us, the concern is with the unintended consequences of the change. At > this late stage, I'd like to keep the risk of unintended consequences > to the minimum, unless we want this change so badly we agree to extend > the pretesting by another month or two. Yes, that's the other side of the coin, indeed. Stefan From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: "Phillip Lord" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jun 2016 22:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Stefan Monnier" Cc: acm@muc.de, Eli Zaretskii , 23785@debbugs.gnu.org, phillip.lord@russet.org.uk Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146637635329792 (code B ref 23785); Sun, 19 Jun 2016 22:46:02 +0000 Received: (at 23785) by debbugs.gnu.org; 19 Jun 2016 22:45:53 +0000 Received: from localhost ([127.0.0.1]:46772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bElTU-0007kS-MO for submit@debbugs.gnu.org; Sun, 19 Jun 2016 18:45:52 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:50909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bElTS-0007kC-Mg for 23785@debbugs.gnu.org; Sun, 19 Jun 2016 18:45:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Cc:To:From:Subject: Date:References:In-Reply-To:Message-ID; bh=9m1kPH+4Vt7lTWHABOWCOtZsUk5RD3TNjIfDJwy4dvg=; b=IjrpU0Xk7FSpN9tlMoJs54beot QKJUUUwLBEQihj916Bv7eTwuNe0N0WD0FB/VehPA4daGGF6HHxomvD0QQmrhcmnE4Dhr3GpaezYWc wmCOth6IayZxWLsPxqgfFzAhMAMaauXLuDNoXZdaUCU8T4NPhOV2yqjzjj5EUGf2sb5kKczKgbs7Y kOCEFv3bbKoaH9c2ASjeQ9FpahDPzmkCDzv2VwZ39KWnKcge3VJBjp/pBTj7cY3rVch/CwClOYfM1 ET/A7ELmZ+JCMrP1cSapMsVXk4dahQYEwsYM45Sx3GtzklhPfjZ9Ktgwe3FkDMcai27p9XUNK+aMk 79qg0G9A==; Received: from [127.0.0.1] (port=40300 helo=cloud103.planethippo.com) by cloud103.planethippo.com with esmtpa (Exim 4.86_1) (envelope-from ) id 1bElTL-000Rqz-Vm; Sun, 19 Jun 2016 23:45:44 +0100 Received: from 77.98.219.118 ([77.98.219.118]) (SquirrelMail authenticated user phillip.lord@russet.org.uk) by cloud103.planethippo.com with HTTP; Sun, 19 Jun 2016 23:45:44 +0100 Message-ID: In-Reply-To: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> Date: Sun, 19 Jun 2016 23:45:44 +0100 From: "Phillip Lord" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20160619234543_99489" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) ------=_20160619234543_99489 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit On Sat, June 18, 2016 8:52 pm, Stefan Monnier wrote: >> My concern is not with the behavior the proposed change intends to get >> us, the concern is with the unintended consequences of the change. At >> this late stage, I'd like to keep the risk of unintended consequences to >> the minimum, unless we want this change so badly we agree to extend the >> pretesting by another month or two. > > Yes, that's the other side of the coin, indeed. Attached are another two patches which also solve the issue. One adds an undo boundary specifically in revert-buffer. Works but is questionable in that revert-buffer is pluggable -- it can call any function, other than the default. The other fiddles with insert-file-contents and adds an undo. It is this function that has specialized handling for the undo list that is causing the problem. My patch in this case is questionable in that I have randomly pushed a call to undo-boundary near the end. It should probably be somewere better. Another possibility would be to have insert-file-contents call "undo-auto--undoable-change" -- this is the root cause of the problem. Changes are happening. Also attached is a test case which demonstrates the problem. So many possibilities! ------=_20160619234543_99489 Content-Type: text/x-patch; name="0001-Fix-missing-undo-boundary-after-revert-buffer.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Fix-missing-undo-boundary-after-revert-buffer.patch" >From 4250d150cfce6cd461dc6475bac08d7587842e84 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Sun, 19 Jun 2016 21:34:58 +0100 Subject: [PATCH] Fix missing undo-boundary after revert-buffer - lisp/files.el (revert-buffer): Ensure an undo-boundary after completion. Addresses Bug#23785 --- lisp/files.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 1f97fa5..c5d2bab 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5533,7 +5533,10 @@ revert-buffer (let ((revert-buffer-in-progress-p t) (revert-buffer-preserve-modes preserve-modes)) (funcall (or revert-buffer-function #'revert-buffer--default) - ignore-auto noconfirm))) + ignore-auto noconfirm) + ;; Ensure that we have a undo-boundary after reversion (see Bug + ;; #23785) + (undo-boundary))) (defun revert-buffer--default (ignore-auto noconfirm) "Default function for `revert-buffer'. -- 2.9.0 ------=_20160619234543_99489 Content-Type: text/x-patch; name="0001-Fix-missing-undo-boundary-on-revert.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Fix-missing-undo-boundary-on-revert.patch" >From 1b2cd06f4b6f993052632e24c50209816314c004 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Sun, 19 Jun 2016 23:33:22 +0100 Subject: [PATCH] Fix missing undo-boundary on revert But badly, because I have pushed the undo_boundary call into a fairly random place in a very long function. --- src/fileio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fileio.c b/src/fileio.c index b11f923..e01045e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4500,6 +4500,10 @@ by calling `format-decode', which see. */) current_buffer->newline_cache, PT - BEG, Z - PT - inserted); + /* Random push an undo boundary here because I don't know where else + to put this call */ + Fundo_boundary(); + if (read_quit) Fsignal (Qquit, Qnil); -- 2.9.0 ------=_20160619234543_99489 Content-Type: text/x-emacs-lisp; name="revert-buffer-tests.el" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="revert-buffer-tests.el" (require 'ert) (ert-deftest undo-after-revert-buffer () (should-not (unwind-protect (progn (find-file "simple-file.txt") (goto-char (point-min)) (insert "\n") (revert-buffer t t) (undo-auto--needs-boundary-p)) (kill-buffer (get-file-buffer "simple-file.txt"))))) ------=_20160619234543_99489 Content-Type: text/plain; name="simple-file.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="simple-file.txt" line one ------=_20160619234543_99489-- From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 00:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Phillip Lord" Cc: acm@muc.de, Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14663842868935 (code B ref 23785); Mon, 20 Jun 2016 00:59:02 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 00:58:06 +0000 Received: from localhost ([127.0.0.1]:46820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEnXN-0002Je-0I for submit@debbugs.gnu.org; Sun, 19 Jun 2016 20:58:06 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEnXK-0002JU-Ma for 23785@debbugs.gnu.org; Sun, 19 Jun 2016 20:57:59 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u5K0vtbJ025822; Sun, 19 Jun 2016 20:57:55 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 1E80C6614D; Sun, 19 Jun 2016 20:59:33 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> Date: Sun, 19 Jun 2016 20:59:33 -0400 In-Reply-To: (Phillip Lord's message of "Sun, 19 Jun 2016 23:45:44 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5711=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5711> : inlines <4940> : streams <1654777> : uri <2234330> X-Spam-Score: -1.8 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) > The other fiddles with insert-file-contents and adds an undo. It is this > function that has specialized handling for the undo list that is causing > the problem. My patch in this case is questionable in that I have randomly > pushed a call to undo-boundary near the end. It should probably be > somewere better. Indeed, the problem is not that insert-file-contents fails to add a boundary, but rather that it removes an existing one, so we should figure out where/why it removes it and change the code to push one back after removing it. > Another possibility would be to have insert-file-contents call > "undo-auto--undoable-change" -- this is the root cause of the problem. Figuring out why undo-auto--undoable-change isn't called for it would be good as well, indeed. After all, it runs after-change-functions, so it should call undo-auto--undoable-change. Stefan From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: "Undo" overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?=C3=93scar?= Fuentes Cc: Alan Mackenzie , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146642601312477 (code B ref 23785); Mon, 20 Jun 2016 12:34:02 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 12:33:33 +0000 Received: from localhost ([127.0.0.1]:47176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEyOT-0003FA-1g for submit@debbugs.gnu.org; Mon, 20 Jun 2016 08:33:33 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:33257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEyOQ-0003Ev-NH for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 08:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=n71brAGFonPGjCXP812RWlD7XtRcwnWT0SycLaGpskY=; b=QQsmLk8bjRbWPGQ/zh4ELP3ofi Riq30GH7IQ0IALqSqjGOCJ6qT+Atygf21Woq0M66yvuLz0BeAM38ScOsEZHPyEd8QyEdwaxl2opJg BRoKTxb85cG1u5RC/XAZiz2ismYzmBAwQQZhjNWzg7YbF6biJj9h64NP06tayJO4lYuTwodop1vzM a0xFadn7//2HeAULx4wTu7ciT2+womTq5iVDwG/GX9L86CxO8FDzlp27IvH+Im8QWWFqQ3tb7ahQq tC0ivB2YvtG0hu9e08pNaPVhR1p4wPQ0BKrW7XtIWEQsI7/cSN3/dNrxzedCWOAN25j+QbaZc2Dtm Yli4HNKQ==; Received: from janus-nat-128-240-225-83.ncl.ac.uk ([128.240.225.83]:33020 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_1) (envelope-from ) id 1bEyOK-002toG-N2; Mon, 20 Jun 2016 13:33:24 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <87inx7iiyn.fsf@wanadoo.es> Date: Mon, 20 Jun 2016 13:33:23 +0100 In-Reply-To: <87inx7iiyn.fsf@wanadoo.es> ("=?UTF-8?Q?=C3=93scar?= Fuentes"'s message of "Fri, 17 Jun 2016 23:49:52 +0200") Message-ID: <878ty0ca5o.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) =C3=93scar Fuentes writes: > Alan Mackenzie writes: > >> I don't think it's all that minor an issue. `undo' can no longer be >> depended upon to restore a buffer to its unchanged state. >> >> I've suffered several similar annoyances with `undo' in the emacs-25 >> branch. > > Me too, although I'm not sure about Emacs being the culprit. I use Evil > and it adds some heuristics on top of Emacs'. Do let me know if you find any. It would be nice it evil worked out of the box with the new release! Phil From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 12:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: acm@muc.de, Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146642688713783 (code B ref 23785); Mon, 20 Jun 2016 12:49:02 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 12:48:07 +0000 Received: from localhost ([127.0.0.1]:47187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEycZ-0003aF-KK for submit@debbugs.gnu.org; Mon, 20 Jun 2016 08:48:07 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:33797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEycY-0003Zl-13 for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 08:48:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=2lpJY7BkuhMRZOAzPC1bULjuUZEgo1R24fX0pBd/7ng=; b=bi4du3ZciAwlAM1F/kclh83caY qy+3VYpE9Ataww1tY/zpX3mPqTvUdoYEaSGeCo+3rxBVvKy04RM0QATmOYIbrsJyqZt63G/+VGhom gDuMu3j+jZD5C166EwDcM1C7O2m4AxmOz1aHMHPEp0E6QkB5ETWTYK7cpZwBxwUvSJ1/W1JtC4Lnb iAxXVFgssoRCkKgmtU9xNpBoPRdINWbPW/+2IH0dvyn09W6SW8PeQyBPt2U9QOHTp9vCAtH5dFDnE 8b+BEqElF/6Xa21S3IVUbltTtcNOUvgM4FCFRgoFbAkvcMEo2EDAagzBOl6/7/G5eJ7PgcWLfMHQf eoNrTHvA==; Received: from janus-nat-128-240-225-83.ncl.ac.uk ([128.240.225.83]:32800 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_1) (envelope-from ) id 1bEycS-002w0d-5k; Mon, 20 Jun 2016 13:48:00 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> Date: Mon, 20 Jun 2016 13:47:59 +0100 In-Reply-To: (Stefan Monnier's message of "Sun, 19 Jun 2016 20:59:33 -0400") Message-ID: <874m8oc9hc.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stefan Monnier writes: >> The other fiddles with insert-file-contents and adds an undo. It is this >> function that has specialized handling for the undo list that is causing >> the problem. My patch in this case is questionable in that I have randomly >> pushed a call to undo-boundary near the end. It should probably be >> somewere better. > > Indeed, the problem is not that insert-file-contents fails to add > a boundary, but rather that it removes an existing one, so we should > figure out where/why it removes it and change the code to push one back > after removing it. I don't understand why you say this. AFAICT, the problem is that the buffer-undo-list doesn't have a nil after the command has happened. >> Another possibility would be to have insert-file-contents call >> "undo-auto--undoable-change" -- this is the root cause of the problem. > > Figuring out why undo-auto--undoable-change isn't called for it would be > good as well, indeed. After all, it runs after-change-functions, so > it should call undo-auto--undoable-change. I think that it does -- it calls "insert_from_buffer" which then calls "prepare_to_modify_buffer". I *think* what is happening is that prepare_to_modify_buffer is being called when buffer-undo-list is specbound to t -- hence the change does not register as undoable change. I am somewhat guessing here. Phil From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 14:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, 23785@debbugs.gnu.org, Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146643145321229 (code B ref 23785); Mon, 20 Jun 2016 14:05:02 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 14:04:13 +0000 Received: from localhost ([127.0.0.1]:47793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEzoD-0005WL-JJ for submit@debbugs.gnu.org; Mon, 20 Jun 2016 10:04:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:46684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEzoA-0005W4-36 for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 10:04:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+FgA731xV/0P0SC1cgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNiFsIzyMBAQEBBgEBAQEeizqFBQeELQWfF5IUg1kjhBQigngBAQE X-IPAS-Result: A0A+FgA731xV/0P0SC1cgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNiFsIzyMBAQEBBgEBAQEeizqFBQeELQWfF5IUg1kjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="244719247" Received: from 45-72-244-67.cpe.teksavvy.com (HELO pastel.home) ([45.72.244.67]) by ironport2-out.teksavvy.com with ESMTP; 20 Jun 2016 10:04:01 -0400 Received: by pastel.home (Postfix, from userid 20848) id 485ED64C54; Mon, 20 Jun 2016 10:04:01 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <874m8oc9hc.fsf@russet.org.uk> Date: Mon, 20 Jun 2016 10:04:01 -0400 In-Reply-To: <874m8oc9hc.fsf@russet.org.uk> (Phillip Lord's message of "Mon, 20 Jun 2016 13:47:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I don't understand why you say this. AFAICT, the problem is that the > buffer-undo-list doesn't have a nil after the command has happened. Hmm... I thought I had seen a trace showing that there was a nil before the revert-buffer that then disappeared. But it looks like I misremember. Sorry. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] 1.0 FSL_HELO_HOME No description available. -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I don't understand why you say this. AFAICT, the problem is that the > buffer-undo-list doesn't have a nil after the command has happened. Hmm... I thought I had seen a trace showing that there was a nil before the revert-buffer that then disappeared. But it looks like I misremember. Sorry. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [206.248.154.181 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] 1.0 FSL_HELO_HOME No description available. 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders > I don't understand why you say this. AFAICT, the problem is that the > buffer-undo-list doesn't have a nil after the command has happened. Hmm... I thought I had seen a trace showing that there was a nil before the revert-buffer that then disappeared. But it looks like I misremember. Sorry. > I think that it does -- it calls "insert_from_buffer" which then calls > "prepare_to_modify_buffer". > I *think* what is happening is that prepare_to_modify_buffer is being > called when buffer-undo-list is specbound to t -- hence the change does > not register as undoable change. That would be a good explanation, indeed. So I guess your patch is the right fix. Thank you. Stefan From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 15:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Stefan Monnier" Cc: acm@muc.de, Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.1466435050369 (code B ref 23785); Mon, 20 Jun 2016 15:05:02 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 15:04:10 +0000 Received: from localhost ([127.0.0.1]:47845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF0kE-00005s-2y for submit@debbugs.gnu.org; Mon, 20 Jun 2016 11:04:10 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:39695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF0kC-00005f-Er for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 11:04:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:References:Message-ID :Date:In-Reply-To:Subject:Cc:To:From; bh=dt57BGTyY1d8t8c2rcKnWrjmEove9tsNCj42mXV+VHY=; b=McYSmCzrIzMpoAJhn9hmCt1PKa OkwnAiTxX05XXTETiz9sjG5sfeUnvkpO7ZJ39NgAIGwbLF8aXt99F7Jsq+pkfoxw157rDnnEeFg7a OdqE4eBwoC5axbbjVYtObGlbgKANYmmCH17Btplnex0c7IEf53sgRA8UAzlMmtaQ2TX7NVP5KFcDv dxDw7adau/shG7RF/2pL1ckcpFrymLw5YL31I3A7L3Xb2dG/1h32Z/vCw4euz82NcsgmMLUXWVBE6 88n9XpG/iTzYQ18EELYeSGX70O48zLZELVhzUeqA2YpnNJq/V6ZJIAVkt5yERwQH7jSTP8rU40Tka brn6OP6w==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32765 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bF0k6-003ID7-7M; Mon, 20 Jun 2016 16:04:02 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) In-Reply-To: (Phillip Lord's message of "Sun, 19 Jun 2016 23:45:44 +0100") Date: Mon, 20 Jun 2016 16:03:35 +0100 Message-ID: <87vb13ewc8.fsf@russet.org.uk> References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) "Phillip Lord" writes: > On Sat, June 18, 2016 8:52 pm, Stefan Monnier wrote: >>> My concern is not with the behavior the proposed change intends to get >>> us, the concern is with the unintended consequences of the change. At >>> this late stage, I'd like to keep the risk of unintended consequences to >>> the minimum, unless we want this change so badly we agree to extend the >>> pretesting by another month or two. >> >> Yes, that's the other side of the coin, indeed. > > So many possibilities! So, final patch possibility -- this one, I think directly fixes the problem -- it ensures that the changes in the buffer result in an undoable change. It's probably less efficient (cause the undo-list will be created, then dumped), but is the most minimal change. My suggestion: this patch goes to Emacs-25. And the previous patch (which automatically adds an undo boundary to current-buffer regardless of changes), goes to master. Phil From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 15:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14664369313269 (code B ref 23785); Mon, 20 Jun 2016 15:36:01 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 15:35:31 +0000 Received: from localhost ([127.0.0.1]:47882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF1EZ-0000qf-HB for submit@debbugs.gnu.org; Mon, 20 Jun 2016 11:35:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF1EX-0000qS-L8 for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 11:35:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF1EO-0001Pw-6P for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 11:35:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF1EO-0001Oy-35; Mon, 20 Jun 2016 11:35:20 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3606 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bF1EG-0006VZ-Vo; Mon, 20 Jun 2016 11:35:13 -0400 Date: Mon, 20 Jun 2016 18:34:18 +0300 Message-Id: <83wplj7u2t.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87vb13ewc8.fsf@russet.org.uk> (phillip.lord@russet.org.uk) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: "Eli Zaretskii" , acm@muc.de, 23785@debbugs.gnu.org > Date: Mon, 20 Jun 2016 16:03:35 +0100 > > My suggestion: this patch goes to Emacs-25. What patch? From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2016 17:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146644275724369 (code B ref 23785); Mon, 20 Jun 2016 17:13:01 +0000 Received: (at 23785) by debbugs.gnu.org; 20 Jun 2016 17:12:37 +0000 Received: from localhost ([127.0.0.1]:47960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF2kX-0006Kz-8x for submit@debbugs.gnu.org; Mon, 20 Jun 2016 13:12:37 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:45229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bF2kW-0006Ki-9w for 23785@debbugs.gnu.org; Mon, 20 Jun 2016 13:12:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=CzNvevihT3xjJTRQcncAkg8c35hLuELLP6f75XJLIDw=; b=AHO3d8nVX8yTYZObMLyB3SJur1 /OioEXO1xJ4bBeSzSvEyybStXOg7kNCbfnKD6/vxm/GEJ5MXsopL8l0HF63gcRMWZ7ji6l57zzrb2 bdfOWSaMz9QIgGUcLHebHWsBgV7w+tKonqGT1V+0/IFDAfHYhVdSOn86E0sQ60oadGMtkQDdwT/K0 3R35xEjrPRQe0aPhB96bf4gBePBJRFwmupTObbdH2oYtt3Dc19g9LtH5Y7a0MTMJd3xX2p6Hr6oRp y05PdajtemWlGiD9AsCjQffVTpRo8bYWnhoL3qIj3T/ZoVRcr7tLJyRJBX6bxkK3kJ4O0lE/TpD9X KbMfEPHg==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32346 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bF2kQ-003dRC-1x; Mon, 20 Jun 2016 18:12:30 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> Date: Mon, 20 Jun 2016 18:12:29 +0100 In-Reply-To: <83wplj7u2t.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Jun 2016 18:34:18 +0300") Message-ID: <8737o7aio2.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Cc: "Eli Zaretskii" , acm@muc.de, 23785@debbugs.gnu.org >> Date: Mon, 20 Jun 2016 16:03:35 +0100 >> >> My suggestion: this patch goes to Emacs-25. > > What patch? Eli, do pay attention! The one that I didn't attach obviously. Phil --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Ensure-undo-boundary-after-insert-file-contents.patch >From a77a8683cddf918869b63fc3242ae594b186cc94 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Mon, 20 Jun 2016 14:26:02 +0100 Subject: [PATCH] Ensure undo-boundary after insert-file-contents. * src/fileio.c: Record undoable change during insert-file-contents. Addresses Bug #23785. --- src/fileio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fileio.c b/src/fileio.c index b11f923..9fc1bd8 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4047,8 +4047,16 @@ by calling `format-decode', which see. */) being called in insert_from_buffer (via in prepare_to_modify_buffer). */ specbind (intern ("buffer-file-name"), Qnil); + + /* + Temporarily enable the undo-buffer to ensure that the change + is marked as an undoable one. Bug #23785. + */ + bset_undo_list(current_buffer,Qnil); insert_from_buffer (XBUFFER (conversion_buffer), same_at_start_charpos, inserted_chars, 0); + bset_undo_list(current_buffer,Qt); + /* Set `inserted' to the number of inserted characters. */ inserted = PT - temp; /* Set point before the inserted characters. */ -- 2.9.0 --=-=-=-- From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 13:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146651513412891 (code B ref 23785); Tue, 21 Jun 2016 13:19:01 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 13:18:54 +0000 Received: from localhost ([127.0.0.1]:48792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLZt-0003Lr-SB for submit@debbugs.gnu.org; Tue, 21 Jun 2016 09:18:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLZs-0003Lc-20 for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 09:18:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFLZj-0002Vp-2P for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 09:18:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFLZi-0002VU-VI; Tue, 21 Jun 2016 09:18:42 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4782 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFLZg-0001TK-Vc; Tue, 21 Jun 2016 09:18:41 -0400 Date: Tue, 21 Jun 2016 16:17:50 +0300 Message-Id: <83fus67kap.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <8737o7aio2.fsf@russet.org.uk> (phillip.lord@russet.org.uk) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> <8737o7aio2.fsf@russet.org.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: monnier@iro.umontreal.ca, acm@muc.de, 23785@debbugs.gnu.org > Date: Mon, 20 Jun 2016 18:12:29 +0100 > > >> From: phillip.lord@russet.org.uk (Phillip Lord) > >> Cc: "Eli Zaretskii" , acm@muc.de, 23785@debbugs.gnu.org > >> Date: Mon, 20 Jun 2016 16:03:35 +0100 > >> > >> My suggestion: this patch goes to Emacs-25. > > > > What patch? > > Eli, do pay attention! The one that I didn't attach obviously. Thanks, please push to the emacs-25 branch, with one change: > + /* > + Temporarily enable the undo-buffer to ensure that the change > + is marked as an undoable one. Bug #23785. > + */ Please format this comment according to our style. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 13:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146651519312994 (code B ref 23785); Tue, 21 Jun 2016 13:20:02 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 13:19:53 +0000 Received: from localhost ([127.0.0.1]:48796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLar-0003NW-5e for submit@debbugs.gnu.org; Tue, 21 Jun 2016 09:19:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFLaq-0003NJ-4F for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 09:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFLah-0002i1-2T for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 09:19:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFLag-0002h9-V8; Tue, 21 Jun 2016 09:19:42 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4783 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFLad-0001Z8-CZ; Tue, 21 Jun 2016 09:19:41 -0400 Date: Tue, 21 Jun 2016 16:18:40 +0300 Message-Id: <83eg7q7k9b.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87vb13ewc8.fsf@russet.org.uk> (phillip.lord@russet.org.uk) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: "Eli Zaretskii" , acm@muc.de, 23785@debbugs.gnu.org > Date: Mon, 20 Jun 2016 16:03:35 +0100 > > My suggestion: this patch goes to Emacs-25. And the previous patch > (which automatically adds an undo boundary to current-buffer regardless > of changes), goes to master. So can you please show the "previous" patch? There were too many of them. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146651939520594 (code B ref 23785); Tue, 21 Jun 2016 14:30:02 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 14:29:55 +0000 Received: from localhost ([127.0.0.1]:49862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFMgd-0005M5-9Y for submit@debbugs.gnu.org; Tue, 21 Jun 2016 10:29:55 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:50757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFMgb-0005Ls-V4 for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 10:29:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=dY1Th23vT4qYiUJJhcLzjPgKZ3IJNXcNDWatR1mfQfM=; b=a0/FvsrxGx2lhD2m6SqIqZ0M7V yH/Rv+GW9mc3Il+j2+6a8qTmwZuZMRmvyluAyZXaie0GLh93b4qR/3CgSnZX9guDsMhLjCisId50D gQcDuBz+N9gy1NqmbXs6nioTq9gUgKLZJkMJktUNhNSrJsiYg/+GMDPflcVQf3FAqCI0Ud6si9du1 D35CxPesxiqjvpXnRw2A0LdXbN+OGvPZF9Gx508Z1ayhk/kRZeAek6ahZqODMwrF+AKmy0xZfbKup Bb0u6y+vHkCtKTLoAE/eFmO0CUQRYf3KxDYTu67Cr9rtC6LaeIrWgICtaVSNifWgDbxO0bAN/LWTv 1yvrjtug==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:33343 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bFMgV-002bDo-Lh; Tue, 21 Jun 2016 15:29:47 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83eg7q7k9b.fsf@gnu.org> Date: Tue, 21 Jun 2016 15:29:47 +0100 In-Reply-To: <83eg7q7k9b.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Jun 2016 16:18:40 +0300") Message-ID: <87ziqety1w.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Cc: "Eli Zaretskii" , acm@muc.de, 23785@debbugs.gnu.org >> Date: Mon, 20 Jun 2016 16:03:35 +0100 >> >> My suggestion: this patch goes to Emacs-25. And the previous patch >> (which automatically adds an undo boundary to current-buffer regardless >> of changes), goes to master. > > So can you please show the "previous" patch? There were too many of > them. This one, to master. >>From 2ab1f314ad6fe0e68420cc510445495467d82b8f Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Fri, 17 Jun 2016 22:34:50 +0100 Subject: [PATCH] Fix missing undo-boundary after revert-buffer * lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after every command whether it (apparently) changes the buffer or not. Addresses Bug#23785 --- lisp/simple.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index b66827d..3110430 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2875,6 +2875,10 @@ undo-auto--boundaries "Check recently changed buffers and add a boundary if necessary. REASON describes the reason that the boundary is being added; see `undo-last-boundary' for more information." + ;; (Bug #23785) All commands should ensure that there is an undo + ;; boundary whether they have changed the current buffer or not. + (when (eq cause 'command) + (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))) (dolist (b undo-auto--undoably-changed-buffers) (when (buffer-live-p b) (with-current-buffer b -- 2.8.4 From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146651945420774 (code B ref 23785); Tue, 21 Jun 2016 14:31:01 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 14:30:54 +0000 Received: from localhost ([127.0.0.1]:49867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFMhZ-0005P0-NW for submit@debbugs.gnu.org; Tue, 21 Jun 2016 10:30:53 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:50807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFMhY-0005Oo-K4 for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 10:30:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=vmADU5P3HDui1dV5MERP+s9vBWmrWgoJgz2gdu0YYcM=; b=BSD+9I0Xoi50hpnpIk9bHi7VbW MbndYtvPL7tUqbPsmZiwvJY3E7AvQjatuY2KgpCNlRrdmpy8sePCMxav/8sgAIGgvAyp2D7sPCGlO m/Dxk2rLr+QjrxyaHqa91WGu7CnPyhX5aGdL6fD7NmYwVzDJtXoQsU+22FYBGSsp4Wzyjx5Srbqn/ al6j9N6rn0PqmRLofXAIvSLj0Yp2WApP9oBbD83F9D5GtmudiiXnJ2vLkjj29C5PFCcSPIVvAILMj Su5f3Sr/vNElRAjPpzUO9FZ8p91kYMP87A4ZOUMCa8Doz5XswAraNTZsla7tgUz37+r2trYJTjQMt gIYMGI4g==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:33104 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bFMhS-002bOo-Uv; Tue, 21 Jun 2016 15:30:47 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> <8737o7aio2.fsf@russet.org.uk> <83fus67kap.fsf@gnu.org> Date: Tue, 21 Jun 2016 15:30:46 +0100 In-Reply-To: <83fus67kap.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Jun 2016 16:17:50 +0300") Message-ID: <87vb12ty09.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Cc: monnier@iro.umontreal.ca, acm@muc.de, 23785@debbugs.gnu.org >> Date: Mon, 20 Jun 2016 18:12:29 +0100 >> >> >> From: phillip.lord@russet.org.uk (Phillip Lord) >> >> Cc: "Eli Zaretskii" , acm@muc.de, 23785@debbugs.gnu.org >> >> Date: Mon, 20 Jun 2016 16:03:35 +0100 >> >> >> >> My suggestion: this patch goes to Emacs-25. >> > >> > What patch? >> >> Eli, do pay attention! The one that I didn't attach obviously. > > Thanks, please push to the emacs-25 branch, with one change: > >> + /* >> + Temporarily enable the undo-buffer to ensure that the change >> + is marked as an undoable one. Bug #23785. >> + */ > > Please format this comment according to our style. Okay. Stefan, can you have a quick look as well. This function is well out of my depth of understanding. Phil From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 16:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, 23785@debbugs.gnu.org, monnier@iro.umontreal.ca Reply-To: Eli Zaretskii Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.146652565930405 (code B ref 23785); Tue, 21 Jun 2016 16:15:01 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 16:14:19 +0000 Received: from localhost ([127.0.0.1]:49988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFOJb-0007uG-US for submit@debbugs.gnu.org; Tue, 21 Jun 2016 12:14:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFOJa-0007u4-UC for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 12:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFOJR-0001DM-Gd for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 12:14:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFOJR-0001D6-Di; Tue, 21 Jun 2016 12:14:05 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4994 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFOJP-00079T-7u; Tue, 21 Jun 2016 12:14:03 -0400 Date: Tue, 21 Jun 2016 19:13:10 +0300 Message-Id: <83twgm5xm1.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87ziqety1w.fsf@russet.org.uk> (phillip.lord@russet.org.uk) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83eg7q7k9b.fsf@gnu.org> <87ziqety1w.fsf@russet.org.uk> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: monnier@iro.umontreal.ca, acm@muc.de, 23785@debbugs.gnu.org > Date: Tue, 21 Jun 2016 15:29:47 +0100 > > This one, to master. > > >From 2ab1f314ad6fe0e68420cc510445495467d82b8f Mon Sep 17 00:00:00 2001 > From: Phillip Lord > Date: Fri, 17 Jun 2016 22:34:50 +0100 > Subject: [PATCH] Fix missing undo-boundary after revert-buffer > > * lisp/simple.el (undo-auto--boundaries): Ensure an undo-boundary after > every command whether it (apparently) changes the buffer or not. > > Addresses Bug#23785 > --- > lisp/simple.el | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lisp/simple.el b/lisp/simple.el > index b66827d..3110430 100644 > --- a/lisp/simple.el > +++ b/lisp/simple.el > @@ -2875,6 +2875,10 @@ undo-auto--boundaries > "Check recently changed buffers and add a boundary if necessary. > REASON describes the reason that the boundary is being added; see > `undo-last-boundary' for more information." > + ;; (Bug #23785) All commands should ensure that there is an undo > + ;; boundary whether they have changed the current buffer or not. > + (when (eq cause 'command) > + (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))) > (dolist (b undo-auto--undoably-changed-buffers) > (when (buffer-live-p b) > (with-current-buffer b OK. From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 21:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: acm@muc.de, Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.1466544316498 (code B ref 23785); Tue, 21 Jun 2016 21:26:02 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 21:25:16 +0000 Received: from localhost ([127.0.0.1]:50121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFTAZ-00007y-PY for submit@debbugs.gnu.org; Tue, 21 Jun 2016 17:25:15 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFTAW-00007p-PI for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 17:25:13 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u5LLP9kN024043; Tue, 21 Jun 2016 17:25:10 -0400 Received: by pastel.home (Postfix, from userid 20848) id ACD9C60053; Tue, 21 Jun 2016 17:25:29 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> <8737o7aio2.fsf@russet.org.uk> Date: Tue, 21 Jun 2016 17:25:29 -0400 In-Reply-To: <8737o7aio2.fsf@russet.org.uk> (Phillip Lord's message of "Mon, 20 Jun 2016 18:12:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5713=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5713> : inlines <4942> : streams <1655768> : uri <2235465> X-Spam-Score: -2.8 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > + /* > + Temporarily enable the undo-buffer to ensure that the change > + is marked as an undoable one. Bug #23785. > + */ > + bset_undo_list(current_buffer,Qnil); Additionally to Eli's remark about the shape of your comments, please also put spaces before open parens and after commas. > insert_from_buffer (XBUFFER (conversion_buffer), > same_at_start_charpos, inserted_chars, 0); > + bset_undo_list(current_buffer,Qt); Instead of two bset_undo_list, you could use a single specbind since the above code is almost immediately followed by unbind_to. But more seriously, I'm wondering: where is undo-list set to t (and hence causing the problem we're seeing)? Searching for "undo" in that function gives m the impression that undo-0list won't be set to t during the call to insert_from_buffer. What am I missing? Stefan From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jun 2016 22:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: acm@muc.de, Eli Zaretskii , 23785@debbugs.gnu.org Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.14665469484357 (code B ref 23785); Tue, 21 Jun 2016 22:10:02 +0000 Received: (at 23785) by debbugs.gnu.org; 21 Jun 2016 22:09:08 +0000 Received: from localhost ([127.0.0.1]:50126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFTr2-00018D-9V for submit@debbugs.gnu.org; Tue, 21 Jun 2016 18:09:08 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:43892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFTr0-00017i-H1 for 23785@debbugs.gnu.org; Tue, 21 Jun 2016 18:09:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=+clmjO0/vky4PaYAsBaa6dlzJeSFebD8zE5kRJveIK4=; b=uzQHaPQV496ccnEgkSHDhIxjL4 z26Mrh9tm4Q74io/P0yiVJdIhnY+cjJ5l4W8NlWZ35UQeFjmgEOPqv4zvdi1trlCHi6gxec2U3Qvx B2+dsUI7ScS/XeiYZiXx2Y8bFUsil9xqXjmLtgzECcnFw7AkbdcVJyFKqLvJzVb/CgA4zvTljJIU9 ZXmbO5mghCGKXhvoDX2RA45saOFFB+7gWec9uQo4IgR/gcRexTBhQl62w5IGW5aNr//AiwXT1y9nU Wku1a1FxluGjHKfkkyqz39jM8NMmJz3M9TiE1zeBTFkqYXTu+RIW23cAa3WGL2TtZSlw7w88kE5n/ ASSxZYzw==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:36909 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bFTqu-003jlq-07; Tue, 21 Jun 2016 23:09:00 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> <8737o7aio2.fsf@russet.org.uk> Date: Tue, 21 Jun 2016 23:08:59 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 21 Jun 2016 17:25:29 -0400") Message-ID: <87twgmfb44.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stefan Monnier writes: >> + /* >> + Temporarily enable the undo-buffer to ensure that the change >> + is marked as an undoable one. Bug #23785. >> + */ >> + bset_undo_list(current_buffer,Qnil); > > Additionally to Eli's remark about the shape of your comments, please > also put spaces before open parens and after commas. Oh, dear, I took Eli's okay and commited. I always was over enthusiastic. I think I better revert. > >> insert_from_buffer (XBUFFER (conversion_buffer), >> same_at_start_charpos, inserted_chars, 0); >> + bset_undo_list(current_buffer,Qt); > > Instead of two bset_undo_list, you could use a single specbind since the > above code is almost immediately followed by unbind_to. I tried that specbind (intern("buffer-undo-list"), Qnil); > But more seriously, I'm wondering: where is undo-list set to t (and > hence causing the problem we're seeing)? > Searching for "undo" in that function gives m the impression that > undo-0list won't be set to t during the call to insert_from_buffer. > What am I missing? It's set in several places to Qt, then restored at the end here. if (!empty_undo_list_p) { bset_undo_list (current_buffer, old_undo); if (CONSP (old_undo) && inserted != old_inserted) { /* Adjust the last undo record for the size change during the format conversion. */ Lisp_Object tem = XCAR (old_undo); if (CONSP (tem) && INTEGERP (XCAR (tem)) && INTEGERP (XCDR (tem)) && XFASTINT (XCDR (tem)) == PT + old_inserted) XSETCDR (tem, make_number (PT + inserted)); } } At least that was my theory; I tested it by adding print statements to run_undoable_change which running, but returning before the call0. run_undoable_change (void) { if (EQ (BVAR (current_buffer, undo_list), Qt)) return; call0 (Qundo_auto__undoable_change); } The code is convoluted enough, though, that I am worried that I may have got this wrong. Anyway, I've just testing emacs-25 after my change, the patch seems to be doing very bad things -- i.e. leaving buffer-undo-list as Qt. So, I think I really sure revert, then worry about it tomorrow. Phil From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2020 14:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: phillip.lord@russet.org.uk (Phillip Lord) Cc: 23785@debbugs.gnu.org, acm@muc.de, Eli Zaretskii , Stefan Monnier Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.159922823611283 (code B ref 23785); Fri, 04 Sep 2020 14:04:02 +0000 Received: (at 23785) by debbugs.gnu.org; 4 Sep 2020 14:03:56 +0000 Received: from localhost ([127.0.0.1]:40207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECJn-0002vv-Lt for submit@debbugs.gnu.org; Fri, 04 Sep 2020 10:03:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECJl-0002vf-Fg for 23785@debbugs.gnu.org; Fri, 04 Sep 2020 10:03:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References: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=n7Bs0j45j9/37LstMx66Em2XxASwQaH8mo/DSuTQw1Y=; b=ubQGIF2jgeKxnTVtt8lVJ+10fh RBnqSxmiVbnrKFqRxYIBMTGtwgiCt+Otxlh6t2Qn8AD5CFk6oXuEOLdNx5QS+KPb7RZZ3nmyjvYxU iK+K36Xj7bN2p2G6eUrtkuW6p/wFTk2EPf1DG6Sn/zkDeQ1l5T8Kc4c/kww/jtNylRS4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kECJb-00019Y-Gj; Fri, 04 Sep 2020 16:03:46 +0200 From: Lars Ingebrigtsen References: <20160617150245.GB3316@acm.fritz.box> <83r3bvbuu1.fsf@gnu.org> <20160617174535.GD3316@acm.fritz.box> <83oa6zbmvd.fsf@gnu.org> <87ziqjwkrb.fsf@russet.org.uk> <83eg7vaq3z.fsf@gnu.org> <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> <8737o7aio2.fsf@russet.org.uk> <87twgmfb44.fsf@russet.org.uk> X-Now-Playing: Various's _1-8 Split Series_: "Foehn - Shrouded" Date: Fri, 04 Sep 2020 16:03:41 +0200 In-Reply-To: <87twgmfb44.fsf@russet.org.uk> (Phillip Lord's message of "Tue, 21 Jun 2016 23:08:59 +0100") Message-ID: <87wo198wqq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: This was a pretty long bug report with many suggested patches, some of which were applied and then reverted. But this one was applied and is still in Emacs: commit c98bc9821f4a402d5fda67fe141ed34622c50e4f Author: Phillip Lord AuthorDate: Fri Jun 17 22:34:50 2016 +0100 Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This was a pretty long bug report with many suggested patches, some of which were applied and then reverted. But this one was applied and is still in Emacs: commit c98bc9821f4a402d5fda67fe141ed34622c50e4f Author: Phillip Lord AuthorDate: Fri Jun 17 22:34:50 2016 +0100 Ensure undo-boundary after all commands I may be misreading the thread, but it sounded like this fixed the reported problem? So I'm closing this bug report; if there's more to be worked on there, please respond to the debbugs address and we'll reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 10:04:02 2020 Received: (at control) by debbugs.gnu.org; 4 Sep 2020 14:04:02 +0000 Received: from localhost ([127.0.0.1]:40210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECJt-0002wJ-W4 for submit@debbugs.gnu.org; Fri, 04 Sep 2020 10:04:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECJs-0002vt-AC for control@debbugs.gnu.org; Fri, 04 Sep 2020 10:04:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=d7NRLHzaPutvPYUyiT3B+UZt67P6IUXW6POt9BE2yO0=; b=vSa4snOXRZr3yyu6EhWKfiHXZN +pdNo8XIZ70P8KT9mr1Sy9yJA9j0+lZmluWZnzbyuuHxdl/HeSQYZMlrklPT4MgNqHGM0Zv5991Tk dImqoJYS4CYJK0idxSTPYQGB2lX+4S0To+4awM0+Cy0Xp6YbYwRTqYB1SyHI7z3ekyPw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kECJk-00019f-H7 for control@debbugs.gnu.org; Fri, 04 Sep 2020 16:03:54 +0200 Date: Fri, 04 Sep 2020 16:03:51 +0200 Message-Id: <87v9gt8wqg.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #23785 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 23785 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 23785 quit From unknown Sun Jun 22 07:49:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23785: Emacs 25: 'Undo' overdoes things. Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23785 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 23785@debbugs.gnu.org, acm@muc.de, Eli Zaretskii , Stefan Monnier , Phillip Lord Received: via spool by 23785-submit@debbugs.gnu.org id=B23785.159931172725890 (code B ref 23785); Sat, 05 Sep 2020 13:16:02 +0000 Received: (at 23785) by debbugs.gnu.org; 5 Sep 2020 13:15:27 +0000 Received: from localhost ([127.0.0.1]:41846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEY2R-0006jW-9y for submit@debbugs.gnu.org; Sat, 05 Sep 2020 09:15:27 -0400 Received: from colin.muc.de ([193.149.48.1]:52795 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1kEY2P-0006jG-3T for 23785@debbugs.gnu.org; Sat, 05 Sep 2020 09:15:25 -0400 Received: (qmail 6553 invoked by uid 3782); 5 Sep 2020 13:15:19 -0000 Received: from acm.muc.de (p2e5d530f.dip0.t-ipconnect.de [46.93.83.15]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 05 Sep 2020 15:15:17 +0200 Received: (qmail 6692 invoked by uid 1000); 5 Sep 2020 13:15:17 -0000 Date: Sat, 5 Sep 2020 13:15:17 +0000 Message-ID: <20200905131517.GA4244@ACM> References: <83bn2y9v80.fsf@gnu.org> <87vb13ewc8.fsf@russet.org.uk> <83wplj7u2t.fsf@gnu.org> <8737o7aio2.fsf@russet.org.uk> <87twgmfb44.fsf@russet.org.uk> <87wo198wqq.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wo198wqq.fsf@gnus.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Lars. On Fri, Sep 04, 2020 at 16:03:41 +0200, Lars Ingebrigtsen wrote: > This was a pretty long bug report with many suggested patches, some of > which were applied and then reverted. > But this one was applied and is still in Emacs: > commit c98bc9821f4a402d5fda67fe141ed34622c50e4f > Author: Phillip Lord > AuthorDate: Fri Jun 17 22:34:50 2016 +0100 > Ensure undo-boundary after all commands > I may be misreading the thread, but it sounded like this fixed the > reported problem? So I'm closing this bug report; if there's more to be > worked on there, please respond to the debbugs address and we'll reopen. Whatever it was that caused me to submit that bug report hasn't annoyed me in a long, long time. So I think that patch which remains has fixed the bug. So I agree that closing it is the right thing to do. Thanks! > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no -- Alan Mackenzie (Nuremberg, Germany).