From unknown Sat Jun 21 17:36:21 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#23632 <23632@debbugs.gnu.org> To: bug#23632 <23632@debbugs.gnu.org> Subject: Status: 25.1.50; Gratuitous undo boundary in latex-insert-block Reply-To: bug#23632 <23632@debbugs.gnu.org> Date: Sun, 22 Jun 2025 00:36:21 +0000 retitle 23632 25.1.50; Gratuitous undo boundary in latex-insert-block reassign 23632 emacs submitter 23632 Chong Yidong severity 23632 minor tag 23632 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 27 11:11:46 2016 Received: (at submit) by debbugs.gnu.org; 27 May 2016 15:11:46 +0000 Received: from localhost ([127.0.0.1]:42752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6JQQ-0002Qt-Et for submit@debbugs.gnu.org; Fri, 27 May 2016 11:11:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6JQO-0002Qh-TN for submit@debbugs.gnu.org; Fri, 27 May 2016 11:11:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6JQI-0002s8-FI for submit@debbugs.gnu.org; Fri, 27 May 2016 11:11:39 -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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6JQI-0002rw-Bt for submit@debbugs.gnu.org; Fri, 27 May 2016 11:11:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6JQG-0002bs-8o for bug-gnu-emacs@gnu.org; Fri, 27 May 2016 11:11:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6JQC-0002qI-1j for bug-gnu-emacs@gnu.org; Fri, 27 May 2016 11:11:35 -0400 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]:34635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6JQB-0002q7-RV for bug-gnu-emacs@gnu.org; Fri, 27 May 2016 11:11:31 -0400 Received: by mail-pf0-x232.google.com with SMTP id y69so42625102pfb.1 for ; Fri, 27 May 2016 08:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version; bh=ZMDhM2gM6M5tVMoEvPiEmZtOWA2TQNb5PP93Op6WozY=; b=nMTv/KODLbotoIGZjBZSSU5alKZ4L6gsG74Gy7pW6AGpgR586lPz/XdMYc6x5sU3vf q5AbV9o1VaAoGLsl9agUuXWFKF0WTByy8NR2EQ8CWjOwqQXEZ1YqN1dOmnLrQkfPJFpZ fCX3Gh6SabC1KiS8fdZ6znRXlGPn4NuiX8cCAeMPrxKKX9aqS5rDN7eI8/1FP37EzXKJ 036z0JWBuANC/YTZB4f9eBona/+FiSSVhujiRcfJk7jRzK3Wl8RuHtz1YKUEpBPPLYt3 pQOcIjf7a9qU2FYcoFQ9yxz/Ctm4SwhcX02oYTY++vHKB63Uf3DvMSlannaP8FWYcoW1 AokQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=ZMDhM2gM6M5tVMoEvPiEmZtOWA2TQNb5PP93Op6WozY=; b=BLK620pnSZUJn8vxOqmlSm04IkIeHOBWs4hah+dhs9lrEji6OnXyi06m5hMdavsK5C SRuK8AgnWfk6LUHmwD8mxWc9O/VK/P7sAtic5zvshaDd+LyNfJu0IzkoCwW+ziHHoNBh D9w8efmTZFLKCF2gfoyNiwRMezDE/tVbT/CG2NWhqh/whzBVM3Ppc/L6+MYTkbl3WyOV xzAZiVO9nfs8roWDY+QoekQAaJCMkmksNJfNoqgKan4VmWY8XuLKeH+BKjuxlBnDAyfp tCMH0ZwJBOSgCwo8yxZjp+fhAqrpHgy6DUfoyrCJPuJKJDXB43OfYmT08VHtgkSQmkd4 gWYA== X-Gm-Message-State: ALyK8tIll7QKt61LftayeFp1pfb1BULyi4BxPuyNo5UGeKcE2Pge+bc1rhcKhr9P6psOwA== X-Received: by 10.98.26.18 with SMTP id a18mr23541743pfa.39.1464361890762; Fri, 27 May 2016 08:11:30 -0700 (PDT) Received: from ulysses ([155.69.171.221]) by smtp.gmail.com with ESMTPSA id to9sm28995185pab.27.2016.05.27.08.11.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 May 2016 08:11:29 -0700 (PDT) From: Chong Yidong To: bug-gnu-emacs@gnu.org Subject: 25.1.50; Gratuitous undo boundary in latex-insert-block Date: Fri, 27 May 2016 23:11:21 +0800 Message-ID: <87lh2vo7s6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit 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.8 (---) In GNU Emacs 25.1.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) 1. emacs -Q foo.tex 2. C-c C-o RET The buffer now contains an `enumerate' skeleton: \begin{enumerate} \item \end{enumerate} 3. C-/ After this undo command, the buffer now contains \begin{ Expected behavior: C-/ should undo the entire effects of C-c C-o, so the buffer should contain nothing at all. You shouldn't need another C-/ to get rid of the "\begin{". This happens because latex-insert-block uses skeleton-insert, in which the "interactor" specified for reading a string is lazily invoked only when the string appears in the skeleton. Hence, the "\begin{" is inserted into the buffer first, and then completing-read is called to ask for the LaTeX block name. The completing-read adds an undo boundary, in the midst of the changes by latex-insert-block. The attached patch, which gets rid of the undo boundary, seems to fix this: --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1539,7 +1539,8 @@ 'tex-latex-block (define-skeleton latex-insert-block "Create a matching pair of lines \\begin{NAME} and \\end{NAME} at point. Puts point on a blank line between them." - (let ((choice (completing-read (format "LaTeX block name [%s]: " + (let* ((buffer-undo-list t) ; Don't add an undo boundary + (choice (completing-read (format "LaTeX block name [%s]: " latex-block-default) (latex-complete-envnames) nil nil nil nil latex-block-default))) From debbugs-submit-bounces@debbugs.gnu.org Sat May 28 04:23:00 2016 Received: (at 23632) by debbugs.gnu.org; 28 May 2016 08:23:00 +0000 Received: from localhost ([127.0.0.1]:43162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6ZWO-0008P7-Eb for submit@debbugs.gnu.org; Sat, 28 May 2016 04:23:00 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6ZWM-0008Op-DD for 23632@debbugs.gnu.org; Sat, 28 May 2016 04:22:58 -0400 Received: by mail-pf0-f195.google.com with SMTP id b124so15468463pfb.0 for <23632@debbugs.gnu.org>; Sat, 28 May 2016 01:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=037o14RqfHxQdHWgi8n6rInoELwbQZqvFGB9oIWiuKw=; b=jAhw19PyFnJYIWLbn0CoorlLs7ASa/y1QUyKvwfEAxqSyff1zS44K7ljVA68hO+F2C xf9kHPPRvrj1GYOUt4O+GrSMkB4QHRqrlRLkg9BEo3KO5xGKunq0bbCDCACjnrl5Bs/E GssFCa4kklquvwiL++OwtyQl9PD76oi9emQcOp6mPIyBQXne1w7rkRmDv2Zw6UepIhNI WOJW7l5VnWVpwTCv18iYhPtvdHRNSQwhCEkzwgSWUVhfffcWAAHQO7JLLXY8OeRR9JCL R/4UUMZW983KKtfzNeTZ4am5rfG6irG2tCPzHtDXt6XybA7sP+aMluC+f/MNwmrUakMp L0nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=037o14RqfHxQdHWgi8n6rInoELwbQZqvFGB9oIWiuKw=; b=LPb++5Dv/SUK8uhN01A4dK78ohrOKUXpSZbp3Tck7FkHJLoK8rf2Lyz1eNReNvlgYc Pe0mrvcEL7sNJ5vwOn+D2Wd/cdJ5RJSAsJpt7zF9ntQPeDWVuzdmg81NrH4tKSfeNxzz hXOuzgo7+sZFcBj0j9Rx/AA4/JoVpUk6QR+++Pu/WOpUpulPFvvymzl8sdHspP+MR+Kb bknn7Wk93h0uugcrZgASb9N3eMmV3XqKRWXb016YQ547pfGrEvz5V/6pcPZGUIYsolQ0 NHvgNFyOtZnVrO+cLsMqk2C6XaS07IGgg6bq7zXUynA2vRCEZOEm5nJdRYb6ajDoW4rO GH3g== X-Gm-Message-State: ALyK8tIgAu2ZYE2lOW+KueFqaGDqg3IeELa3GM/10845t0SNBd3wnpxLOvCtJrJQUjJ1pQ== X-Received: by 10.98.35.93 with SMTP id j90mr29380290pfj.10.1464423772248; Sat, 28 May 2016 01:22:52 -0700 (PDT) Received: from ulysses ([155.69.188.43]) by smtp.gmail.com with ESMTPSA id hk7sm33369344pad.25.2016.05.28.01.22.48 for <23632@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 May 2016 01:22:50 -0700 (PDT) From: Chong Yidong To: 23632@debbugs.gnu.org Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> Date: Sat, 28 May 2016 16:22:43 +0800 In-Reply-To: <87lh2vo7s6.fsf@gmail.com> (Chong Yidong's message of "Fri, 27 May 2016 23:11:21 +0800") Message-ID: <87shx23830.fsf@gmail.com> 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: 0.1 (/) X-Debbugs-Envelope-To: 23632 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.1 (/) > The attached patch, which gets rid of the undo boundary, seems to fix > this: Actually, the previous patch does not DTRT: if you switch back to the original buffer from the minibuffer, and make further editing changes, those changes would get lost because buffer-undo-list is temporarily rebound. Here is a different patch, which works by removing the undo boundary in buffer-undo-list if there's one. It also tweaks HTML mode and Texinfo mode, which have similar issues. It defines a new function `undo-amalgamate', split off from `undo-auto-amalgamate', for convenience. diff --git a/lisp/simple.el b/lisp/simple.el index e257062..decd737 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2939,18 +2939,17 @@ undo-auto-amalgamate ;; Amalgamate all buffers that have changed. (dolist (b (cdr undo-auto--last-boundary-cause)) (when (buffer-live-p b) - (with-current-buffer - b - (when - ;; The head of `buffer-undo-list' is nil. - ;; `car-safe' doesn't work because - ;; `buffer-undo-list' need not be a list! - (and (listp buffer-undo-list) - (not (car buffer-undo-list))) - (setq buffer-undo-list - (cdr buffer-undo-list)))))) + (with-current-buffer b + (undo-amalgamate)))) (setq undo-auto--last-boundary-cause 0))))) +(defun undo-amalgamate () + "Amalgamate undo in the current buffer." + ;; `car-safe' doesn't work as `buffer-undo-list' need not be a list! + (and (listp buffer-undo-list) + (null (car buffer-undo-list)) + (pop buffer-undo-list))) + (defun undo-auto--undoable-change () "Called after every undoable buffer change." (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer)) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 990c09b..51b7241 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -700,11 +700,15 @@ sgml-tag `sgml-transformation-function' to `upcase'." (funcall (or skeleton-transformation-function 'identity) (setq sgml-tag-last - (completing-read - (if (> (length sgml-tag-last) 0) - (format "Tag (default %s): " sgml-tag-last) - "Tag: ") - sgml-tag-alist nil nil nil 'sgml-tag-history sgml-tag-last))) + ;; Avoid creating an undo boundary. + (prog1 + (completing-read + (if (> (length sgml-tag-last) 0) + (format "Tag (default %s): " sgml-tag-last) + "Tag: ") + sgml-tag-alist nil nil nil + 'sgml-tag-history sgml-tag-last) + (undo-amalgamate)))) ?< str | (("") -1 '(undo-boundary) (identity "<")) | ; see comment above `(("") '(setq v2 (sgml-attributes ,str t)) ?> diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index b38b147..8b7d98f 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1539,10 +1539,13 @@ 'tex-latex-block (define-skeleton latex-insert-block "Create a matching pair of lines \\begin{NAME} and \\end{NAME} at point. Puts point on a blank line between them." - (let ((choice (completing-read (format "LaTeX block name [%s]: " - latex-block-default) - (latex-complete-envnames) - nil nil nil nil latex-block-default))) + (let* ((buffer-undo-list t) + (choice (prog1 + (completing-read (format "LaTeX block name [%s]: " + latex-block-default) + (latex-complete-envnames) + nil nil nil nil latex-block-default) + (undo-amalgamate)))) (setq latex-block-default choice) (unless (or (member choice latex-standard-block-names) (member choice latex-block-names)) diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index ed6022f..fd411e2 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -653,9 +653,12 @@ texinfo-insert-block "Create a matching pair @ .. @end at point. Puts point on a blank line between them." (setq texinfo-block-default - (completing-read (format "Block name [%s]: " texinfo-block-default) - texinfo-environments - nil nil nil nil texinfo-block-default)) + (prog1 + (completing-read (format "Block name [%s]: " + texinfo-block-default) + texinfo-environments + nil nil nil nil texinfo-block-default) + (undo-amalgamate))) \n "@" str ;; Blocks that take parameters: all the def* blocks take parameters, ;; plus a few others. From debbugs-submit-bounces@debbugs.gnu.org Sun May 29 17:51:45 2016 Received: (at 23632) by debbugs.gnu.org; 29 May 2016 21:51:45 +0000 Received: from localhost ([127.0.0.1]:46680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b78ca-0005EB-Pf for submit@debbugs.gnu.org; Sun, 29 May 2016 17:51:44 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:36091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b78cZ-0005Dz-Gd for 23632@debbugs.gnu.org; Sun, 29 May 2016 17:51:44 -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=6+DAlufSt3W7xHsBMCX9vfVB3V6GWOUtD2Zr5UL9zM4=; b=xxEX+zSUfe6Tckraac48N8laVk Qpg5AR4pJuGZ/3+v0P/g8Wn/IPx09aMBK/RdjxW80DBQKl9Vt/Y1jhyupWjBeXtzj0oow0qdH+jqD 5VGxd0Yn+DWJ6jTcad42DSOtklqvdE8chEUgjbdYdlT0iAyrKnf6JLNc/2/nU67z07rl1ICggJNQv 1poWXpI8IzvyT3hAoCcs2ZO4booO/jCGsaNe2EMXXrk9ukBXZZx2tv4QZNfV8SnHYE60cvD8jNWqF QDMdx2c4CfKPoKX6aKfc4We219B0REraq+03h0lVt3jLdyYUPuAyMQGjIa4qGvjEfUQEpYURXyfUp 7W4bUZ4A==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:59785 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b78cT-001P7h-Cy; Sun, 29 May 2016 22:51:37 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Chong Yidong Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> Date: Sun, 29 May 2016 22:51:36 +0100 In-Reply-To: <87shx23830.fsf@gmail.com> (Chong Yidong's message of "Sat, 28 May 2016 16:22:43 +0800") Message-ID: <87wpmcwn13.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-Debbugs-Envelope-To: 23632 Cc: 23632@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.0 (/) Chong Yidong writes: >> The attached patch, which gets rid of the undo boundary, seems to fix >> this: > > Actually, the previous patch does not DTRT: if you switch back to the > original buffer from the minibuffer, and make further editing changes, > those changes would get lost because buffer-undo-list is temporarily > rebound. > > Here is a different patch, which works by removing the undo boundary in > buffer-undo-list if there's one. It also tweaks HTML mode and Texinfo > mode, which have similar issues. It defines a new function > `undo-amalgamate', split off from `undo-auto-amalgamate', for > convenience. In and off itself, the patch seems fine, but my concern is that that the previous heuristic did the right thing, the new heuristic does not. If you've found three instances where it's causing a problem, then there will be others also. I'm not 100% sure why the old system didn't insert an undo-boundary. But, if we could solve this entirely in the undo system without changes to client code that would be nicer. Not sure how yet -- need a few days to think about it. Perhaps, suppressing the auto-boundary functionality when only the mini-buffer has changed. Phil From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 17:43:01 2016 Received: (at 23632) by debbugs.gnu.org; 31 May 2016 21:43:02 +0000 Received: from localhost ([127.0.0.1]:48813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7rRF-0006kc-Do for submit@debbugs.gnu.org; Tue, 31 May 2016 17:43:01 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:46375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7rRC-0006kF-ND for 23632@debbugs.gnu.org; Tue, 31 May 2016 17:42:59 -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=gyamnXSomSjUndahX/N69ib2OFVkKYTA4MqaWUHNwAg=; b=PtOQdGvrjqhr/aAe0YH1KDr/F2 gTqVFbbXWtjZr6XMe+Ae1kKinHgcr687RyOcY0Ax6Ie46BV2SJcRjCgAAhC6AsOfyAcU5+F9Ik+jc vvymx2K5cnABPUrEfJXfjvzvaaz1l4N/Menedl4DV1bWllQ38x6nWjKMnL3lgzqVrQyMzNfMoF0If 9orNmYfMXA6+NuCbLM0gYhcLw1S6F0m6LHfYrO3Py9kOOCzyEOulJulT0hcMK9zVnel9Y0Idb1UJm bWeorOrN4F0KkFGMd1bMYsPe6Ogio4xXGGuOc8GrGulesjz7kd2jB8FG7dPaE3jaSdF9QdxT6cMFk gNmBlzQw==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:36549 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b7rR6-004MEi-5R; Tue, 31 May 2016 22:42:52 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Chong Yidong Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block In-Reply-To: <87wpmcwn13.fsf@russet.org.uk> (Phillip Lord's message of "Sun, 29 May 2016 22:51:36 +0100") Date: Tue, 31 May 2016 22:42:36 +0100 Message-ID: <87wpm9q4z7.fsf@russet.org.uk> References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (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-Debbugs-Envelope-To: 23632 Cc: 23632@debbugs.gnu.org, Stefan Monnier 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 phillip.lord@russet.org.uk (Phillip Lord) writes: > Chong Yidong writes: > >>> The attached patch, which gets rid of the undo boundary, seems to fix >>> this: >> >> Actually, the previous patch does not DTRT: if you switch back to the >> original buffer from the minibuffer, and make further editing changes, >> those changes would get lost because buffer-undo-list is temporarily >> rebound. >> >> Here is a different patch, which works by removing the undo boundary in >> buffer-undo-list if there's one. It also tweaks HTML mode and Texinfo >> mode, which have similar issues. It defines a new function >> `undo-amalgamate', split off from `undo-auto-amalgamate', for >> convenience. > > > In and off itself, the patch seems fine, but my concern is that that the > previous heuristic did the right thing, the new heuristic does not. If > you've found three instances where it's causing a problem, then there > will be others also. > > I'm not 100% sure why the old system didn't insert an undo-boundary. > But, if we could solve this entirely in the undo system without changes > to client code that would be nicer. > > Not sure how yet -- need a few days to think about it. Perhaps, > suppressing the auto-boundary functionality when only the mini-buffer > has changed. I've debugged this now. The problem, I think, is that latex-insert-block uses recursive editing (via `completing-read', then `read-from-minibuffer') -- so the minibuffer is edited, then the exit-minibuffer command runs, causing an undo boundary to be added to minibuffer (correctly) but also to the latex buffer because it has also changed. The patch below seems to fix -- I need to test it out tomorrow in case it has any other unexpected effects. What worries me is that it just deals with the minibuffer. I wonder whether there are other circumstances where a recursive edit is going to break things. Stefan, would welcome your opinion here. Incidentally, this is a nightmare to debug. Emacs needs to be able to write to standard out, so I could log without changing any buffers! --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Stop-mini-buffer-causing-undo-boundaries.patch >From 9116e7f00f90fb14857d21698b1e6870fcf98bbd Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Mon, 30 May 2016 22:50:36 +0100 Subject: [PATCH] Stop mini-buffer causing undo boundaries * lisp/simple.el (undo-auto--boundaries): Check whether minibuffer is current, and if so limit undo-boundaries to it. Addresses #23632 --- lisp/simple.el | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index c5aa292..788cbb2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2887,12 +2887,21 @@ 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." - (dolist (b undo-auto--undoably-changed-buffers) - (when (buffer-live-p b) - (with-current-buffer b - (unless undo-auto-disable-boundaries - (undo-auto--ensure-boundary cause))))) - (setq undo-auto--undoably-changed-buffers nil)) + ;; We treat the minibuffer specially, because some commands use the + ;; minibuffer after changing the buffer that they are launched + ;; from. Changes in the minibuffer force an undo-boundary in the + ;; launched buffer without this handling. (see bug #23632) + (if (minibufferp) + (progn + (undo-auto--ensure-boundary cause) + (setq undo-auto--undoably-changed-buffers + (delq (current-buffer) undo-auto--undoably-changed-buffers))) + (dolist (b undo-auto--undoably-changed-buffers) + (when (buffer-live-p b) + (with-current-buffer b + (unless undo-auto-disable-boundaries + (undo-auto--ensure-boundary cause))))) + (setq undo-auto--undoably-changed-buffers nil))) (defun undo-auto--boundary-timer () "Timer which will run `undo--auto-boundary-timer'." -- 2.8.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 09:15:45 2016 Received: (at 23632) by debbugs.gnu.org; 1 Jun 2016 13:15:45 +0000 Received: from localhost ([127.0.0.1]:49186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b85zt-0003Te-BF for submit@debbugs.gnu.org; Wed, 01 Jun 2016 09:15:45 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:18069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b85zr-0003TR-EJ for 23632@debbugs.gnu.org; Wed, 01 Jun 2016 09:15:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AvEwA731xV/+/DSC1cgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA2IWwjPIwEBAQEBAQQBAQEBHos6hQUHhC0FnxeSFINZI4FmJByBbiKCeAEBAQ X-IPAS-Result: A0AvEwA731xV/+/DSC1cgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA2IWwjPIwEBAQEBAQQBAQEBHos6hQUHhC0FnxeSFINZI4FmJByBbiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="240151029" Received: from 45-72-195-239.cpe.teksavvy.com (HELO pastel.home) ([45.72.195.239]) by ironport2-out.teksavvy.com with ESMTP; 01 Jun 2016 09:15:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id 36E8063FDB; Wed, 1 Jun 2016 09:15:37 -0400 (EDT) From: Stefan Monnier To: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> Date: Wed, 01 Jun 2016 09:15:37 -0400 In-Reply-To: <87wpm9q4z7.fsf@russet.org.uk> (Phillip Lord's message of "Tue, 31 May 2016 22:42:36 +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: > What worries me is that it just deals with the minibuffer. I wonder > whether there are other circumstances where a recursive edit is going to > break things. I guess we could introduce a new var (call it `undo-auto-current-buffer-only' or `undo-auto-ignore-other-buffers' or what have you) which packages could let-bind around recursive edits. We could also change the minibuf.c code to bind this var, so you could check the var instead of hard-coding (minibufferp) in your patch. [...] 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. 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [206.248.154.181 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: 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: > What worries me is that it just deals with the minibuffer. I wonder > whether there are other circumstances where a recursive edit is going to > break things. I guess we could introduce a new var (call it `undo-auto-current-buffer-only' or `undo-auto-ignore-other-buffers' or what have you) which packages could let-bind around recursive edits. We could also change the minibuf.c code to bind this var, so you could check the var instead of hard-coding (minibufferp) in your patch. [...] 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 > What worries me is that it just deals with the minibuffer. I wonder > whether there are other circumstances where a recursive edit is going to > break things. I guess we could introduce a new var (call it `undo-auto-current-buffer-only' or `undo-auto-ignore-other-buffers' or what have you) which packages could let-bind around recursive edits. We could also change the minibuf.c code to bind this var, so you could check the var instead of hard-coding (minibufferp) in your patch. The main use-case I can think of would be debug/edebug. This said, if the changes in other buffers are due to process-filters, then they still should get an undo-boundary during minibuffer/recursive edits. So maybe instead of "only push undo-boundaries in current-buffer", we should have a variable holding a list of buffers where we shouldn't push undo-boundaries (unless they're the current-buffer). Or an alternative would be to do what Viper does (well, did): keep pushing boundaries as before, but when we return from the minibuffer, remove any boundaries that were inserted into the current-buffer's undo-list during the recursive edit. > Incidentally, this is a nightmare to debug. Emacs needs to be able to > write to standard out, so I could log without changing any buffers! What I do is to push to a variable, and then observe the var from M-x ielm or some such. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 22:58:53 2016 Received: (at 23632) by debbugs.gnu.org; 3 Jun 2016 02:58:53 +0000 Received: from localhost ([127.0.0.1]:52207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8fK1-00023B-4w for submit@debbugs.gnu.org; Thu, 02 Jun 2016 22:58:53 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8fJz-00022z-Rw for 23632@debbugs.gnu.org; Thu, 02 Jun 2016 22:58:52 -0400 Received: by mail-pa0-f53.google.com with SMTP id te7so6882142pab.3 for <23632@debbugs.gnu.org>; Thu, 02 Jun 2016 19:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=eRD0QnBmsfWfIBksjskGkpV3RHm1QrUXnNBd9o2HCBE=; b=b6WYG1ZWuj+ggy5zX2wyN88Bbv3+o5aEs2UIhyAur2qtE5982bBDK9eGHuIlISzRx5 POaSeENjrmfq9YGmG6N2IVNxBuBLuSHtYEGRqd1crNS3MD35ng1kvjS75rHzNBaMfmS9 YJrTBvvCENFNil6rsVP0c+1PJPBF1JYkQhCUqROTo46rLg2WKSDNT9zejAA2YciNfJck WphpcRd/lmXwadu1f6HrEDJhg9nZgJTxQ+UJnal5DNBXdPo6OSHYUcwufs6flFFr13i/ guB/JYt3kGSnKLf3wQdT/csPNI97M0w69s/6WNTsSdCzrUeCZUAtNmPVIsD91bHJW/zI pOgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=eRD0QnBmsfWfIBksjskGkpV3RHm1QrUXnNBd9o2HCBE=; b=luN+drsRjKy3x51bOalMkL609Fvl2t+d5WP5GWO3Ve6cliVa3CCwvjCRIo0Zk647Ux NV2H+R830IPeDL7eovetG2dmQy/iax2oULGoFAuQXmkdfmNuFEczlSanQtQdBe16D5jw c4M4k1X26jBlZTo3k1oSSQcP5suBPGmOpSBtEovTNZot8wbcvcq9Eu5kBU7OSTm3Py7H JZaxP5QyuCwitOuQJWTcIzbbC+aDrdCc65/5PRgFbY3cb7+vJEkcHY9BdWnokcDDQt2r Xyyi+TGHHaaYNJTJ1yQyw8myTMeir/YaJRgm8rWtibvVSOCU6RPHg4nFLq8X1613Gd8j tIpQ== X-Gm-Message-State: ALyK8tIXP4Xhhm8oyQhztsTnbGcZXVMMOqP2MNx1tzfi58bY6eCNvHANhqYoztdGfaxI5Q== X-Received: by 10.66.62.196 with SMTP id a4mr1871122pas.25.1464922725750; Thu, 02 Jun 2016 19:58:45 -0700 (PDT) Received: from tsparkle ([155.69.16.255]) by smtp.gmail.com with ESMTPSA id p4sm1456094pac.1.2016.06.02.19.58.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2016 19:58:44 -0700 (PDT) From: Chong Yidong To: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> Date: Fri, 03 Jun 2016 10:58:14 +0800 In-Reply-To: <87wpmcwn13.fsf@russet.org.uk> (Phillip Lord's message of "Sun, 29 May 2016 22:51:36 +0100") Message-ID: <87bn3j7zcp.fsf@gmail.com> 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: -0.5 (/) X-Debbugs-Envelope-To: 23632 Cc: 23632@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.5 (/) phillip.lord@russet.org.uk (Phillip Lord) writes: > In and off itself, the patch seems fine, but my concern is that that > the previous heuristic did the right thing, the new heuristic does > not. If you've found three instances where it's causing a problem, > then there will be others also. You mentioned "the new heuristic" and "the old system", but to be clear, this behavior is not a new one. I can reproduce it in Emacs 24.3, and it probably goes back farther than that. Also, the solution needs to handle the case where the user switches from the minibuffer back to the original buffer and does some editing, including possible calling undo. The undo boundaries thus created ought to be preserved. Only the undo boundary created specially for completing-read ought to be automatically removed. From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 05:42:53 2016 Received: (at 23632) by debbugs.gnu.org; 3 Jun 2016 09:42:53 +0000 Received: from localhost ([127.0.0.1]:52399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8lcz-0006lI-7m for submit@debbugs.gnu.org; Fri, 03 Jun 2016 05:42:53 -0400 Received: from cheviot12.ncl.ac.uk ([128.240.234.12]:37118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8lcx-0006l9-8l for 23632@debbugs.gnu.org; Fri, 03 Jun 2016 05:42:52 -0400 Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot12.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1b8lcw-0007y7-9p; Fri, 03 Jun 2016 10:42:50 +0100 Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1b8lcv-0006GP-Rg; Fri, 03 Jun 2016 10:42:49 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Stefan Monnier Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block In-Reply-To: (Stefan Monnier's message of "Wed, 01 Jun 2016 09:15:37 -0400") Date: Thu, 02 Jun 2016 21:08:46 +0100 Message-ID: <87vb1rbbg1.fsf@russet.org.uk> References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.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-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: -1.5 (-) Stefan Monnier writes: >> What worries me is that it just deals with the minibuffer. I wonder >> whether there are other circumstances where a recursive edit is going to >> break things. > > I guess we could introduce a new var (call it > `undo-auto-current-buffer-only' or `undo-auto-ignore-other-buffers' or > what have you) which packages could let-bind around recursive edits. > We could also change the minibuf.c code to bind this var, so you could > check the var instead of hard-coding (minibufferp) in your patch. > > The main use-case I can think of would be debug/edebug. > > This said, if the changes in other buffers are due to process-filters, > then they still should get an undo-boundary during > minibuffer/recursive edits. So maybe instead of "only push > undo-boundaries in current-buffer", we should have a variable holding > a list of buffers where we shouldn't push undo-boundaries (unless > they're the current-buffer). > > Or an alternative would be to do what Viper does (well, did): keep > pushing boundaries as before, but when we return from the minibuffer, > remove any boundaries that were inserted into the current-buffer's > undo-list during the recursive edit. What I dislike about this is that other packages are responsible for getting things right. What about this 1) undo-auto--undoably-changed-buffers becomes an alist ((0 . (buffers*)) (1 . (buffers*)) (2 . (buffers*))) where the key is the return of (recursion-depth) 2) undo-auto--boundaries operates only on buffers at the current-recursion-depth. Or, probably, at the current of greater recursion depth, to ensure that undo-buffers happens when a recursive edit exits. This way, process buffers will still get an undo-boundary if they change during the recursive edit. >> Incidentally, this is a nightmare to debug. Emacs needs to be able to >> write to standard out, so I could log without changing any buffers! > > What I do is to push to a variable, and then observe the var from M-x > ielm or some such. That's a good idea -- I've been doing the former, then using C-hv. Phil From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 09:00:51 2016 Received: (at 23632) by debbugs.gnu.org; 3 Jun 2016 13:00:51 +0000 Received: from localhost ([127.0.0.1]:52479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8oiY-0004zY-Ua for submit@debbugs.gnu.org; Fri, 03 Jun 2016 09:00:51 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8oiX-0004zQ-89 for 23632@debbugs.gnu.org; Fri, 03 Jun 2016 09:00:50 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u53D0kfu000353; Fri, 3 Jun 2016 09:00:46 -0400 Received: by pastel.home (Postfix, from userid 20848) id D70D2605F1; Fri, 3 Jun 2016 09:00:47 -0400 (EDT) From: Stefan Monnier To: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> Date: Fri, 03 Jun 2016 09:00:47 -0400 In-Reply-To: <87vb1rbbg1.fsf@russet.org.uk> (Phillip Lord's message of "Thu, 02 Jun 2016 21:08:46 +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 RV5692=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5692> : inlines <4902> : streams <1645937> : uri <2223006> X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: -1.8 (-) > 1) undo-auto--undoably-changed-buffers becomes an alist > ((0 . (buffers*)) > (1 . (buffers*)) > (2 . (buffers*))) > where the key is the return of (recursion-depth) > 2) undo-auto--boundaries operates only on buffers at the > current-recursion-depth. Or, probably, at the current of greater > recursion depth, to ensure that undo-buffers happens when a recursive > edit exits. Hmm... sounds pretty good, and I think you can do it more simply: just let-bind undo-auto--undoably-changed-buffers to nil when entering a recursive edit. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 12:13:28 2016 Received: (at 23632) by debbugs.gnu.org; 3 Jun 2016 16:13:28 +0000 Received: from localhost ([127.0.0.1]:53430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8riy-0001GS-7s for submit@debbugs.gnu.org; Fri, 03 Jun 2016 12:13:28 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:59944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8riw-0001G7-2J for 23632@debbugs.gnu.org; Fri, 03 Jun 2016 12:13:27 -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=YUNLkkqKwOaZZ+Y+Oe0SA1wRL/Y5jATidq0m3G4r7uI=; b=zlQE2t6BLgCBtQ9hiwc+OePCwI sH+0ESTSltjxyVluvr7lwNHrxQtPR8wMn/fXvSKpxv9hcpQ4ZLb7eH6udTdL9R1F0VwL5qdPzSgLf bmG92rjcNU1i+61TM3IKY1SzMhR/oN8qXvlDdymIVDjhkOnIf4n35cxGppk2Rf3p1cKZfvgwyIUP0 2CuypRtsg4ZI+bqix2gZtP1ecAgWCsUWQHAAdBBLu6H8lACVyuHMU+efDvMwtk2+tPwzdsT4ZHGPh aCyVXb5jb9ShLTSPisQYKz6LpFUdzYg0VSu1G0EInJ3vEVEF7s8frwhyfQfLP95ZMAU3EqzLQoZgz d9cwC5MQ==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32532 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b8rip-001asp-Lh; Fri, 03 Jun 2016 17:13:19 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Stefan Monnier Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> Date: Fri, 03 Jun 2016 17:13:19 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 03 Jun 2016 09:00:47 -0400") Message-ID: <87shwutfmo.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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.0 (/) --=-=-= Content-Type: text/plain Stefan Monnier writes: >> 1) undo-auto--undoably-changed-buffers becomes an alist > >> ((0 . (buffers*)) >> (1 . (buffers*)) >> (2 . (buffers*))) > >> where the key is the return of (recursion-depth) > >> 2) undo-auto--boundaries operates only on buffers at the >> current-recursion-depth. Or, probably, at the current of greater >> recursion depth, to ensure that undo-buffers happens when a recursive >> edit exits. > > Hmm... sounds pretty good, and I think you can do it more simply: > just let-bind undo-auto--undoably-changed-buffers to nil when entering > a recursive edit. Tried it before I got your mail. Seems to function. Simple let binding would not give quite the same functionality, because of the last part -- I also add a boundary to buffers with a greater recursive depth; with a let binding, I think these would be unbound for commands that lower the recursion depth. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-undo-boundaries-based-on-recursion-depth.patch >From 018429dafe1395e0927934fd95d65b74c69b2d07 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Mon, 30 May 2016 22:50:36 +0100 Subject: [PATCH] Add undo-boundaries based on recursion depth * lisp/simple.el (undo-auto--undoably-changed-buffers): Now an alist which stores recursion depth as well as changes. (undo-auto--boundaries): Add boundaries only to buffers at current or higher recursion depth. (undo-auto--undoable-change): Adjust for other changes. (undo-auto--extract-buffers, undo-auto--undoable-change-1): New functions. Addresses #23632 --- lisp/simple.el | 66 +++++++++++++++++++++++++----- test/automated/simple-test.el | 94 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 149 insertions(+), 11 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index c5aa292..d55d9b0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2867,7 +2867,7 @@ undo-auto--last-boundary-amalgamating-number that calls `undo-auto-amalgamate'." (car-safe undo-auto--last-boundary-cause)) -(defun undo-auto--ensure-boundary (cause) +(defun undo-auto--ensure-boundary (changed-buffers cause) "Add an `undo-boundary' to the current buffer if needed. REASON describes the reason that the boundary is being added; see `undo-auto--last-boundary' for more information." @@ -2880,19 +2880,44 @@ undo-auto--ensure-boundary (if (eq 'amalgamate cause) (cons (if last-amalgamating (1+ last-amalgamating) 0) - undo-auto--undoably-changed-buffers) + changed-buffers) cause))))) +(defun undo-auto--extract-buffers (depth buffer-list &optional no-change) + "Extract buffers from BUFFER-LIST at DEPTH or deeper. + +This expects BUFFER-LIST to be of the form of +`undo-auto--undoably-changed-buffers'. The relevant buffers are +returned, and removed from BUFFER-LIST by side effect. + +If NO-CHANGE is non-nil, do not alter BUFFER-LIST." + (let ((rtn)) + (dolist (level-and-buffer buffer-list) + (when (<= depth + (car level-and-buffer)) + (dolist (b (cdr level-and-buffer)) + (setq rtn (cons b rtn))) + (unless no-change + (setcdr level-and-buffer nil)))) + rtn)) + (defun undo-auto--boundaries (cause) "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." - (dolist (b undo-auto--undoably-changed-buffers) - (when (buffer-live-p b) - (with-current-buffer b - (unless undo-auto-disable-boundaries - (undo-auto--ensure-boundary cause))))) - (setq undo-auto--undoably-changed-buffers nil)) + ;; We must account for recusion depth in general, and also + ;; specifically, to cope with changes in the minibuffer (see bug + ;; #23632). + (let ((changed-buffers + (undo-auto--extract-buffers + (recursion-depth) + ;; This is updated by side effect. + undo-auto--undoably-changed-buffers))) + (dolist (b changed-buffers) + (when (buffer-live-p b) + (with-current-buffer b + (unless undo-auto-disable-boundaries + (undo-auto--ensure-boundary changed-buffers cause))))))) (defun undo-auto--boundary-timer () "Timer which will run `undo--auto-boundary-timer'." @@ -2912,6 +2937,10 @@ undo-auto--undoably-changed-buffers `undo-auto--boundaries' and can be affected by changes to their default values. +It is an list of conses whose car is the last returned value of +`recursion-depth', and whose cdr is the list of changed buffers at that +depth. + See also `undo-auto--buffer-undoably-changed'.") (defun undo-auto--add-boundary () @@ -2955,9 +2984,26 @@ undo-auto-amalgamate (cdr buffer-undo-list)))))) (setq undo-auto--last-boundary-cause 0))))) -(defun undo-auto--undoable-change () +(defun undo-auto--undoable-change-1 (depth buffer changed-buffers) "Called after every undoable buffer change." - (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer)) + (let ((buffers-for-depth (assoc depth changed-buffers))) + (if buffers-for-depth + (progn + (setcdr buffers-for-depth + (cons buffer (cdr buffers-for-depth))) + changed-buffers) + (cons + (list + depth + buffer) + changed-buffers)))) + +(defun undo-auto--undoable-change () + (setq undo-auto--undoably-changed-buffers + (undo-auto--undoable-change-1 + (recursion-depth) + (current-buffer) + undo-auto--undoably-changed-buffers)) (undo-auto--boundary-ensure-timer)) ;; End auto-boundary section diff --git a/test/automated/simple-test.el b/test/automated/simple-test.el index 12ebc75..57dbbf0 100644 --- a/test/automated/simple-test.el +++ b/test/automated/simple-test.el @@ -237,7 +237,9 @@ simple-test--transpositions (with-temp-buffer (setq buffer-undo-list nil) (insert "hello") - (member (current-buffer) undo-auto--undoably-changed-buffers))) + (member (current-buffer) + (assoc 0 + undo-auto--undoably-changed-buffers)))) ;; The head of buffer-undo-list should be the insertion event, and ;; therefore not nil (should @@ -310,6 +312,96 @@ undo-test-point-after-forward-kill (= 6 (undo-test-point-after-forward-kill)))) +(ert-deftest simple-test-undo--auto-undoable-change-1 () + (should + (equal + '((0 a)) + (undo-auto--undoable-change-1 0 'a nil))) + (should + (equal + '((0 b a)) + (undo-auto--undoable-change-1 + 0 'b + '((0 a))))) + (should + (equal + '((1 c) + (0 a)) + (undo-auto--undoable-change-1 + 1 'c '((0 a)))))) + +(ert-deftest simple-test-undo-auto--extract-buffers () + (should + (equal + (list + '((1) + (0 a)) + '(c)) + (let + ((buffer-list + '((1 c) + (0 a)))) + (list + buffer-list + (undo-auto--extract-buffers + 1 buffer-list)))))) + +;; These macros are lifted from assess-robot.el, and should be removed +;; when that comes into core. +(defmacro simple-test-with-switched-buffer (buffer &rest body) + (declare (indent 1) (debug t)) + (let ((before-buffer (make-symbol "before-buffer"))) + `(let ((,before-buffer (current-buffer))) + (unwind-protect + (progn + (switch-to-buffer ,buffer) + ,@body) + (switch-to-buffer ,before-buffer))))) + +(defmacro simple-test-with-temp-switched-buffer (&rest body) + (declare (indent 0) (debug t)) + (let ((temp-buffer (make-symbol "temp-buffer"))) + `(let ((,temp-buffer (generate-new-buffer " *temp*"))) + (simple-test-with-switched-buffer ,temp-buffer + (unwind-protect + (progn + (setq buffer-undo-list nil) + ,@body) + (and (buffer-name ,temp-buffer) + ;(kill-buffer ,temp-buffer) + )))))) + +(ert-deftest simple-test-undo-amalgamation () + ;; We should undo 0123456789 but not hello + (should + (string= + "hello +" + (simple-test-with-temp-switched-buffer + (execute-kbd-macro + (read-kbd-macro + " +hello ;; self-insert-command +RET ;; newline +0123456789 ;; self-insert-command +C-/ ;; undo +" + )) + (buffer-substring-no-properties (point-min) + (point-max))))) + ;; we should leave 20 characters in the buffer + (should + (string= + "012345678901234567890" + (simple-test-with-temp-switched-buffer + (execute-kbd-macro + (read-kbd-macro + " +012345678901234567890123456789 ;; self-insert-command +C-/ ;; undo")) + (buffer-substring-no-properties + (point-min) + (point-max)))))) (provide 'simple-test) ;;; simple-test.el ends here -- 2.8.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 13:00:08 2016 Received: (at 23632) by debbugs.gnu.org; 3 Jun 2016 17:00:08 +0000 Received: from localhost ([127.0.0.1]:53440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8sS8-0002O2-Ig for submit@debbugs.gnu.org; Fri, 03 Jun 2016 13:00:08 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8sS7-0002Nt-1H for 23632@debbugs.gnu.org; Fri, 03 Jun 2016 13:00:07 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u53H04t5003820; Fri, 3 Jun 2016 13:00:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 00C5160164; Fri, 3 Jun 2016 13:00:03 -0400 (EDT) From: Stefan Monnier To: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> Date: Fri, 03 Jun 2016 13:00:03 -0400 In-Reply-To: <87shwutfmo.fsf@russet.org.uk> (Phillip Lord's message of "Fri, 03 Jun 2016 17:13:19 +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 RV5692=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5692> : inlines <4902> : streams <1646025> : uri <2223125> X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: -1.8 (-) > Simple let binding would not give quite the same functionality, because > of the last part -- I also add a boundary to buffers with a greater > recursive depth; with a let binding, I think these would be unbound for > commands that lower the recursion depth. Ah, you mean that the value of undo-auto--undoably-changed-buffers needs to be propagated "out" when we leave the let-binding. You're right. So instead of a simple `let', it needs to be something like: (let ((tmp ())) (unwind-protect (let ((undo-auto--undoably-changed-buffers nil)) (unwind-protect (setq tmp undo-auto--undoably-changed-buffers))) (setq undo-auto--undoably-changed-buffers (append tmp undo-auto--undoably-changed-buffers)))) Or (let ((tmp undo-auto--undoably-changed-buffers)) (unwind-protect (progn (setq undo-auto--undoably-changed-buffers nil) ) (setq undo-auto--undoably-changed-buffers (append undo-auto--undoably-changed-buffers tmp)))) Maybe a simple alternative would be to do (let ((undo-auto--undoably-changed-buffers nil)) (unwind-protect (undo-auto--ensure-boundary undo-auto--undoably-changed-buffers))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 18:19:04 2016 Received: (at 23632) by debbugs.gnu.org; 3 Jun 2016 22:19:04 +0000 Received: from localhost ([127.0.0.1]:53521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8xQm-0004oj-9z for submit@debbugs.gnu.org; Fri, 03 Jun 2016 18:19:04 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:47228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8xQl-0004oG-CW for 23632@debbugs.gnu.org; Fri, 03 Jun 2016 18:19:03 -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=lfbN4eNiDPTwtrmCi0apjm97DZh3+xXUSFJHoo2S094=; b=LHUHmdFxj45c0wxRPHTZHx7L7f R7CrejBhTJUCRKX2c7p0UNG0SpnARaSpwZ3Agypr+2hHohLSxhwMZvPQOWmV8B+i+0P1ojfQNkWHO iy1h+RxYis2rxzi6WEFseO4UTU5FZcLUobgjDG1kCaSbSzbOUzbfW42fDJ3UtkvRFYlAvv+buBUAL E1inkvMY5yFMtK25kyHzDThzngOPLUZiYcVSm9HbKu5vthBzzL60/PO2HWg2u3XlV/Dd9BqrEgW2h VDHRKIg0Wwa9kJPCY5jfRT/V+Wxi133/NEWvVup2UezBydeTBnBAjw5GBc7B2qKoCpS0726c1W/Ax 23H9ahtg==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:57078 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b8xQf-002aze-D3; Fri, 03 Jun 2016 23:18:57 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Stefan Monnier Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> Date: Fri, 03 Jun 2016 23:18:56 +0100 In-Reply-To: (Stefan Monnier's message of "Fri, 03 Jun 2016 13:00:03 -0400") Message-ID: <87porxrk4v.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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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.0 (/) Stefan Monnier writes: >> Simple let binding would not give quite the same functionality, because >> of the last part -- I also add a boundary to buffers with a greater >> recursive depth; with a let binding, I think these would be unbound for >> commands that lower the recursion depth. > > Ah, you mean that the value of undo-auto--undoably-changed-buffers needs > to be propagated "out" when we leave the let-binding. I *think* so -- I'm not entirely sure. It might make no difference. > You're right. So instead of a simple `let', it needs to be something > like: > > (let ((tmp ())) > (unwind-protect > (let ((undo-auto--undoably-changed-buffers nil)) > (unwind-protect > > (setq tmp undo-auto--undoably-changed-buffers))) > (setq undo-auto--undoably-changed-buffers > (append tmp undo-auto--undoably-changed-buffers)))) > > Or > > (let ((tmp undo-auto--undoably-changed-buffers)) > (unwind-protect > (progn > (setq undo-auto--undoably-changed-buffers nil) > ) > (setq undo-auto--undoably-changed-buffers > (append undo-auto--undoably-changed-buffers tmp)))) > > Maybe a simple alternative would be to do > > (let ((undo-auto--undoably-changed-buffers nil)) > (unwind-protect > > (undo-auto--ensure-boundary undo-auto--undoably-changed-buffers))) I use this variable in several different places in two different places though -- once when we capture the undoable changes (which happens often) and once on at the end of each command. I'd have to do this let binding in the command loop? My current solution seems simpler, even if it does feel like I have created "recursion-level" local variables. Or am I totally mis-understanding what you are suggesting? I'd be happier with a simpler implementation if possible. Phil From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 03 23:05:31 2016 Received: (at 23632) by debbugs.gnu.org; 4 Jun 2016 03:05:31 +0000 Received: from localhost ([127.0.0.1]:53636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b91ty-0004e1-Tl for submit@debbugs.gnu.org; Fri, 03 Jun 2016 23:05:31 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:57587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b91tw-0004ds-7b for 23632@debbugs.gnu.org; Fri, 03 Jun 2016 23:05:29 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u5435P3U027978; Fri, 3 Jun 2016 23:05:25 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id EE741AE2B9; Fri, 3 Jun 2016 23:05:24 -0400 (EDT) From: Stefan Monnier To: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> Date: Fri, 03 Jun 2016 23:05:24 -0400 In-Reply-To: <87porxrk4v.fsf@russet.org.uk> (Phillip Lord's message of "Fri, 03 Jun 2016 23:18:56 +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 RV5692=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5692> : inlines <4902> : streams <1646253> : uri <2223397> X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: -2.8 (--) >>> Simple let binding would not give quite the same functionality, because >>> of the last part -- I also add a boundary to buffers with a greater >>> recursive depth; with a let binding, I think these would be unbound for >>> commands that lower the recursion depth. >> Ah, you mean that the value of undo-auto--undoably-changed-buffers needs >> to be propagated "out" when we leave the let-binding. > I *think* so -- I'm not entirely sure. It might make no difference. It makes a difference, since otherwise we may forget that some changes were made in a buffer and fail to push a boundary for them. Not super terribly serious, admittedly. > I use this variable in several different places in two different places > though Not sure what you mean by "use", and there's clearly some typo about "places" which makes the meaning even more murky. > -- once when we capture the undoable changes (which happens > often) and once on at the end of each command. Right. I see no need for any changes there. > I'd have to do this let binding in the command loop? We'd need this right when we enter a recursive-edit (minibuffer or not), so maybe doing it when we enter the command loop would work. > My current solution seems simpler, even if it does feel like I have > created "recursion-level" local variables. My impression that a let-binding plus a call to undo-auto--ensure-boundary will be simpler than your patch. But it's hard to be sure until it's actually implemented. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 04:51:24 2016 Received: (at 23632) by debbugs.gnu.org; 4 Jun 2016 08:51:24 +0000 Received: from localhost ([127.0.0.1]:53710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b97Ih-0004Ug-UU for submit@debbugs.gnu.org; Sat, 04 Jun 2016 04:51:24 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:48233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b97Ig-0004US-9v for 23632@debbugs.gnu.org; Sat, 04 Jun 2016 04:51:22 -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:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=VAu7VRyzp6TOxtNE98FAu1ejY5rWefXw55AaaG2OiUM=; b=c3hE9e9wdeqyZmRd4tSnb78UAk NVJWpv1+qc3s7868iq5pdEXYXVts0smT8R7nlLPdKM+N2gnzO4TzLrOFMNADeyarTyOEVaS97XSBN Pv5JPo65HTQ4/qa0iZRFFPnura5AHHCic4aYef5qH+QDOx0FskJPd9FW/uRqp/t4BMCbJClSW9Pdf hX0KMYMfw1eMunVXR79xtVFecDtVK4ubLbIddRFW+x4/lO6GORy8kC5d1yrVkg5nZmTx99AlXfXUT sfn/hmwfg0HbAMDHlsM252fYXiPXwDbC4LJUPFcKczaHrctFtYj2ZAFEzcEW0Xqk93WsLzhQ/+oE1 lDRRm/FQ==; Received: from [127.0.0.1] (port=37623 helo=cloud103.planethippo.com) by cloud103.planethippo.com with esmtpa (Exim 4.86_1) (envelope-from ) id 1b97IZ-0045YP-NN; Sat, 04 Jun 2016 09:51:15 +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; Sat, 4 Jun 2016 09:51:15 +0100 Message-ID: In-Reply-To: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> Date: Sat, 4 Jun 2016 09:51:15 +0100 Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block From: "Phillip Lord" To: "Stefan Monnier" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@debbugs.gnu.org, Phillip Lord 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 (/) On Sat, June 4, 2016 4:05 am, Stefan Monnier wrote: >>>> Simple let binding would not give quite the same functionality, >>>> because of the last part -- I also add a boundary to buffers with a >>>> greater recursive depth; with a let binding, I think these would be >>>> unbound for commands that lower the recursion depth. >>> Ah, you mean that the value of undo-auto--undoably-changed-buffers >>> needs to be propagated "out" when we leave the let-binding. >> I *think* so -- I'm not entirely sure. It might make no difference. >> > > It makes a difference, since otherwise we may forget that some changes > were made in a buffer and fail to push a boundary for them. Not super > terribly serious, admittedly. Yes. This is assuming that commands *both* change recursion depth *and* change a buffer. If they are separate then there will no changes in the buffer. Since I don't know this to be true, I am assuming that it isn't. > >> I use this variable in several different places in two different places >> though > > Not sure what you mean by "use", and there's clearly some typo about > "places" which makes the meaning even more murky. I change the value in this variable at one point (after each undoable-change) by adding a buffer to it, access at one point (to find boundaries that need amalgamating) and access it then nil parts of it at another (to find buffers that need boundaries). > >> -- once when we capture the undoable changes (which happens >> often) and once on at the end of each command. > > Right. I see no need for any changes there. Really? I have to know the recursion depth at this point >> I'd have to do this let binding in the command loop? >> > > We'd need this right when we enter a recursive-edit (minibuffer or not), > so maybe doing it when we enter the command loop would work. > >> My current solution seems simpler, even if it does feel like I have >> created "recursion-level" local variables. > > My impression that a let-binding plus a call to > undo-auto--ensure-boundary will be simpler than your patch. But it's hard > to be sure until it's actually implemented. To be clear, though, to do this I need to augment recursive-edit in C? I need the let binding to last the life of the recursive edit? Not being difficult here, just struggling to understand. Phil From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 12:50:05 2016 Received: (at 23632) by debbugs.gnu.org; 4 Jun 2016 16:50:05 +0000 Received: from localhost ([127.0.0.1]:54562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Elr-00016u-Vx for submit@debbugs.gnu.org; Sat, 04 Jun 2016 12:50:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Elq-00016h-AA for 23632@debbugs.gnu.org; Sat, 04 Jun 2016 12:49:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DGEQA731xV//qVSC1cgxCEAoVVu0CEfoJTAoE9OhIBAQEBAQEBgQpBBYNdAQEDAXkFCwsNJxIUGDEsiAsIzyMBAQEBAQUCAR+LOoUFB4QtBYUJlluKEY8PI4QUIoJ4AQEB X-IPAS-Result: A0DGEQA731xV//qVSC1cgxCEAoVVu0CEfoJTAoE9OhIBAQEBAQEBgQpBBYNdAQEDAXkFCwsNJxIUGDEsiAsIzyMBAQEBAQUCAR+LOoUFB4QtBYUJlluKEY8PI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="240432523" Received: from unknown (HELO pastel.home) ([45.72.149.250]) by ironport2-out.teksavvy.com with ESMTP; 04 Jun 2016 12:49:50 -0400 Received: by pastel.home (Postfix, from userid 20848) id 48BAE63FFB; Sat, 4 Jun 2016 12:49:50 -0400 (EDT) From: Stefan Monnier To: "Phillip Lord" Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> Date: Sat, 04 Jun 2016 12:49:50 -0400 In-Reply-To: (Phillip Lord's message of "Sat, 4 Jun 2016 09:51:15 +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: > Yes. This is assuming that commands *both* change recursion depth *and* > change a buffer. Yes, it's like a fairly rare occurrence, where a command does both: - modify some buffer(s) - exit a recursive edit So maybe we can live without paying attention to it. [...] 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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: 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: > Yes. This is assuming that commands *both* change recursion depth *and* > change a buffer. Yes, it's like a fairly rare occurrence, where a command does both: - modify some buffer(s) - exit a recursive edit So maybe we can live without paying attention to it. [...] 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 > Yes. This is assuming that commands *both* change recursion depth *and* > change a buffer. Yes, it's like a fairly rare occurrence, where a command does both: - modify some buffer(s) - exit a recursive edit So maybe we can live without paying attention to it. >>> -- once when we capture the undoable changes (which happens >>> often) and once on at the end of each command. >> Right. I see no need for any changes there. > Really? I have to know the recursion depth at this point No, let-bind the var to nil around each recursive edit should take care of "everything" so you don't need to change anything else (including, non need to pay any attention to the recursion depth). > To be clear, though, to do this I need to augment recursive-edit in C? I > need the let binding to last the life of the recursive edit? That's right. A call to `specbind' at the right spot might even be all it takes. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 13:18:04 2016 Received: (at 23632) by debbugs.gnu.org; 4 Jun 2016 17:18:04 +0000 Received: from localhost ([127.0.0.1]:54598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9FD2-0003Ns-I2 for submit@debbugs.gnu.org; Sat, 04 Jun 2016 13:18:04 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:40078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9FD1-0003NN-He for 23632@debbugs.gnu.org; Sat, 04 Jun 2016 13:18:04 -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:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=M9gzTWXqpGQ3xatkqvmw6dSxkUhXWqLWBD9jb81fzaI=; b=eksce6Raa8A6B+nZUsFsbq+ShY SkiPXbB1fi/A52FtC/LoNDVQDB1TaVzEwBuYcI8H3tUZpclarRlPXjJ9YR6rWLOGSYz53tk2H9NIk cRvSPlXXmynbw/GHhuhVABqvQrMbPy4VI8bza2YV56prVSvqE9s7BuczpFn6qcVpbkfzI9NCXBnDu Ef5TfivGFhkXQrV+ZqQRpG1a7SGQea1YLGdL7n00Nv2yi/iyqcp7MDRZ9IVhuI/DlHLpxShUO5TVJ vni7UJFfHWsUmEDjunQL3Zd/IGCfBMaudC8owNt6OLaW9nMVCYiiTzpnxcSwSEIVSEMz4E8Yv9GpI 7/rxfouQ==; Received: from [127.0.0.1] (port=57702 helo=cloud103.planethippo.com) by cloud103.planethippo.com with esmtpa (Exim 4.86_1) (envelope-from ) id 1b9FCv-000sb1-C3; Sat, 04 Jun 2016 18:17:57 +0100 Received: from 78.147.208.164 ([78.147.208.164]) (SquirrelMail authenticated user phillip.lord@russet.org.uk) by cloud103.planethippo.com with HTTP; Sat, 4 Jun 2016 18:17:57 +0100 Message-ID: <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> In-Reply-To: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> Date: Sat, 4 Jun 2016 18:17:57 +0100 Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block From: "Phillip Lord" To: "Stefan Monnier" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@debbugs.gnu.org, Phillip Lord 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 (/) On Sat, June 4, 2016 5:49 pm, Stefan Monnier wrote: >> Yes. This is assuming that commands *both* change recursion depth *and* >> change a buffer. > > Yes, it's like a fairly rare occurrence, where a command does both: > - modify some buffer(s) > - exit a recursive edit > So maybe we can live without paying attention to it. > > >>>> -- once when we capture the undoable changes (which happens >>>> often) and once on at the end of each command. >>> Right. I see no need for any changes there. >>> >> Really? I have to know the recursion depth at this point >> > > No, let-bind the var to nil around each recursive edit should take care > of "everything" so you don't need to change anything else (including, non > need to pay any attention to the recursion depth). > >> To be clear, though, to do this I need to augment recursive-edit in C? >> I >> need the let binding to last the life of the recursive edit? > > That's right. A call to `specbind' at the right spot might even be all > it takes. Okay, I will take a good look -- I've not done this before, but can try. I guess "recursive-edit" is the only way to enter a recursive edit? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 14:41:44 2016 Received: (at 23632) by debbugs.gnu.org; 4 Jun 2016 18:41:44 +0000 Received: from localhost ([127.0.0.1]:54629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9GW0-00005x-F5 for submit@debbugs.gnu.org; Sat, 04 Jun 2016 14:41:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9GVy-00005l-Nt for 23632@debbugs.gnu.org; Sat, 04 Jun 2016 14:41:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A6FgA731xV//qVSC1cgxCEAoVVwD6CTQQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQEBAwEBAQEBHYs6hQUHhC0FnxeGaY8EI4QUIoJ4AQEB X-IPAS-Result: A0A6FgA731xV//qVSC1cgxCEAoVVwD6CTQQCAoE8PBEBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQEBAwEBAQEBHYs6hQUHhC0FnxeGaY8EI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="240436879" Received: from 45-72-149-250.cpe.teksavvy.com (HELO pastel.home) ([45.72.149.250]) by ironport2-out.teksavvy.com with ESMTP; 04 Jun 2016 14:41:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id 79C8A64242; Sat, 4 Jun 2016 14:41:36 -0400 (EDT) From: Stefan Monnier To: "Phillip Lord" Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> Date: Sat, 04 Jun 2016 14:41:36 -0400 In-Reply-To: <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> (Phillip Lord's message of "Sat, 4 Jun 2016 18:17:57 +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 guess "recursive-edit" is the only way to enter a recursive edit? AFAICT, `recursive_edit_1' is the C function that's used by both `recursive-edit' and `read-from-minibuffer', so it should catch all cases. [...] 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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: 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 guess "recursive-edit" is the only way to enter a recursive edit? AFAICT, `recursive_edit_1' is the C function that's used by both `recursive-edit' and `read-from-minibuffer', so it should catch all cases. [...] 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 guess "recursive-edit" is the only way to enter a recursive edit? AFAICT, `recursive_edit_1' is the C function that's used by both `recursive-edit' and `read-from-minibuffer', so it should catch all cases. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 10:33:22 2016 Received: (at 23632) by debbugs.gnu.org; 6 Jun 2016 14:33:23 +0000 Received: from localhost ([127.0.0.1]:56873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9vak-0007nZ-O4 for submit@debbugs.gnu.org; Mon, 06 Jun 2016 10:33:22 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:58266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9vah-0007nL-FX for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 10:33:21 -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=aqRDrB5NqfmhntjENy/g2CAXygoW9OUgHUj+2Y6BFT4=; b=vDcJlZbIm/y1hPfyy52M2m1KCD kGVRWWs9CCoGurdKbSrvdYgy1wEMSuh2J6bRgmYbl782GIa12MK9tT5jbFsnFXu8H3CHIYj4Mtngz 6d/eSP+jqbmsfgCq3bHrfuQdxFYsIwp8j/wZBJQvD4MjTMrEmyfqGtaSz4wVolNiab86p6CzOgg01 FLExFl/M8ZhVMqDrI/J6kqw5kTgBu9IsX+gKlnQSaCwAAP5OJdT6CVw2mJNp/7965Eh6dLzvqGPPH HkbKnPbrGnEUkoPvqzJfScJSiI8r+ZAdPz0DburNtCPBflfzPWNYyI0+ElJL9kv2llPE3NTy9QthR AS3WWl8w==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:33176 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b9vab-0035ET-3t; Mon, 06 Jun 2016 15:33:13 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Stefan Monnier Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> Date: Mon, 06 Jun 2016 15:33:12 +0100 In-Reply-To: (Stefan Monnier's message of "Sat, 04 Jun 2016 14:41:36 -0400") Message-ID: <87r3cacrpz.fsf@russet.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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.0 (/) --=-=-= Content-Type: text/plain Stefan Monnier writes: >> I guess "recursive-edit" is the only way to enter a recursive edit? > > AFAICT, `recursive_edit_1' is the C function that's used by both > `recursive-edit' and `read-from-minibuffer', so it should catch all cases. So, tried it, and AFAICT, you are correct. The attached patch seems to fix. And it is significantly simpler than the last fix. It currently does not deal with the case where there "left over" after a command which changes a recursive edit level. The lists of buffers in undo-auto-undoably-changed-buffer will be lost as we come out of the specbind. I do not know whether this is a problem or not. Potential solutions: 1) before we exit recursive_edit_1, append the value of undo-auto-undoably-changed-buffer on a new variable ("undoably-changed-buffer-recursive"). Then, when undo-auto-boundary runs append and nil this. Seems like a lot of effort for an occasional issue. 2) Call undo-auto--add-boundary before exiting recursive_edit_1. This should nil undoably-changed-buffer and add boundaries. 3) Just not worry about it. Assuming we go for 3, is everyone happy to patch the Emacs-25 branch? Phil --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-regression-for-recursive-editing-in-undo.patch >From 92ec383f9c732af76f6ba18c87a6989a4b6f16e8 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Mon, 6 Jun 2016 09:35:17 +0100 Subject: [PATCH] Fix regression for recursive editing in undo --- src/keyboard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index e3858a5..b5b603c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -679,6 +679,8 @@ recursive_edit_1 (void) recursive edit, the original redisplay leading to the recursive edit will be unwound. The outcome should therefore be safe. */ specbind (Qinhibit_redisplay, Qnil); + + specbind (Qundo_auto__undoably_changed_buffers, Qnil); redisplaying_p = 0; val = command_loop (); @@ -689,6 +691,7 @@ recursive_edit_1 (void) if (STRINGP (val)) xsignal1 (Qerror, val); + return unbind_to (count, Qnil); } @@ -10956,6 +10959,8 @@ syms_of_keyboard (void) DEFSYM (Qpost_command_hook, "post-command-hook"); DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary"); + DEFSYM (Qundo_auto__undoably_changed_buffers, + "undo-auto--undoably-changed-buffers"); DEFSYM (Qdeferred_action_function, "deferred-action-function"); DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); -- 2.8.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 11:03:07 2016 Received: (at 23632) by debbugs.gnu.org; 6 Jun 2016 15:03:07 +0000 Received: from localhost ([127.0.0.1]:56894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9w3X-0008UQ-7i for submit@debbugs.gnu.org; Mon, 06 Jun 2016 11:03:07 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:23295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9w3V-0008Tx-AX for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 11:03:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A1FgA731xV//qVSC1cgxCEAoVVu0CEfoJNBAICgTw7EgEBAQEBAQGBCkEFg10BAQRWIxALNBIUGA2IY88jAQEBAQEBBAEBAQEeizqFBQeELQW1BCOCChyBbiKCeAEBAQ X-IPAS-Result: A0A1FgA731xV//qVSC1cgxCEAoVVu0CEfoJNBAICgTw7EgEBAQEBAQGBCkEFg10BAQRWIxALNBIUGA2IY88jAQEBAQEBBAEBAQEeizqFBQeELQW1BCOCChyBbiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="240561400" Received: from 45-72-149-250.cpe.teksavvy.com (HELO pastel.home) ([45.72.149.250]) by ironport2-out.teksavvy.com with ESMTP; 06 Jun 2016 11:02:58 -0400 Received: by pastel.home (Postfix, from userid 20848) id BDAB9643A9; Mon, 6 Jun 2016 11:02:58 -0400 (EDT) From: Stefan Monnier To: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block Message-ID: References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.fsf@russet.org.uk> Date: Mon, 06 Jun 2016 11:02:58 -0400 In-Reply-To: <87r3cacrpz.fsf@russet.org.uk> (Phillip Lord's message of "Mon, 06 Jun 2016 15:33:12 +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: > @@ -689, 6 +691, 7 @@ recursive_edit_1 (void) > if (STRINGP (val)) > xsignal1 (Qerror, val); > > + > return unbind_to (count, Qnil); > } I'll let someone else decide whether it's acceptable for emacs-25. AFAIC the patch looks good except for the above hunk. [...] 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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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: 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: > @@ -689,6 +691,7 @@ recursive_edit_1 (void) > if (STRINGP (val)) > xsignal1 (Qerror, val); > > + > return unbind_to (count, Qnil); > } I'll let someone else decide whether it's acceptable for emacs-25. AFAIC the patch looks good except for the above hunk. [...] 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 > @@ -689,6 +691,7 @@ recursive_edit_1 (void) > if (STRINGP (val)) > xsignal1 (Qerror, val); > > + > return unbind_to (count, Qnil); > } I'll let someone else decide whether it's acceptable for emacs-25. AFAIC the patch looks good except for the above hunk. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 11:26:06 2016 Received: (at 23632) by debbugs.gnu.org; 6 Jun 2016 15:26:06 +0000 Received: from localhost ([127.0.0.1]:56917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9wPm-0000aB-9W for submit@debbugs.gnu.org; Mon, 06 Jun 2016 11:26:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9wPl-0000Zh-Ba for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 11:26:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9wPf-0000w1-Bq for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 11:26:00 -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]:53459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9wPc-0000uk-6r; Mon, 06 Jun 2016 11:25:56 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4067 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9wPZ-0007xJ-PF; Mon, 06 Jun 2016 11:25:54 -0400 Date: Mon, 06 Jun 2016 18:26:27 +0300 Message-Id: <838tyitk2k.fsf@gnu.org> From: Eli Zaretskii To: phillip.lord@russet.org.uk (Phillip Lord) In-reply-to: <87r3cacrpz.fsf@russet.org.uk> (phillip.lord@russet.org.uk) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.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-Debbugs-Envelope-To: 23632 Cc: cyd@gnu.org, monnier@iro.umontreal.ca, 23632@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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: phillip.lord@russet.org.uk (Phillip Lord) > Date: Mon, 06 Jun 2016 15:33:12 +0100 > Cc: Chong Yidong , 23632@debbugs.gnu.org > > Assuming we go for 3, is everyone happy to patch the Emacs-25 branch? Can you summarize its effect? It doesn't disable undo in recursive editing, does it? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 11:37:02 2016 Received: (at 23632) by debbugs.gnu.org; 6 Jun 2016 15:37:02 +0000 Received: from localhost ([127.0.0.1]:56928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9waM-0000rO-Eo for submit@debbugs.gnu.org; Mon, 06 Jun 2016 11:37:02 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:32984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9waK-0000qt-7n for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 11:37:01 -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=F/5Ob3W5LQGeHspITGuGcKX3+FBELTUIuRS06az9cd0=; b=ZMwpaNFGgaH/bjmCFCWqG/musg OZbcVV0Jtkbn/QcC6pInf9U8ttQkS0XvJ/bxZhbsR9G4/OP1kVi6JtW9FS+H5anekorxEj01SWOLI dX2yrDSK3HwSvj0+N02ClryxEy/218eCnADEG3hu0tdNbKKAoG9r1jyv9PP0VxlxktNM4m8LOwcoq XY2ZxOfQ3mqM3E7QLg+KUfa3pEFhS8iUd+o1LuBfZrGpFgTpmNClkQHEFfgU1GFkIC3uA1bn27JMB 9cpBxIvGWibnzDuyefrCCCp+m8+KzfN/jb+k0dEKRzTx0PvHWfwQtZiU4C/4tpB+C+3Nh5N/lZFDG nVgsyBDA==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32587 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b9waD-003G5E-Nb; Mon, 06 Jun 2016 16:36:53 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Stefan Monnier Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.fsf@russet.org.uk> Date: Mon, 06 Jun 2016 16:36:53 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 06 Jun 2016 11:02:58 -0400") Message-ID: <87d1nucoru.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-Debbugs-Envelope-To: 23632 Cc: Chong Yidong , 23632@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.0 (/) Stefan Monnier writes: >> @@ -689,6 +691,7 @@ recursive_edit_1 (void) >> if (STRINGP (val)) >> xsignal1 (Qerror, val); >> >> + >> return unbind_to (count, Qnil); >> } > > I'll let someone else decide whether it's acceptable for emacs-25. > AFAIC the patch looks good except for the above hunk. Ah, sorry. Will add some more documentation also. Phil From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 11:39:06 2016 Received: (at 23632) by debbugs.gnu.org; 6 Jun 2016 15:39:06 +0000 Received: from localhost ([127.0.0.1]:56933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9wcL-0000uN-S0 for submit@debbugs.gnu.org; Mon, 06 Jun 2016 11:39:06 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:33061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9wcG-0000tp-I8 for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 11:39:04 -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=BOyXJjSbD4gPpMovbJMe3qjtjeSAABkFP07LxuPOgiU=; b=DQpYxirY4YICeCIkBlwTVHomiB n/HeqJsQJhV8t5AssywKZB1atNp78Gu7TzSV3IE/e7JPT91TXZtDved0To1rBVFuzdZW+v4v3fucU TL7swVLRgdqeU4oSjRrcsSTt35O3LMm+tsgVAUdGe+AHyDUuAhmy5pTARGhqUcjGcmRciHlV/gl7D mR6tmzFSmEOsbqyxUwEZpsZzcpX7/Thh5NP5mrDZ/eL2rO3z1ChQtaRVt/fPq2PtBWjxbgwBusiyl ieIGyVcEiZ2Ac2Ez+Sa3bl3p9vIq4bBspzHKlvqZKEaYt7rhtH2DTWAqcvBSaxRNtWV+knpz225YQ pXkkYE9Q==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:32696 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1b9wcA-003GLo-PQ; Mon, 06 Jun 2016 16:38:54 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Eli Zaretskii Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.fsf@russet.org.uk> <838tyitk2k.fsf@gnu.org> Date: Mon, 06 Jun 2016 16:38:54 +0100 In-Reply-To: <838tyitk2k.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Jun 2016 18:26:27 +0300") Message-ID: <878tyicooh.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-Debbugs-Envelope-To: 23632 Cc: cyd@gnu.org, monnier@iro.umontreal.ca, 23632@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.0 (/) Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Date: Mon, 06 Jun 2016 15:33:12 +0100 >> Cc: Chong Yidong , 23632@debbugs.gnu.org >> >> Assuming we go for 3, is everyone happy to patch the Emacs-25 branch? > > Can you summarize its effect? It doesn't disable undo in recursive > editing, does it? No. It limits the addition of undo-boundaries to those buffers that have changed in at the same level of recursion. So, for example, undo will function in mini-buffer during completing-read, but changes in the mini-buffer will not result in the addition of undo-boundaries to buffers that changed during the command that lead to the completing-read. Phil From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 06 12:22:19 2016 Received: (at 23632) by debbugs.gnu.org; 6 Jun 2016 16:22:19 +0000 Received: from localhost ([127.0.0.1]:56944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9xIA-0001tt-Pg for submit@debbugs.gnu.org; Mon, 06 Jun 2016 12:22:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9xI7-0001td-G6 for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 12:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9xI1-0007Wt-FE for 23632@debbugs.gnu.org; Mon, 06 Jun 2016 12:22:10 -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]:54690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9xHw-0007WF-Ji; Mon, 06 Jun 2016 12:22:04 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4092 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9xHu-0001jm-C2; Mon, 06 Jun 2016 12:22:02 -0400 Date: Mon, 06 Jun 2016 19:22:35 +0300 Message-Id: <837fe2thh0.fsf@gnu.org> From: Eli Zaretskii To: phillip.lord@russet.org.uk (Phillip Lord) In-reply-to: <878tyicooh.fsf@russet.org.uk> (phillip.lord@russet.org.uk) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.fsf@russet.org.uk> <838tyitk2k.fsf@gnu.org> <878tyicooh.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-Debbugs-Envelope-To: 23632 Cc: cyd@gnu.org, monnier@iro.umontreal.ca, 23632@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: , Reply-To: Eli Zaretskii 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, cyd@gnu.org, 23632@debbugs.gnu.org > Date: Mon, 06 Jun 2016 16:38:54 +0100 > > > Can you summarize its effect? It doesn't disable undo in recursive > > editing, does it? > > No. It limits the addition of undo-boundaries to those buffers that have > changed in at the same level of recursion. So, for example, undo will > function in mini-buffer during completing-read, but changes in the > mini-buffer will not result in the addition of undo-boundaries to > buffers that changed during the command that lead to the > completing-read. I guess I'm still confused a bit, because now I'm not sure what difference does the change make. Does it record each change only once, where previously we could record it several times? If not, what does the above-mentioned limitation achieve, in terms of user-visible effects? From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 07 07:20:37 2016 Received: (at 23632) by debbugs.gnu.org; 7 Jun 2016 11:20:37 +0000 Received: from localhost ([127.0.0.1]:57499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAF3k-0001iP-Qs for submit@debbugs.gnu.org; Tue, 07 Jun 2016 07:20:37 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:53750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAF3i-0001iA-T1 for 23632@debbugs.gnu.org; Tue, 07 Jun 2016 07:20: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=n5TzT/SENJekNR20V8TJ0S2iKfKi6T6LDeC2IAlxsb4=; b=pXJ/chEEDRP7eWIRnHwqaB+Sjf k+3Qo5bIe81WCld0gZvj0bQxdLix3IlI6Hvh3RN2G/UZNQB/cXY00GPcA+x2ySjbf6sDu8bXGeQNj OpPwAvIeq3/7vae1NMbX5RIgHkNzxHS54lTV+pdznvlHzrl1LD2ex0NOnvSsMWTp3MjrGv4x7fEer xJnGn7TNjzdqprXblHOkBN2A+kmOPMOjGc1dVE9hXeFFG6984L9gyAx22620vOyAdDX1Y38bkWup8 g/tiSgeFlD2fTGkLU2TE85J+5RIRahky3XEzCZh/6u2bHS8R2NRZYgpCk8wuEFWh4QHgTlRIwAK5M uulMHxfQ==; Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:33135 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bAF3c-001imC-Bk; Tue, 07 Jun 2016 12:20:28 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: Eli Zaretskii Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.fsf@russet.org.uk> <838tyitk2k.fsf@gnu.org> <878tyicooh.fsf@russet.org.uk> <837fe2thh0.fsf@gnu.org> Date: Tue, 07 Jun 2016 12:20:27 +0100 In-Reply-To: <837fe2thh0.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Jun 2016 19:22:35 +0300") Message-ID: <87shwptfd0.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-Debbugs-Envelope-To: 23632 Cc: cyd@gnu.org, monnier@iro.umontreal.ca, 23632@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.0 (/) Eli Zaretskii writes: >> From: phillip.lord@russet.org.uk (Phillip Lord) >> Cc: monnier@iro.umontreal.ca, cyd@gnu.org, 23632@debbugs.gnu.org >> Date: Mon, 06 Jun 2016 16:38:54 +0100 >> >> > Can you summarize its effect? It doesn't disable undo in recursive >> > editing, does it? >> >> No. It limits the addition of undo-boundaries to those buffers that have >> changed in at the same level of recursion. So, for example, undo will >> function in mini-buffer during completing-read, but changes in the >> mini-buffer will not result in the addition of undo-boundaries to >> buffers that changed during the command that lead to the >> completing-read. > > I guess I'm still confused a bit, because now I'm not sure what > difference does the change make. Does it record each change only > once, where previously we could record it several times? If not, what > does the above-mentioned limitation achieve, in terms of user-visible > effects? Hopefully, in most cases no user-visible effects, but it fixes the original bug report. It happens like this: call some command command changes local buffer command asks for more information from minibuffer with recursive edit change in the minibuffer forces undo-boundary into local buffer So, you get an undo-boundary where you did not expect. With this change: call some command command changes local buffer command asks for more information changes in minibuffer force undo-boundary only in mini-buffer Phil From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 07 11:09:16 2016 Received: (at 23632) by debbugs.gnu.org; 7 Jun 2016 15:09:16 +0000 Received: from localhost ([127.0.0.1]:58882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAId2-0000yE-H6 for submit@debbugs.gnu.org; Tue, 07 Jun 2016 11:09:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAId0-0000xx-W8 for 23632@debbugs.gnu.org; Tue, 07 Jun 2016 11:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAIcu-0002cv-PA for 23632@debbugs.gnu.org; Tue, 07 Jun 2016 11:09: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]:51056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAIco-0002c9-IV; Tue, 07 Jun 2016 11:09:02 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4651 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bAIcn-0007SP-8b; Tue, 07 Jun 2016 11:09:02 -0400 Date: Tue, 07 Jun 2016 18:09:35 +0300 Message-Id: <83h9d5rq6o.fsf@gnu.org> From: Eli Zaretskii To: phillip.lord@russet.org.uk (Phillip Lord) In-reply-to: <87shwptfd0.fsf@russet.org.uk> (phillip.lord@russet.org.uk) Subject: Re: bug#23632: 25.1.50; Gratuitous undo boundary in latex-insert-block References: <87lh2vo7s6.fsf@gmail.com> <87shx23830.fsf@gmail.com> <87wpmcwn13.fsf@russet.org.uk> <87wpm9q4z7.fsf@russet.org.uk> <87vb1rbbg1.fsf@russet.org.uk> <87shwutfmo.fsf@russet.org.uk> <87porxrk4v.fsf@russet.org.uk> <8b9b4630b1282ed76fe26452b4a8fbb6.squirrel@cloud103.planethippo.com> <87r3cacrpz.fsf@russet.org.uk> <838tyitk2k.fsf@gnu.org> <878tyicooh.fsf@russet.org.uk> <837fe2thh0.fsf@gnu.org> <87shwptfd0.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-Debbugs-Envelope-To: 23632 Cc: cyd@gnu.org, monnier@iro.umontreal.ca, 23632@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: , Reply-To: Eli Zaretskii 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, cyd@gnu.org, 23632@debbugs.gnu.org > Date: Tue, 07 Jun 2016 12:20:27 +0100 > > It happens like this: > > call some command > command changes local buffer > command asks for more information from minibuffer with recursive edit > change in the minibuffer forces undo-boundary into local buffer > > So, you get an undo-boundary where you did not expect. > > With this change: > > call some command > command changes local buffer > command asks for more information > changes in minibuffer force undo-boundary only in mini-buffer OK, thanks for the explanations. The changes are okay for the emacs-25 branch. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 09 04:07:01 2016 Received: (at control) by debbugs.gnu.org; 9 Jun 2016 08:07:01 +0000 Received: from localhost ([127.0.0.1]:33303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAuzV-0000cq-F2 for submit@debbugs.gnu.org; Thu, 09 Jun 2016 04:07:01 -0400 Received: from cloud103.planethippo.com ([31.216.48.48]:46697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAuzU-0000ce-86 for control@debbugs.gnu.org; Thu, 09 Jun 2016 04:07:00 -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:Date: Subject:To:From; bh=GeJJsi9cbi6aroal0Gt867yenYNDuY4a7C7XW15BNbM=; b=Pi0uAA8Ii bdr5ayLHYDyUPtIQGDxvlO0mKrvOFzAQsyp1w4Qn72xJlyJf9E9Xw17IiiQ2bxYLHxQXbiWFCu42P 1LzpzgyYjkY5/VnQ5qwTvf/YS0PZQ/V6P8hwVBcvusQ9b0qVihroa9662BkKyfkCKx++R/7EGQLGT rPVm+Lw86DAJlRwGAhrOqTzvML4te6/xHMr0HU+bPA3qz08O2s652XoEVs2FZs7rP75zg/xBHa8lt VZUyvS8aYS/olCKxp5ZA3T/ixvu6wVM6xQY3yy8cQ85yQFynT7K2wSNZFq6Ct/1ZzQMKBHnnC89D4 oNVAg51NDGz3/Mt7NfdMboZ0Q==; Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:46714 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1bAuzN-003xPX-VG for control@debbugs.gnu.org; Thu, 09 Jun 2016 09:06:54 +0100 From: phillip.lord@russet.org.uk (Phillip Lord) To: control@debbugs.gnu.org Subject: control message for bug #23632 Date: Thu, 09 Jun 2016 09:06:47 +0100 Message-ID: <87ziquss4o.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-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: 0.0 (/) close 23632 25.1 From unknown Sat Jun 21 17:36:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Jul 2016 11:24:04 +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