From unknown Tue Jun 17 20:21:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#810 <810@debbugs.gnu.org> To: bug#810 <810@debbugs.gnu.org> Subject: Status: 23.0.60; atomic-change-group narrowing problem Reply-To: bug#810 <810@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:21:24 +0000 retitle 810 23.0.60; atomic-change-group narrowing problem reassign 810 emacs submitter 810 "Lennart Borgman (gmail)" severity 810 normal thanks From lennart.borgman@gmail.com Thu Aug 28 11:59:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.3 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 28 Aug 2008 18:59:03 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7SIwx6a006277 for ; Thu, 28 Aug 2008 11:59:01 -0700 Received: from mx10.gnu.org ([199.232.76.166]:44390) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KYmgS-0001IW-Fj for emacs-pretest-bug@gnu.org; Thu, 28 Aug 2008 14:57:28 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KYmhq-0007Yk-Ch for emacs-pretest-bug@gnu.org; Thu, 28 Aug 2008 14:58:58 -0400 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:59027) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KYmhp-0007Xm-DM for emacs-pretest-bug@gnu.org; Thu, 28 Aug 2008 14:58:54 -0400 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61345 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KYmhl-0005DH-8F for emacs-pretest-bug@gnu.org; Thu, 28 Aug 2008 20:58:49 +0200 Message-ID: <48B6F562.9060006@gmail.com> Date: Thu, 28 Aug 2008 20:58:42 +0200 From: "Lennart Borgman (gmail)" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: emacs-pretest-bug@gnu.org Subject: 23.0.60; atomic-change-group narrowing problem X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080828-0, 2008-08-28), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KYmhl-0005DH-8F. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KYmhl-0005DH-8F 2ad374496602228482d85147f0c43b32 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) When using atomic-change-group I got the message undo-more: Changes to be undone are outside visible portion of buffer The changes are also not undone. This seems wrong to me. If I put (widen) before the end of my code in the atomic-change-group the message above disappears and the change is undone. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-10 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' From rudalics@gmx.at Thu Aug 28 14:29:12 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 28 Aug 2008 21:29:12 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7SLT8OC024332 for <810@emacsbugs.donarmstrong.com>; Thu, 28 Aug 2008 14:29:10 -0700 Received: (qmail invoked by alias); 28 Aug 2008 21:29:03 -0000 Received: from 62-47-54-252.adsl.highway.telekom.at (EHLO [62.47.54.252]) [62.47.54.252] by mail.gmx.net (mp013) with SMTP; 28 Aug 2008 23:29:03 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18wiAkXSlQwDOY49kmMcy9m8nFtQXTqsTMnf1Im++ lj68kXgAJFyjhy Message-ID: <48B71820.7040108@gmx.at> Date: Thu, 28 Aug 2008 23:26:56 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Lennart Borgman (gmail)" , 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> In-Reply-To: <48B6F562.9060006@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.82 > When using atomic-change-group I got the message > > undo-more: Changes to be undone are outside visible portion of buffer This message is usually a consequence of narrowing the buffer within the body of `atomic-change-group' or afterwards. > The changes are also not undone. This seems wrong to me. If you did narrow the buffer this is normal and not specific to `atomic-change-group'. martin From lennart.borgman@gmail.com Thu Aug 28 14:37:37 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 28 Aug 2008 21:37:38 +0000 Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7SLbYQR027399 for <810@emacsbugs.donarmstrong.com>; Thu, 28 Aug 2008 14:37:35 -0700 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:64639 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KYpBN-0005IV-77; Thu, 28 Aug 2008 23:37:33 +0200 Message-ID: <48B71A96.4040700@gmail.com> Date: Thu, 28 Aug 2008 23:37:26 +0200 From: "Lennart Borgman (gmail)" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: martin rudalics CC: 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> <48B71820.7040108@gmx.at> In-Reply-To: <48B71820.7040108@gmx.at> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080828-0, 2008-08-28), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KYpBN-0005IV-77. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KYpBN-0005IV-77 f9cbfd40da20da335f2836d77bd4af99 martin rudalics wrote: >> When using atomic-change-group I got the message >> >> undo-more: Changes to be undone are outside visible portion of buffer > > This message is usually a consequence of narrowing the buffer within the > body of `atomic-change-group' or afterwards. > >> The changes are also not undone. This seems wrong to me. > > If you did narrow the buffer this is normal and not specific to > `atomic-change-group'. Maybe, but what is specific to atomic-change-group is that the doc string says Perform body as an atomic change group. This means that if body exits abnormally, all of its changes to the current buffer are undone. AFAICS there is something wrong either in the doc string or in the function. I would suggest that this is a bug in the function. Think for example of the case that you want to test something during narrowing and be sure that the buffer is not changed. From rudalics@gmx.at Fri Aug 29 02:30:55 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 29 Aug 2008 09:30:55 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7T9UpQ9004355 for <810@emacsbugs.donarmstrong.com>; Fri, 29 Aug 2008 02:30:53 -0700 Received: (qmail invoked by alias); 29 Aug 2008 09:30:46 -0000 Received: from 62-47-33-217.adsl.highway.telekom.at (EHLO [62.47.33.217]) [62.47.33.217] by mail.gmx.net (mp003) with SMTP; 29 Aug 2008 11:30:46 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/rXMQG3ZDroAiynSNKZyJvzqHR2hre5HdW2xNpxh F7Ydt9HyGuVDqF Message-ID: <48B7C0E8.6070203@gmx.at> Date: Fri, 29 Aug 2008 11:27:04 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Lennart Borgman (gmail)" CC: 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> <48B71820.7040108@gmx.at> <48B71A96.4040700@gmail.com> In-Reply-To: <48B71A96.4040700@gmail.com> Content-Type: multipart/mixed; boundary="------------000206020904060703030406" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.87,0.63 This is a multi-part message in MIME format. --------------000206020904060703030406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > I would suggest that this is a bug in the function. Think for example of > the case that you want to test something during narrowing and be sure > that the buffer is not changed. Does the attached patch do what you want? martin --------------000206020904060703030406 Content-Type: text/plain; name="810.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="810.diff" *** subr.el.~1.602.~ 2008-07-31 07:33:45.000000000 +0200 --- subr.el 2008-08-29 11:15:34.765625000 +0200 *************** *** 1991,2016 **** (dolist (elt handle) (with-current-buffer (car elt) (setq elt (cdr elt)) ! (let ((old-car ! (if (consp elt) (car elt))) ! (old-cdr ! (if (consp elt) (cdr elt)))) ! ;; Temporarily truncate the undo log at ELT. ! (when (consp elt) ! (setcar elt nil) (setcdr elt nil)) ! (unless (eq last-command 'undo) (undo-start)) ! ;; Make sure there's no confusion. ! (when (and (consp elt) (not (eq elt (last pending-undo-list))))= ! (error "Undoing to some unrelated state")) ! ;; Undo it all. ! (save-excursion ! (while (listp pending-undo-list) (undo-more 1))) ! ;; Reset the modified cons cell ELT to its original content. ! (when (consp elt) ! (setcar elt old-car) ! (setcdr elt old-cdr)) ! ;; Revert the undo info to what it was when we grabbed the stat= e. ! (setq buffer-undo-list elt))))) =0C ;;;; Display-related functions. =20 --- 1991,2018 ---- (dolist (elt handle) (with-current-buffer (car elt) (setq elt (cdr elt)) ! (save-restriction ! (widen) ! (let ((old-car ! (if (consp elt) (car elt))) ! (old-cdr ! (if (consp elt) (cdr elt)))) ! ;; Temporarily truncate the undo log at ELT. ! (when (consp elt) ! (setcar elt nil) (setcdr elt nil)) ! (unless (eq last-command 'undo) (undo-start)) ! ;; Make sure there's no confusion. ! (when (and (consp elt) (not (eq elt (last pending-undo-list)))) ! (error "Undoing to some unrelated state")) ! ;; Undo it all. ! (save-excursion ! (while (listp pending-undo-list) (undo-more 1))) ! ;; Reset the modified cons cell ELT to its original content. ! (when (consp elt) ! (setcar elt old-car) ! (setcdr elt old-cdr)) ! ;; Revert the undo info to what it was when we grabbed the state. ! (setq buffer-undo-list elt)))))) =0C ;;;; Display-related functions. =20 --------------000206020904060703030406-- From rudalics@gmx.at Mon Sep 1 11:00:46 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,FOURLA, FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 1 Sep 2008 18:00:46 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m81I0fFO016296 for <810@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 11:00:43 -0700 Received: (qmail invoked by alias); 01 Sep 2008 18:00:33 -0000 Received: from 62-47-47-164.adsl.highway.telekom.at (EHLO [62.47.47.164]) [62.47.47.164] by mail.gmx.net (mp027) with SMTP; 01 Sep 2008 20:00:33 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/nyGolVD3nHKGHZqaf4ikjExsEpcqhtl84Rlf45W JmRxaxkTCOfzF5 Message-ID: <48BC2CE6.2070108@gmx.at> Date: Mon, 01 Sep 2008 19:56:54 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Lennart Borgman (gmail)" , 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> In-Reply-To: <48B6F562.9060006@gmail.com> Content-Type: multipart/mixed; boundary="------------010804080705040106010805" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.87,0.55 This is a multi-part message in MIME format. --------------010804080705040106010805 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > When using atomic-change-group I got the message > > undo-more: Changes to be undone are outside visible portion of buffer > > The changes are also not undone. This seems wrong to me. The attached patch now also tries to restore any narrowing in force before the atomic change. martin --------------010804080705040106010805 Content-Type: text/plain; name="810.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="810.diff" *** subr.el.~1.604.~ 2008-08-31 09:48:50.531250000 +0200 --- subr.el 2008-09-01 19:52:32.843750000 +0200 *************** *** 1907,1912 **** --- 1907,1917 ---- =0C ;;; Atomic change groups. =20 + (defvar atomic-change-point-min nil + "Value returned by `point-min' before an atomic change.") + (defvar atomic-change-point-max nil + "Value returned by `point-max' before an atomic change.") +=20 (defmacro atomic-change-group (&rest body) "Perform BODY as an atomic change group. This means that if BODY exits abnormally, *************** *** 1920,1925 **** --- 1925,1932 ---- (let ((handle (make-symbol "--change-group-handle--")) (success (make-symbol "--change-group-success--"))) `(let ((,handle (prepare-change-group)) + (atomic-change-point-min (point-min)) + (atomic-change-point-max (point-max)) ;; Don't truncate any undo data in the middle of this. (undo-outer-limit nil) (undo-limit most-positive-fixnum) *************** *** 1992,2017 **** (dolist (elt handle) (with-current-buffer (car elt) (setq elt (cdr elt)) ! (let ((old-car ! (if (consp elt) (car elt))) ! (old-cdr ! (if (consp elt) (cdr elt)))) ! ;; Temporarily truncate the undo log at ELT. ! (when (consp elt) ! (setcar elt nil) (setcdr elt nil)) ! (unless (eq last-command 'undo) (undo-start)) ! ;; Make sure there's no confusion. ! (when (and (consp elt) (not (eq elt (last pending-undo-list))))= ! (error "Undoing to some unrelated state")) ! ;; Undo it all. ! (save-excursion ! (while (listp pending-undo-list) (undo-more 1))) ! ;; Reset the modified cons cell ELT to its original content. ! (when (consp elt) ! (setcar elt old-car) ! (setcdr elt old-cdr)) ! ;; Revert the undo info to what it was when we grabbed the stat= e. ! (setq buffer-undo-list elt))))) =0C ;;;; Display-related functions. =20 --- 1999,2030 ---- (dolist (elt handle) (with-current-buffer (car elt) (setq elt (cdr elt)) ! (save-restriction ! (widen) ! (let ((old-car ! (if (consp elt) (car elt))) ! (old-cdr ! (if (consp elt) (cdr elt)))) ! ;; Temporarily truncate the undo log at ELT. ! (when (consp elt) ! (setcar elt nil) (setcdr elt nil)) ! (unless (eq last-command 'undo) (undo-start)) ! ;; Make sure there's no confusion. ! (when (and (consp elt) (not (eq elt (last pending-undo-list)))) ! (error "Undoing to some unrelated state")) ! ;; Undo it all. ! (save-excursion ! (while (listp pending-undo-list) (undo-more 1))) ! ;; Reset the modified cons cell ELT to its original content. ! (when (consp elt) ! (setcar elt old-car) ! (setcdr elt old-cdr)) ! ;; Revert the undo info to what it was when we grabbed the state. ! (setq buffer-undo-list elt))) ! (unless (and (=3D (point-min) atomic-change-point-min) ! (=3D (point-max) atomic-change-point-max)) ! ;; Try to restore narrowing in force before atomic change. ! (narrow-to-region atomic-change-point-min atomic-change-point-max)))))= =0C ;;;; Display-related functions. =20 --------------010804080705040106010805-- From monnier@iro.umontreal.ca Mon Sep 1 13:44:09 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 1 Sep 2008 20:44:09 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81Ki6Do006788 for <810@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 13:44:08 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMFACzxu0hFxJrH/2dsb2JhbACBZbEtgWmBBw X-IronPort-AV: E=Sophos;i="4.32,309,1217822400"; d="scan'208";a="26195606" Received: from 69-196-154-199.dsl.teksavvy.com (HELO ceviche.home) ([69.196.154.199]) by ironport2-out.teksavvy.com with ESMTP; 01 Sep 2008 16:44:01 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 88DB0B41E3; Mon, 1 Sep 2008 16:43:59 -0400 (EDT) From: Stefan Monnier To: martin rudalics Cc: 810@debbugs.gnu.org, "Lennart Borgman \(gmail\)" Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem Message-ID: References: <48B6F562.9060006@gmail.com> <48BC2CE6.2070108@gmx.at> Date: Mon, 01 Sep 2008 16:43:59 -0400 In-Reply-To: <48BC2CE6.2070108@gmx.at> (martin rudalics's message of "Mon, 01 Sep 2008 19:56:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> When using atomic-change-group I got the message >> undo-more: Changes to be undone are outside visible portion of buffer >> The changes are also not undone. This seems wrong to me. > The attached patch now also tries to restore any narrowing in force > before the atomic change. I'm not sure we should do that. Currently, narrowing operations are not saved to the undo-log, so making atomic-change-group save&restore the narrowing makes it behave differently from the undo. Stefan From rudalics@gmx.at Mon Sep 1 14:22:52 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 1 Sep 2008 21:22:52 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m81LMmsg020707 for <810@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 14:22:50 -0700 Received: (qmail invoked by alias); 01 Sep 2008 21:22:43 -0000 Received: from 62-47-37-200.adsl.highway.telekom.at (EHLO [62.47.37.200]) [62.47.37.200] by mail.gmx.net (mp063) with SMTP; 01 Sep 2008 23:22:43 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+uLm0KnrWuYu7hPJbPsR5jNtvHA7fq2PZ8b6ijFc ghlfDIUctVy2pL Message-ID: <48BC5C9D.9000008@gmx.at> Date: Mon, 01 Sep 2008 23:20:29 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stefan Monnier CC: 810@debbugs.gnu.org, "Lennart Borgman (gmail)" Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> <48BC2CE6.2070108@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 >>> When using atomic-change-group I got the message >>> undo-more: Changes to be undone are outside visible portion of buffer >>> The changes are also not undone. This seems wrong to me. > >> The attached patch now also tries to restore any narrowing in force >> before the atomic change. > > I'm not sure we should do that. Currently, narrowing operations are not > saved to the undo-log, so making atomic-change-group save&restore the > narrowing makes it behave differently from the undo. I know what you mean but the present case is different. When someone uses narrowing within the atomic change group and we really want to undo the changes (we still can decide that we won't fix the bug ;-)) we have to widen the buffer. If the buffer was narrowed _before_ entering the atomic change group, it would be incorrect not to restore that. Or am I missing something? martin From lennart.borgman@gmail.com Mon Sep 1 14:53:18 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 1 Sep 2008 21:53:18 +0000 Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81LrFE5030666 for <810@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 14:53:16 -0700 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61325 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KaHKj-0008WI-9D; Mon, 01 Sep 2008 23:53:14 +0200 Message-ID: <48BC6442.2060608@gmail.com> Date: Mon, 01 Sep 2008 23:53:06 +0200 From: "Lennart Borgman (gmail)" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: martin rudalics CC: Stefan Monnier , 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> <48BC2CE6.2070108@gmx.at> <48BC5C9D.9000008@gmx.at> In-Reply-To: <48BC5C9D.9000008@gmx.at> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080901-0, 2008-09-01), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KaHKj-0008WI-9D. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KaHKj-0008WI-9D fa9e9c8a51d90238322ced7b9753aebf martin rudalics wrote: >>>> When using atomic-change-group I got the message >>>> undo-more: Changes to be undone are outside visible portion of buffer >>>> The changes are also not undone. This seems wrong to me. >> >>> The attached patch now also tries to restore any narrowing in force >>> before the atomic change. >> >> I'm not sure we should do that. Currently, narrowing operations are not >> saved to the undo-log, so making atomic-change-group save&restore the >> narrowing makes it behave differently from the undo. > > I know what you mean but the present case is different. When someone > uses narrowing within the atomic change group and we really want to undo > the changes (we still can decide that we won't fix the bug ;-)) we have > to widen the buffer. If the buffer was narrowed _before_ entering the > atomic change group, it would be incorrect not to restore that. Or am I > missing something? I agree. It would be very surprising if narrowing was not restored. From monnier@iro.umontreal.ca Mon Sep 1 19:38:58 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 2 Sep 2008 02:38:58 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m822ct4S031075 for <810@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 19:38:56 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEAF9EvEhFxJrH/2dsb2JhbACBZbEWgWmBBw X-IronPort-AV: E=Sophos;i="4.32,312,1217822400"; d="scan'208";a="26207185" Received: from 69-196-154-199.dsl.teksavvy.com (HELO pastel.home) ([69.196.154.199]) by ironport2-out.teksavvy.com with ESMTP; 01 Sep 2008 22:38:50 -0400 Received: by pastel.home (Postfix, from userid 20848) id ADD247FF1; Mon, 1 Sep 2008 22:38:48 -0400 (EDT) From: Stefan Monnier To: "Lennart Borgman \(gmail\)" Cc: martin rudalics , 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem Message-ID: References: <48B6F562.9060006@gmail.com> <48BC2CE6.2070108@gmx.at> <48BC5C9D.9000008@gmx.at> <48BC6442.2060608@gmail.com> Date: Mon, 01 Sep 2008 22:38:48 -0400 In-Reply-To: <48BC6442.2060608@gmail.com> (Lennart Borgman's message of "Mon, 01 Sep 2008 23:53:06 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> When using atomic-change-group I got the message >>>>> undo-more: Changes to be undone are outside visible portion of buffer >>>>> The changes are also not undone. This seems wrong to me. >>> >>>> The attached patch now also tries to restore any narrowing in force >>>> before the atomic change. >>> >>> I'm not sure we should do that. Currently, narrowing operations are not >>> saved to the undo-log, so making atomic-change-group save&restore the >>> narrowing makes it behave differently from the undo. >> >> I know what you mean but the present case is different. When someone >> uses narrowing within the atomic change group and we really want to undo >> the changes (we still can decide that we won't fix the bug ;-)) we have >> to widen the buffer. If the buffer was narrowed _before_ entering the >> atomic change group, it would be incorrect not to restore that. Or am I >> missing something? The widening needs to be temporary around the call to undo, but that doesn't seem to imply that atomic-change-group will preserve narrowing. Stefan From rms@gnu.org Tue Sep 2 07:15:43 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.3 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Sep 2008 14:15:43 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m82EFeZl016302 for ; Tue, 2 Sep 2008 07:15:41 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaWfT-0000tj-Mp for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 10:15:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaWfS-0000se-Qz for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 10:15:39 -0400 Received: from [199.232.76.173] (port=33550 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaWfS-0000sU-L4 for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 10:15:38 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:54715) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KaWfS-0003bz-Pz for bug-gnu-emacs@gnu.org; Tue, 02 Sep 2008 10:15:38 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KaWdr-0001vP-NF; Tue, 02 Sep 2008 10:14:00 -0400 Content-Type: text/plain; charset=ISO-8859-15 From: "Richard M. Stallman" To: martin rudalics , 810@debbugs.gnu.org CC: monnier@iro.umontreal.ca, bug-submit-list@donarmstrong.com, 810@debbugs.gnu.org, bug-gnu-emacs@gnu.org In-reply-to: <48BC5C9D.9000008@gmx.at> (message from martin rudalics on Mon, 01 Sep 2008 23:20:29 +0200) Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem Reply-to: rms@gnu.org References: <48B6F562.9060006@gmail.com> <48BC2CE6.2070108@gmx.at> <48BC5C9D.9000008@gmx.at> Message-Id: Date: Tue, 02 Sep 2008 10:13:59 -0400 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 I know what you mean but the present case is different. When someone uses narrowing within the atomic change group and we really want to undo the changes (we still can decide that we won't fix the bug ;-)) we have to widen the buffer. We could say that if the body of the atomic-change-group does narrowing, then it has the responsibility to widen again. That seems logical. From rudalics@gmx.at Sun Sep 7 02:39:43 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810) by emacsbugs.donarmstrong.com; 7 Sep 2008 09:39:43 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m879dZfN025334 for <810@emacsbugs.donarmstrong.com>; Sun, 7 Sep 2008 02:39:36 -0700 Received: (qmail invoked by alias); 07 Sep 2008 09:39:29 -0000 Received: from 62-47-37-223.adsl.highway.telekom.at (EHLO [62.47.37.223]) [62.47.37.223] by mail.gmx.net (mp012) with SMTP; 07 Sep 2008 11:39:29 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19ZlIlBJLJZCEg3AhpZSfnXOex4h+VZhb3T6+2CBv ZIu2QAccHS+VO0 Message-ID: <48C3A0C3.2060800@gmx.at> Date: Sun, 07 Sep 2008 11:37:07 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stefan Monnier CC: "Lennart Borgman (gmail)" , 810@debbugs.gnu.org Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem References: <48B6F562.9060006@gmail.com> <48BC2CE6.2070108@gmx.at> <48BC5C9D.9000008@gmx.at> <48BC6442.2060608@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.85 > The widening needs to be temporary around the call to undo, but that > doesn't seem to imply that atomic-change-group will preserve narrowing. OK. Installed without restoring the initial narrowing state. Any narrowing within the group will remain effective when the change is canceled. martin From rudalics@gmx.at Sun Sep 7 03:05:09 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 810-done) by emacsbugs.donarmstrong.com; 7 Sep 2008 10:05:09 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m87A55ks001775 for <810-done@emacsbugs.donarmstrong.com>; Sun, 7 Sep 2008 03:05:06 -0700 Received: (qmail invoked by alias); 07 Sep 2008 10:04:59 -0000 Received: from 62-47-37-223.adsl.highway.telekom.at (EHLO [62.47.37.223]) [62.47.37.223] by mail.gmx.net (mp022) with SMTP; 07 Sep 2008 12:04:59 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/T05h05oPT9+V2xWf9gVTPfQ2LZQihAuxKs4BPq3 a+jMbrixY3OQx+ Message-ID: <48C3A6BE.8030305@gmx.at> Date: Sun, 07 Sep 2008 12:02:38 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 810-done@debbugs.gnu.org CC: lennart.borgman@gmail.com Subject: Re: bug#810: 23.0.60; atomic-change-group narrowing problem Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 Fixed as 2008-09-07 Martin Rudalics * subr.el (cancel-change-group): Widen buffer temporarily when undoing changes. (Bug#810) Thanks From unknown Tue Jun 17 20:21:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Sun, 05 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator