From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 09 13:03:11 2019 Received: (at submit) by debbugs.gnu.org; 9 Feb 2019 18:03:11 +0000 Received: from localhost ([127.0.0.1]:41490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsWy6-00088K-Ey for submit@debbugs.gnu.org; Sat, 09 Feb 2019 13:03:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsUsp-0004kr-PK for submit@debbugs.gnu.org; Sat, 09 Feb 2019 10:49:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:38182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsUsk-0001bk-HR for submit@debbugs.gnu.org; Sat, 09 Feb 2019 10:49:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsUsj-0005VB-4k for bug-gnu-emacs@gnu.org; Sat, 09 Feb 2019 10:49:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsUsh-0001Yq-TG for bug-gnu-emacs@gnu.org; Sat, 09 Feb 2019 10:49:29 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:56155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gsUsh-0001Xu-Ib for bug-gnu-emacs@gnu.org; Sat, 09 Feb 2019 10:49:27 -0500 Received: by mail-wm1-x330.google.com with SMTP id r17so8840961wmh.5 for ; Sat, 09 Feb 2019 07:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=x7b1yxKZo1CGnNXreoWdKbovYEUINo2za2rK19ugnKE=; b=aP8k71cGRwwECMuDWLYwPuXJD7nhTNqwCoaw4Qs6HhJRFldR87V458UHaUZ/D/fPYp FT276EopVcMFrXLT8J/2nwq+2bC4JDCMGSj1PGXqv6Ebe37lKkw/savu7V1SY5lXtFXJ u39K4oub8RvyrJ3Fg8ZvOvufPI8as6ZefJIesX7e46DEF5DPFdCrILrnKgnskcEX5Ych 9qfss+wfHVJs/X4dkgAb2dgLT21Vg1cjax29ako7iTIExS2gHOipLhHc4Er6I2iQ3d3k Njg/3fDm5shdm78kW9+fd5jqoi1tV6hVpvPllc1y5M1HFODsZuM6BieX6y2GlbqJxMTt MgJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=x7b1yxKZo1CGnNXreoWdKbovYEUINo2za2rK19ugnKE=; b=m9H4w44aLNCbQiccxVHzR6GoZJ2KTteypqrq1PFCxpHjlmvquXCscBnXlV2FO/hd2/ xcgXF/l00B+EBpB/lbQn5bVh8Oz+yHCaRMAX5EVZ260O6eu7P25pP2kzpvrU+wHAEs/4 dg0hFpEpoQdJcaOmv2pKKfD0+fD/SiHvFV86leLOKMH3DCzpt+VfvMGO8Tqdn2nvU1ih 7/lBzn2dg5rVUGpPGepb0UJIPPIaX9YOs1xanFLaH8zEU2zS5i4K7Or3G+rIeyUJIzpk H3FsL6hfjLPc0b2HZyXilkhyKBLw2PJViSQdNqRYhks48UdKgV900J4xxeqV0GJRhC1Y 4ZUA== X-Gm-Message-State: AHQUAuaC+DO3NeFdZj+q9JgtPX6t/Q6zXoF2onwWpniooElp7x4VHQLK Yrsa0ldgcke+ReIvL7Lyvul9TVI4 X-Google-Smtp-Source: AHgI3IaaOllrw890jGekrGqe/z1ivrhyA7fl00s82QXg0B/JUZce8gepTPpNbwKAlT2Utm7xBeJmnA== X-Received: by 2002:a1c:384:: with SMTP id 126mr3242238wmd.26.1549727365786; Sat, 09 Feb 2019 07:49:25 -0800 (PST) Received: from gabor.localnet (254C439A.nat.pool.telekom.hu. [37.76.67.154]) by smtp.gmail.com with ESMTPSA id 2sm13645760wrg.89.2019.02.09.07.49.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Feb 2019 07:49:25 -0800 (PST) From: Braun =?ISO-8859-1?Q?G=E1bor?= To: bug-gnu-emacs@gnu.org Subject: 26.1; atomic change group after undo fails to cancel Date: Sat, 09 Feb 2019 16:49:23 +0100 Message-ID: <1631063.cd5q6Ms6ql@gabor> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.2 (+) 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: Hi, File test.el ; ; -*- lexical-binding: t; -*- (defun test-fun () "Test atomic change group, no visible effect." (interactive) (catch 'test (atomic [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: x.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (braungb88[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (braungb88[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 09 Feb 2019 13:03:08 -0500 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.2 (/) Hi, =2D------------------- File test.el ---------------------------------- ;; -*- lexical-binding: t; -*- (defun test-fun () "Test atomic change group, no visible effect." (interactive) (catch 'test (atomic-change-group (save-excursion (goto-char (point-min)) (insert "!!! TEST: you shouldn't see this !!!") (throw 'test t))))) (global-set-key [(control c) ?a] #'test-fun) =2D------------------------------------------------------------------- Start emacs by the command emacs -Q -l test.el Press the following keys: a C-_ C-c a A "!!! TEST: you shouldn't see this !!!" gets inserted at the top of buffer *scratch*, and the message "Undoing to some unrelated state" appears in the echo area. I expect that "C-c a" has no visible effect (as is the case if one omits "a C-_" before "C-c a"). A variant: in function cancel-change-group change line "(unless (eq last-command 'undo) (undo-start))" into "(undo-start)". I.e. to have a self-containd test: =2D------------------ file test2.el ---------------------------------- ;; -*- lexical-binding: t; -*- (defun test-fun () "Test atomic change group, no visible effect." (interactive) (catch 'test (atomic-change-group (save-excursion (goto-char (point-min)) (insert "!!! TEST: you shouldn't see this !!!") (throw 'test t))))) (global-set-key [(control c) ?a] #'test-fun) (defun cancel-change-group (handle) "Finish a change group made with `prepare-change-group' (which see). This finishes the change group by reverting all of its changes." (dolist (elt handle) (with-current-buffer (car elt) (setq elt (cdr elt)) (save-restriction ;; Widen buffer temporarily so if the buffer was narrowed within ;; the body of `atomic-change-group' all changes can be undone. (widen) (let ((old-car (car-safe elt)) (old-cdr (cdr-safe elt))) (unwind-protect (progn ;; Temporarily truncate the undo log at ELT. (when (consp elt) (setcar elt nil) (setcdr elt nil)) (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))) ;; Revert the undo info to what it was when we grabbed ;; the state. (setq buffer-undo-list elt)) ;; Reset the modified cons cell ELT to its original content. (when (consp elt) (setcar elt old-car) (setcdr elt old-cdr)))))))) =2D------------------------------------------------------------------- Run emacs as emacs -Q -l test2.el Press the following keys (same as above): a C-_ C-c a Now the displayed buffer *scratch* is in its original form, no message in the echo area as expected. Discussion: I do not claim that the change above in cancel-change-group is a correct fix, especially no claim that pending-undo-list will not get corrupted. It is intended only as a proof that in its original definition cancel-change-group fails while it was still possible to properly cancel the change group. Best wishes, G=C3=A1bor System information (for the first test, not the second one): In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.2) of 2018-12-26, modified by Debian built on x86-ubc-01 Windowing system distributor 'The X.Org Foundation', version=20 11.0.12003000 System Description: Debian GNU/Linux buster/sid Recent messages: =46or information about GNU Emacs and the GNU system, type C-h C-a. Undo! cancel-change-group: Undoing to some unrelated state Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site- lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/ usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site- lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/ usr/share/emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs-3ThesY/emacs-26.1+1=3D. -fstack- protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: hu_HU.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. =46eatures: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 95434 9148) (symbols 48 20367 1) (miscs 40 44 118) (strings 32 28319 1131) (string-bytes 1 742545) (vectors 16 14644) (vector-slots 8 496930 10762) (floats 8 49 118) (intervals 56 263 0) (buffers 992 11)) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 09 14:45:36 2019 Received: (at control) by debbugs.gnu.org; 9 Feb 2019 19:45:36 +0000 Received: from localhost ([127.0.0.1]:41544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsYZD-0002Hh-VP for submit@debbugs.gnu.org; Sat, 09 Feb 2019 14:45:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsYZC-0002HV-8M for control@debbugs.gnu.org; Sat, 09 Feb 2019 14:45:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsYZ6-0001T9-UH for control@debbugs.gnu.org; Sat, 09 Feb 2019 14:45:28 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gsYZ6-0008KF-Rv for control@debbugs.gnu.org; Sat, 09 Feb 2019 14:45:28 -0500 Subject: control message for bug 34405 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sat, 09 Feb 2019 14:45:28 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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 (-) merge 26287 34405 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 12 12:06:16 2019 Received: (at 34405) by debbugs.gnu.org; 12 Nov 2019 17:06:16 +0000 Received: from localhost ([127.0.0.1]:58304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUZcO-0004oX-Bb for submit@debbugs.gnu.org; Tue, 12 Nov 2019 12:06:16 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:44741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iUZcL-0004oJ-9W for 34405@debbugs.gnu.org; Tue, 12 Nov 2019 12:06:15 -0500 Received: by mail-wr1-f49.google.com with SMTP id f2so19339399wrs.11 for <34405@debbugs.gnu.org>; Tue, 12 Nov 2019 09:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g52RBFYXfRuGS/Yi4qag2OnU2aYwt+f/O0LPFqgfeis=; b=Ca+AN6ernkFmsX+rZ7EK7ZW5mfHndQH3xeEKN8cNZXwBuccaVREQsQaJA9OFDXBHdU WPn+7gON/nH+V3GKVYAUCjIIQl6YZ/AmPPjr6e2K1d28PfB7iarIiaW6ThS+VBoProNc 1+mgbnCtTXx+35to7LPuVQE2pAPGVlkGLshdTfQSgEfEqDFFIwR+VRKk54Jp7KkSW0Q9 LjAnvLzWpVR1YySqMMXNyGcQydE8pfpYDeQ5923xUZVH8r+QxgLVxVhvu1wxMtpr29oq YPKPrH1Fb4LtcAXtlZ1SqzuhAIYgMYfwZ5ROEt482DpSfRCmXb3qHS1z3QSJrgAqBVAo z9RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g52RBFYXfRuGS/Yi4qag2OnU2aYwt+f/O0LPFqgfeis=; b=I2zpqj1J2lRUmHrN8StWwVrchOdE6lKoW/LHMy92CrSBVqrfhMcuPtzSFkbGwVZNps 39HSNudBnAJvkymv3VKBp0fjIM0+Vz6Z2kGfUHnQeaPchZys0F90NMM5cgkKB8V6WCZA 51ENnCMgMFcVKaauNckFYiaQWjQcxSFTq0Pojm4Td2rZOKGu//1HEyUCaChx5xlkDQZg yYLioGjzMZf49WX1uVGeBYT9Nx3ZdOgE+PSLsGXYnRqnpETcu0gl1woK5F7oU3FmyCiD oHeFsjo+X2sh/bS4kTRKSVGNrOghY41+gH/iO/Lykvp3NSmsGeVhAp3C1kWrwSeW0G9o gfww== X-Gm-Message-State: APjAAAUpQziSKjJbhK6+5I9Le2swcojMlOdppC/F5LuljX5PFISZuWrt bWA37txbrZdSo97JIUG8/uLSLsB3 X-Google-Smtp-Source: APXvYqyWw+f3lKUgeRhUYm1j5k6ABLs19+C9LdrFXK4qS5B5NlyG8NSp4okBx9SmLPm0cV6aAQLq3w== X-Received: by 2002:adf:ce05:: with SMTP id p5mr15772095wrn.48.1573578367133; Tue, 12 Nov 2019 09:06:07 -0800 (PST) Received: from gabor.localnet (254C4FA9.nat.pool.telekom.hu. [37.76.79.169]) by smtp.gmail.com with ESMTPSA id v8sm28122654wra.79.2019.11.12.09.06.05 for <34405@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 09:06:06 -0800 (PST) From: Braun =?ISO-8859-1?Q?G=E1bor?= To: 34405@debbugs.gnu.org Subject: 26.1; patch for cancel-change-group to work after undo Date: Tue, 12 Nov 2019 18:05:48 +0100 Message-ID: <3538177.LDI8N28pS7@gabor> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 34405 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.8 (/) Hi, Please consider the following fix to the problem, patching function=20 cancel-change-group. In the original implementation, the only form depending on whether the=20 last command was an undo is the line (unless (eq last-command 'undo) (undo-start)) which sets pending-undo-list to buffer-undo-list, when the last command=20 was not an undo. When it was, then pending-undo-list probably contains=20 the pending undo entries from a buffer state before the start of the=20 change group, which are obviously irrelevant for cancelling the change=20 group. The fix below is to use buffer-undo-list instead of pending-undo-list, essentially inlining the call to undo-more for this change. =20 As a side effect, the value of pending-undo-list will no longer be=20 changed by cancel-change-group (unless something in the undo log changes=20 it), but as far as I see, it doesn't matter, as its value is useful only=20 directly after an undo command. =2D-- lisp/subr.el +++ lisp/subr.el @@ -2669,14 +2669,17 @@ (progn ;; Temporarily truncate the undo log at ELT. (when (consp elt) =2D (setcar elt nil) (setcdr elt nil)) =2D (unless (eq last-command 'undo) (undo-start)) =2D ;; Make sure there's no confusion. =2D (when (and (consp elt) (not (eq elt (last pending-undo- list)))) =2D (error "Undoing to some unrelated state")) + (setcar elt nil) (setcdr elt nil) + ;; Make sure there's no confusion. + (unless (eq elt (last buffer-undo-list)) + (error "Undoing to some unrelated state"))) ;; Undo it all. (save-excursion =2D (while (listp pending-undo-list) (undo-more 1))) + (let ((undo-in-progress t)) + (while buffer-undo-list + ;; Undo one step, removing it from undo log. + (setq buffer-undo-list + (primitive-undo 1 buffer-undo-list))))) ;; Revert the undo info to what it was when we grabbed ;; the state. (setq buffer-undo-list elt)) Best wishes, G=C3=A1bor From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 07:11:09 2019 Received: (at 34405) by debbugs.gnu.org; 14 Nov 2019 12:11:09 +0000 Received: from localhost ([127.0.0.1]:32820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVDxt-0003WZ-9q for submit@debbugs.gnu.org; Thu, 14 Nov 2019 07:11:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVDxr-0003WJ-Fz for 34405@debbugs.gnu.org; Thu, 14 Nov 2019 07:11:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVDxm-0003ZK-DJ; Thu, 14 Nov 2019 07:11:02 -0500 Received: from [176.228.60.248] (port=1337 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iVDxl-0005XU-97; Thu, 14 Nov 2019 07:11:02 -0500 Date: Thu, 14 Nov 2019 14:10:44 +0200 Message-Id: <835zjm7j5n.fsf@gnu.org> From: Eli Zaretskii To: Braun =?utf-8?Q?G=C3=A1bor?= In-reply-to: <3538177.LDI8N28pS7@gabor> (message from Braun =?utf-8?Q?G?= =?utf-8?Q?=C3=A1bor?= on Tue, 12 Nov 2019 18:05:48 +0100) Subject: Re: bug#34405: 26.1; patch for cancel-change-group to work after undo References: <1631063.cd5q6Ms6ql@gabor> <3538177.LDI8N28pS7@gabor> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 34405 Cc: 34405@debbugs.gnu.org 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: -3.3 (---) > From: Braun Gábor > Date: Tue, 12 Nov 2019 18:05:48 +0100 > > Please consider the following fix to the problem, patching function > cancel-change-group. Thanks. If this problem could be solved locally in the atomic groups code, I'd prefer that. If not, then let's postpone changes in the low-level undo machinery until after the emacs-27 branch is cut, as I'd like to avoid adding more changes in such deep innards. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 18:00:44 2019 Received: (at 34405) by debbugs.gnu.org; 14 Nov 2019 23:00:44 +0000 Received: from localhost ([127.0.0.1]:35396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVO6V-0007ZC-IW for submit@debbugs.gnu.org; Thu, 14 Nov 2019 18:00:43 -0500 Received: from mail-yb1-f171.google.com ([209.85.219.171]:43330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iVO6T-0007Yv-Do for 34405@debbugs.gnu.org; Thu, 14 Nov 2019 18:00:41 -0500 Received: by mail-yb1-f171.google.com with SMTP id r201so3273902ybc.10 for <34405@debbugs.gnu.org>; Thu, 14 Nov 2019 15:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K1R7AUUBEThhlUDHhXv52rWKaYFe4x0aZIlLutNk4lQ=; b=E+6PUXdyWyNGFiNeug80/tC8oVMlkTAkUpC9pYZNY1KnnarMa3hHKe9Va1zXQ8gDV4 hXZOmumaOGoWJo/3iXzrsqfuV6uMjT0XMppi002y6AoG+UXiJCLkePpEXOdnLkm3NZWY U3mAQUQiAOT3SF3lCMGF6XwSRf0VYP15GtcFUYY5nJXWaPmc3nE0+ppTOldMSFJqZVwR 6hErTWMA7gu1ZqzNidXH8iEgqznkI3nohR+hwghcod5lIYbs1EAX2Vu6x2145ykpPgmr r/UZiqeX7K6RjHtURditdSaZQ915PgX4RhEyPL9J5YMcJcOZGxOvTaajiiycgicxvScJ 67Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K1R7AUUBEThhlUDHhXv52rWKaYFe4x0aZIlLutNk4lQ=; b=gNKCztwgqAmn6XEqAcDjYy6p3DLW6Vrsx6AOe2BERPtgE3Fja3DlA5x0f7cbF7PzEl pX3mrtxn+Ty4rmPJwnCmPlGfcZAeCyWQtrnjiw+8PxZi+BxH2udpfP6ufEfWJUfbHGxh +ne6pCXSEpQn9V5VTc87+Nx7ipmY7ZKBP4NB4XZOxbQXXYDBI1+kyCV7w4TlQlzn3u2+ /CC+vuvc5BNh5sf9Fc41hJYiW/Kc/2JWsmM9i9fu5uoH2T3Tw3ExnwzEbWUmFTrTox8t 0cEiB2LF6oInj4QdjOz3XD7SOMyZyYOCjMpFuGdZX4W0Mid9wF2WgDwOEXjYj76eQCOl sotg== X-Gm-Message-State: APjAAAXjX/EKjm1AMKzYfsGig5CtsQdlh3DaMSCNaQwRk+vs13Qdkz+T jK40DsKkiSJ6FDg1ciqcx5jadYpT/m51/y5tOn8= X-Google-Smtp-Source: APXvYqzjtZ8+7ffvIrxM3KdIQnhzkphDqXQ85beWDXweKLjqRF4VPp07nJ2UDEpbVvdCV8fyQts/iosrc+0S5mcCXSk= X-Received: by 2002:a25:a326:: with SMTP id d35mr9623348ybi.224.1573772435739; Thu, 14 Nov 2019 15:00:35 -0800 (PST) MIME-Version: 1.0 References: <1631063.cd5q6Ms6ql@gabor> <3538177.LDI8N28pS7@gabor> <835zjm7j5n.fsf@gnu.org> In-Reply-To: <835zjm7j5n.fsf@gnu.org> From: =?UTF-8?B?QnJhdW4gR8OhYm9y?= Date: Fri, 15 Nov 2019 00:00:23 +0100 Message-ID: Subject: Re: bug#34405: 26.1; patch for cancel-change-group to work after undo To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000fd59590597567265" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 34405 Cc: 34405@debbugs.gnu.org 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 (/) --000000000000fd59590597567265 Content-Type: text/plain; charset="UTF-8" > > > Please consider the following fix to the problem, patching function > > cancel-change-group. > > Thanks. > > If this problem could be solved locally in the atomic groups code, I'd > prefer that. The patch is local to the atomic groups code: it only changes the function cancel-change-group, whose purpose is to abort an atomic group. If not, then let's postpone changes in the low-level > undo machinery There is no intention to change there anything. I'd like to > avoid adding more changes in such deep innards. > That is perfectly understandable. > --000000000000fd59590597567265 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Please consider the following fix to the problem, patching funct= ion
> cancel-change-group.

Thanks.

If this problem could be solved locally in the atomic groups code, I'd<= br> prefer that.

The patch is local to the atomic groups code: it only changes
the function cancel-change-group, whose purpose is to a= bort an atomic group.

=C2=A0 If not, then= let's postpone changes in the low-level
undo machinery

There is no intention to change there anything.

=C2=A0I'd like to
avoid adding more changes in such deep innards.

That is perfectly understand= able.
--000000000000fd59590597567265-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 06:47:36 2019 Received: (at control) by debbugs.gnu.org; 21 Nov 2019 11:47:36 +0000 Received: from localhost ([127.0.0.1]:51392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXkvt-0006HC-KI for submit@debbugs.gnu.org; Thu, 21 Nov 2019 06:47:35 -0500 Received: from quimby.gnus.org ([95.216.78.240]:57590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXkvo-0006GH-Fw for control@debbugs.gnu.org; Thu, 21 Nov 2019 06:47:29 -0500 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iXkvf-0003zM-5p for control@debbugs.gnu.org; Thu, 21 Nov 2019 12:47:21 +0100 Date: Thu, 21 Nov 2019 12:47:18 +0100 Message-Id: <87eey15u49.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #26061 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: forcemerge 26061 26287 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 (-) forcemerge 26061 26287 quit From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 20 03:11:48 2019 Received: (at 34405) by debbugs.gnu.org; 20 Dec 2019 08:11:48 +0000 Received: from localhost ([127.0.0.1]:45888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiDO0-0003Vv-7F for submit@debbugs.gnu.org; Fri, 20 Dec 2019 03:11:48 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:39334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iiDNx-0003Vh-Bk for 34405@debbugs.gnu.org; Fri, 20 Dec 2019 03:11:46 -0500 Received: by mail-wr1-f50.google.com with SMTP id y11so8484962wrt.6 for <34405@debbugs.gnu.org>; Fri, 20 Dec 2019 00:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=QgHcewBuWZJb3PmlKc0ic9toanrTUucjz5ILxvTo6kU=; b=tiPh4CpF4uBBrJx0Wq2nMOSZRUD920AGyEj6qMFM1ymj57ctzSH3gv/Bp0Mexx+9VF 1pxm5kPUpxB+nkbr8lfNSdPl72lP99pC2X6TU8ZsclzK0A+5lG+4BdTTT22v0u1FvNJs xfSIvK83WrmGI5rbyp84tmWoM3tGOgGT+tGVtFnanp3amEnZZAC8DiDyamo91PDR0x/u aVu7Xjc5ntxboysEThDFs0MIWmPAsQV7pjleN/vmU1sAvbMWhzVWBYeKWyaVqccx5zPy FapPwmTBUoX3UijlN6w3VZTVdp9UgTCGXqCn4xc3upCMhBegFB2tnI5evN79+xeT+kmt zvnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=QgHcewBuWZJb3PmlKc0ic9toanrTUucjz5ILxvTo6kU=; b=aQlKu53us4Iym/mjaObTxXYS2gbr4xEJLVWEtSnBFvbqDXfKh56Ptq3YDS8lTjZp/K t4OhqSeWSsI+2mDplVhXLfYkzK3VLRe+dvmwMj/E3/GhLcBA6z3AtakPCWtWuJZ8QHyC NrjkLIWaUBBQv7D0XT8wnz1E3FHlGuYL3pBKx8V3vgz1OaN+jdodwcdeeMpYOdz8nyTc 2io6zt32KS8U3Mk6TEofb/gxzHkWyy2blpSqIykP9k4KbEqiWOZ8yuAb1C75vXGQigC9 7EPfacH6m2IoigthGMyWQVeiorvV7QmXsljHJyhczVvmjfdt5Y+eP9d6AdkBWRv+sFLI 2+Sg== X-Gm-Message-State: APjAAAVkrKumMYomoDw3iguMCY0o8oPFZXtUoB0mBwlg8Z95EDnZKXBk SqHAH5OY+h5XAYErOCeMQKCBrYVk X-Google-Smtp-Source: APXvYqyMiI0l8F9fswOj7lyEzU+5pK1lTCt+ADQJVP7GqnvbOguh+v/OgwH8VofuW0RKQc6TG3EOAA== X-Received: by 2002:adf:b605:: with SMTP id f5mr13364225wre.383.1576829499293; Fri, 20 Dec 2019 00:11:39 -0800 (PST) Received: from gabor.localnet (254C4EEE.nat.pool.telekom.hu. [37.76.78.238]) by smtp.gmail.com with ESMTPSA id u13sm8848421wmd.36.2019.12.20.00.11.38 for <34405@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 00:11:38 -0800 (PST) From: Braun =?ISO-8859-1?Q?G=E1bor?= To: 34405@debbugs.gnu.org Subject: Re: bug#34405: 26.1; 2-line patch Date: Fri, 20 Dec 2019 09:11:28 +0100 Message-ID: <2345661.sRiDIh6uYh@gabor> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 34405 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.8 (/) Hi, Please find below a small patch to the problem, which works for me in=20 Emacs 26.1. Instead of calling undo-start, it binds pending-undo-list so that its=20 value is restored after canceling an atomic change group. Presumably this= =20 restoration is what the original code meant to do. (Feel free to reorder the bindings in let if you don't like pending-undo-list between old-car and old-cdr.) Best wishes, G=C3=A1bor =2D-- lisp/subr.el +++ lisp/subr.el @@ -2664,13 +2664,13 @@ cancel-change-group ;; the body of `atomic-change-group' all changes can be undone. (widen) (let ((old-car (car-safe elt)) + (pending-undo-list buffer-undo-list) (old-cdr (cdr-safe elt))) (unwind-protect (progn ;; Temporarily truncate the undo log at ELT. (when (consp elt) (setcar elt nil) (setcdr elt nil)) =2D (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")) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 14 09:58:54 2021 Received: (at 34405) by debbugs.gnu.org; 14 Aug 2021 13:58:54 +0000 Received: from localhost ([127.0.0.1]:45218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEuBa-0004Fr-B0 for submit@debbugs.gnu.org; Sat, 14 Aug 2021 09:58:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEuBY-0004FW-PQ; Sat, 14 Aug 2021 09:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=DLd5TlYd5fPfHK0ntu6TS3ExiW8sWqMCnoKJ9qr4grM=; b=ILH0njEY3FRv6hjXT05MNdR887 L5GeP/uTq9POcypFMphtzOyo0aJQ4rqyiRRebyXGTFV/Mf8kNwSFK/sC7vIrt2j8r0s25eU7iKss3 dzoo7gKdtu4euv3Wl8SpQaHLRVyDm9NeWlgqT+8RY+pb4261wJTtRdJPvc1TvVTt9lbg=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEuBO-0001hf-JG; Sat, 14 Aug 2021 15:58:46 +0200 From: Lars Ingebrigtsen To: Braun =?utf-8?Q?G=C3=A1bor?= Subject: Re: bug#26061: 26.0.50; cancel-change-group fails with "unrelated state" error if used after an undo References: <1631063.cd5q6Ms6ql@gabor> Date: Sat, 14 Aug 2021 15:58:41 +0200 In-Reply-To: <1631063.cd5q6Ms6ql@gabor> ("Braun =?utf-8?Q?G=C3=A1bor=22's?= message of "Sat, 09 Feb 2019 16:49:23 +0100") Message-ID: <87o8a0ruum.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; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Braun Gábor writes: > File test.el > ;; -*- lexical-binding: t; -*- > (defun test-fun () > "Test atomic change group, no visible effect." > (interactive) > (catch ' [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 34405 Cc: 34405@debbugs.gnu.org, 26061@debbugs.gnu.org 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: -3.3 (---) Braun G=C3=A1bor writes: > -------------------- File test.el ---------------------------------- > ;; -*- lexical-binding: t; -*- > (defun test-fun () > "Test atomic change group, no visible effect." > (interactive) > (catch 'test > (atomic-change-group > (save-excursion > (goto-char (point-min)) > (insert "!!! TEST: you shouldn't see this !!!") > (throw 'test t))))) > > (global-set-key [(control c) ?a] #'test-fun) > -------------------------------------------------------------------- > > Start emacs by the command > > emacs -Q -l test.el > > Press the following keys: a C-_ C-c a > > A "!!! TEST: you shouldn't see this !!!" gets inserted at the top of > buffer *scratch*, and the message "Undoing to some unrelated state" > appears in the echo area. I can reproduce this problem in Emacs 26.1, but it seems to be gone in Emacs 27.1 (and 28), so I'm going to go ahead and guess that this has been fixed in the years since this was reported, and I'm closing this bug report. If this is still a problem in recent Emacs versions, please respond to the debbugs address and we'll reopen. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 14 09:59:03 2021 Received: (at control) by debbugs.gnu.org; 14 Aug 2021 13:59:03 +0000 Received: from localhost ([127.0.0.1]:45223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEuBj-0004Gq-LF for submit@debbugs.gnu.org; Sat, 14 Aug 2021 09:59:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEuBh-0004G5-Qq for control@debbugs.gnu.org; Sat, 14 Aug 2021 09:59:02 -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=pF7hmXTKOCru8IJvKgSICCtOpnFIJnMBhYr/9fs1GxI=; b=kTpYOA5ieKqII7SmKUz5RSV3Id hRxk60Qght0u3OVIqNR7X/NU9oTe+UsH7grrGWD/H3eki+aTy5wYdObelU2fdmC4ze7kimnrDq05s ywv8RP6Z8GZjwX6mAWkXvk58RbyMGHIus1v8pouVwt1IcSFpyGUG/Fu8gzP5newFQtnk=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEuBa-0001hn-0N for control@debbugs.gnu.org; Sat, 14 Aug 2021 15:58:55 +0200 Date: Sat, 14 Aug 2021 15:58:48 +0200 Message-Id: <87mtpkruuf.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #26061 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 26061 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: -2.3 (--) 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: -3.3 (---) close 26061 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 16 08:01:20 2021 Received: (at 34405) by debbugs.gnu.org; 16 Aug 2021 12:01:20 +0000 Received: from localhost ([127.0.0.1]:48706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFbIu-0002dP-6H for submit@debbugs.gnu.org; Mon, 16 Aug 2021 08:01:20 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:34705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFbIr-0002d2-Aq; Mon, 16 Aug 2021 08:01:19 -0400 Received: by mail-wr1-f43.google.com with SMTP id h13so23285640wrp.1; Mon, 16 Aug 2021 05:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4CDZV35rWOi6Ifgh0ml7fLQNmYYMnvAjEBIAH0KxuWs=; b=qCWk9RCsEa0UJUo6UyvW1Sha6OXHdlvJa+muEfRFa+f0E8uwwEScx5rQ2BReS2w7B4 OfP7hHlLtBYXYzICeg+me7WjBvZUEwi5xVeVbbsv6jNM/o24KmnrmPQBP/vnkvudLawn WEAREIanf6Ia26Nd/hGqa+3A3nnblB1Q9z2B8UFQ1IfOuTytDM9xyD3xghmZtB+LaFPw LtWLIXCJsFpOustGQas14k2GVWbe7/f5+GgNqOlnI0jZn0cWn78NflK7vxB17TJLQamz mzQwpTk4xKYsfQ55aGHYvAjR6zNEJpf2R6XDlB3yIT7a6veQz8HT0RYv/+zxEXsAI6zl 132g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4CDZV35rWOi6Ifgh0ml7fLQNmYYMnvAjEBIAH0KxuWs=; b=Ba9BvL3A3+x7ODv0DUU7LtvtolIMNzRmz7n211+tjLTU+d39f//KCsObmHbakCgn2R F4Nd4n6OYtbXmLo5GhlYOx9V79xdZ37vHB9nYFDMbMAGAagR7khXb6QhABmS43ITiMct a2tP6SVFpMg3CCEj7VqZuC5IcLDqs33izQXhsiu7HXdXji8xhR9kq+duyBvugsN0FF8r ZJg9FpFM+mj3YadusmNCW6zE0FHlptPJu3vCXp5bYbiDH11GRrnbhMU58U2hYjP0MNn+ swittk8qchyu+2PhxMKdww3HXuhMIRyFsn81coJkq3NAKjVQy+HL4ryok0nu8DsDYsKO CCxw== X-Gm-Message-State: AOAM531LV41lyqtAamSb+H9PVNT3L7xjLEDic7O8iQ/khH1FT0srbVi9 Nx2TPLAH7qF3jRVmY9PkmL8= X-Google-Smtp-Source: ABdhPJxn4UHxY0tq1MNPR2Pt1OdHQItm8uK1jMRjuh5mXo0XFuCbRLSSMjW5SWXUCy6zV3Ram3wn8A== X-Received: by 2002:adf:e6cc:: with SMTP id y12mr18843120wrm.200.1629115271326; Mon, 16 Aug 2021 05:01:11 -0700 (PDT) Received: from gabor.localnet (dslb-094-222-107-216.094.222.pools.vodafone-ip.de. [94.222.107.216]) by smtp.gmail.com with ESMTPSA id r12sm11547562wrv.96.2021.08.16.05.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Aug 2021 05:01:11 -0700 (PDT) From: Braun =?ISO-8859-1?Q?G=E1bor?= To: Lars Ingebrigtsen Subject: Re: bug#26061: 26.0.50; cancel-change-group fails with "unrelated state" error if used after an undo Date: Mon, 16 Aug 2021 14:01:01 +0200 Message-ID: <3177793.ljFpVtCzQm@gabor> In-Reply-To: <87o8a0ruum.fsf@gnus.org> References: <1631063.cd5q6Ms6ql@gabor> <87o8a0ruum.fsf@gnus.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 34405 Cc: 34405@debbugs.gnu.org, 26061@debbugs.gnu.org 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.8 (/) > I can reproduce this problem in Emacs 26.1, but it seems to be gone in > Emacs 27.1 (and 28), so I'm going to go ahead and guess that this has > been fixed I can see the fix in the following snippet of `cancel-change-group' in=20 Emacs 27.1 code. The faulty logic with `last-command' and `undo-start'=20 has been gone. (... denotes omitted code.) (let (... ;; Use `pending-undo-list' temporarily since `undo-more' needs ;; it, but restore it afterwards so as not to mess with an ;; ongoing sequence of `undo's. (pending-undo-list ;; Use `buffer-undo-list' unconditionally (bug#39680). buffer-undo-list)) Thank you for checking in recent Emacs versions. Best wishes, G=C3=A1bor From unknown Sun Jun 22 03:56:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 14 Sep 2021 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator