From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 08:39:47 2023 Received: (at submit) by debbugs.gnu.org; 1 Jan 2023 13:39:47 +0000 Received: from localhost ([127.0.0.1]:40458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pByZ1-0005Su-4R for submit@debbugs.gnu.org; Sun, 01 Jan 2023 08:39:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:57914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pByYz-0005Sn-J4 for submit@debbugs.gnu.org; Sun, 01 Jan 2023 08:39:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pByYz-0007w0-AN for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 08:39:45 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pByYx-0008U5-9c for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 08:39:45 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4B5952401BC for ; Sun, 1 Jan 2023 14:39:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672580380; bh=6fM7hHjmPeM6M51afufpR9rlM6udxg1/Pk0NyoPzUWU=; h=From:To:Subject:Date:From; b=jj7UpQpOUvxGdO/5x/BmIP/MiGNUey9lIh8t0gD/XtnLUfCGUbTffq/8olVBxA8bi MuMeofciUOiYsjl+m7m4CJj5kwL9MQszgo0X8GRZufseisdD3z4RPJDQc2Ek3NTQls 9VfMiEYhBCx2nzowylNT89RKXsmO7BhOxtWgb0Q/4YC/y2mKkJpyk3cxARf5X8+Xjn KyvCwJ0jvZ+W+Y2vXnsOmOmpRfg/eckd1AF4xSX8+eQKZMa7iPf4mWfExzdpg9Wtsu B9Ljr2wDvZgMjJK7+lWZIBhTYSBbHmXqQjUauY4RUps/L7ofkUOGB3DD9zSnU24kCI MxkRDcbuaScXQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NlKqG4JvNz9rxF for ; Sun, 1 Jan 2023 14:39:38 +0100 (CET) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 30.0.50; primitive-undo: Changes to be undone by function different from announced Date: Sun, 01 Jan 2023 13:40:08 +0000 Message-ID: <87o7ri74qv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) Hi, Original report: https://orgmode.org/list/25520.20685.583180.776610@gargle.gargle.HOWL I am not sure if it is Emacs bug, but I have difficulty understanding the origin of the following error: 1. Create /tmp/bug.org with the following contents * h1 ** h2 2. emacs -Q /tmp/bug.org 3. Move point to h2 4. M-x org-promote-subtree 5. M-x undo 6. Observe "Changes to be undone by function different from announced" error The functions in question are below and I fail to see anything that may be wrong there. (defun org-promote-subtree () "Promote the entire subtree. See also `org-promote'." (interactive) (save-excursion (org-back-to-heading t) (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) (org-with-limited-levels (org-map-tree 'org-promote)))) (org-fix-position-after-promote)) (defun org-promote () "Promote the current heading higher up the tree." (org-with-wide-buffer (org-back-to-heading t) (let* ((after-change-functions (remq 'flyspell-after-change-function after-change-functions)) (level (save-match-data (funcall outline-level))) (up-head (concat (make-string (org-get-valid-level level -1) ?*) " ")) (diff (abs (- level (length up-head) -1)))) (cond ((and (= level 1) org-allow-promoting-top-level-subtree) (replace-match "# " nil t)) ((= level 1) (user-error "Cannot promote to level 0. UNDO to recover if necessary")) (t (replace-match (apply #'propertize up-head (text-properties-at (match-beginning 0))) t))) (unless (= level 1) (when org-auto-align-tags (org-align-tags)) (when org-adapt-indentation (org-fixup-indentation (- diff)))) (run-hooks 'org-after-promote-entry-hook)))) In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2022-12-26 built on localhost Repository revision: cc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 09:38:58 2023 Received: (at 60467) by debbugs.gnu.org; 1 Jan 2023 14:38:58 +0000 Received: from localhost ([127.0.0.1]:40511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBzUI-00070c-IG for submit@debbugs.gnu.org; Sun, 01 Jan 2023 09:38:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBzUF-00070N-Pz for 60467@debbugs.gnu.org; Sun, 01 Jan 2023 09:38:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBzU9-00017F-Qy; Sun, 01 Jan 2023 09:38:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=o5EniY6SpquX+G9q5392o366XkpX3S4YvCu09nO1RBg=; b=WBP8uUN7pj60 Dhqv8ew2SD9eoFpWqNYDjHI1ZrmtXUX+5gbr1itgkYQIhQ+IziubP7yTtGCvD7E6HybimxPjr+Fmh fpwQImwZk5IPk5oNi9vltlDViZQQAhcrhmsWCsAW/7LQxFTRbiakvWkVhlIP+BENcSRMFLdkVgIgQ HFzdPe7gWw4Pxrb5pYU7yUtBgqu7XNoTkyXmuhH4t5skIyDWbyhgf8GgItWZo1myI1BvQ0BQtVtxT V6FNCaEwpYoFltkcZBoORacUUYtiPIjkL88ERQRRPIARMJhQArIbWcnheifw3ssCLE88xhvkZe7sj YKWLnnL37TZ7jl/NvCduPg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBzU9-00004s-8A; Sun, 01 Jan 2023 09:38:49 -0500 Date: Sun, 01 Jan 2023 16:38:52 +0200 Message-Id: <83sfgu2ubn.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko , Stefan Monnier In-Reply-To: <87o7ri74qv.fsf@localhost> (message from Ihor Radchenko on Sun, 01 Jan 2023 13:40:08 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Date: Sun, 01 Jan 2023 13:40:08 +0000 > > 1. Create /tmp/bug.org with the following contents > > * h1 > ** h2 > > 2. emacs -Q /tmp/bug.org > 3. Move point to h2 > 4. M-x org-promote-subtree > 5. M-x undo > 6. Observe "Changes to be undone by function different from announced" error The error message text is confusing, what it wants to say is this: Changes undone by a function are different from the announced ones The problem is here: (apply fun args) ;; Use `save-current-buffer'? ;; Check that the function did what the entry ;; said it would do. (unless (and (= start start-mark) (= (+ delta end) end-mark)) <<<<<<<<<<<<<<< (error "Changes to be undone by function different from announced")) After re-inserting the deleted string "** " with its face information, 'end-marker' is shifted by 3 position, and is now at buffer position 13, whereas 'end' is still 10 and 'delta' is 1, so their sum is 11. Also note that if you begin from an empty Org buffer and insert the initial text "* h1\n** h2\n", and then run the recipe, the problem doesn't happen, because the "* " part is deleted before "apply fun" returns, and then 'end-mark' is in its expected position 11. Adding Stefan, in case how might have ideas for what is wrong here. This problem exists also in Emacs 29. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 19:46:22 2023 Received: (at 60467) by debbugs.gnu.org; 2 Jan 2023 00:46:22 +0000 Received: from localhost ([127.0.0.1]:42054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC8y5-0007EG-UA for submit@debbugs.gnu.org; Sun, 01 Jan 2023 19:46:22 -0500 Received: from heytings.org ([95.142.160.155]:55188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC8y3-0007E5-Ab for 60467@debbugs.gnu.org; Sun, 01 Jan 2023 19:46:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672620378; bh=rBHdujxbUIxMm/6cHXu+XoHRS6DUx0XrVD4PVxM77ng=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Q9tK5WgDeFiRmtKX8OwtV+Lk9PJ8S5BGRm189YM4LIri3MY3cA92YduC+8QNGGEgO cw1j6rss8jnAT9l3s4SXaLbNXvk43NVoqN8d5tD0WdRXYp3KYPutvrv1iI4Pg34+UM GVaCqHA+XcnyqNfP+zD16JWnJyGEduJ7RsqP9vZuUiMyiuiJPjdqdAB8fI/0rrCPsg vXZz8jIhZm0vARIYRz4gsLQRps+dbgMODGrzucrCzUj3DliG9SHUrPRG2D6fmavezu HsEIWdBlfrMjkjox53K9WQbR+rbQvzhYqN9QfRoeQhGyhrV764z/lYm2irJuJnfTjm ScaEPJq16DRlQ== Date: Mon, 02 Jan 2023 00:46:17 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <87o7ri74qv.fsf@localhost> Message-ID: <9bc9c69ac20a37ded741@heytings.org> References: <87o7ri74qv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@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.0 (-) > > I am not sure if it is Emacs bug, but I have difficulty understanding > the origin of the following error: > > 1. Create /tmp/bug.org with the following contents > > * h1 > ** h2 > > 2. emacs -Q /tmp/bug.org > 3. Move point to h2 > 4. M-x org-promote-subtree > 5. M-x undo > 6. Observe "Changes to be undone by function different from announced" error > The culprit is 85e0a69567 (in the Org repository), and the bug is fixed by: diff --git a/lisp/org.el b/lisp/org.el index a98a7f5a0..becb302e1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6554,8 +6554,7 @@ See also `org-promote'." (interactive) (save-excursion (org-back-to-heading t) - (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) - (org-with-limited-levels (org-map-tree 'org-promote)))) + (org-with-limited-levels (org-map-tree 'org-promote))) (org-fix-position-after-promote)) (defun org-demote-subtree () @@ -6564,8 +6563,7 @@ See `org-demote' and `org-promote'." (interactive) (save-excursion (org-back-to-heading t) - (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) - (org-with-limited-levels (org-map-tree 'org-demote)))) + (org-with-limited-levels (org-map-tree 'org-demote))) (org-fix-position-after-promote)) (defun org-do-promote () Perhaps another better fix exists. If it's an Emacs bug, which is possible, it's in combine-change-calls. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 20:50:27 2023 Received: (at 60467) by debbugs.gnu.org; 2 Jan 2023 01:50:27 +0000 Received: from localhost ([127.0.0.1]:42134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC9y6-0000VE-Nv for submit@debbugs.gnu.org; Sun, 01 Jan 2023 20:50:27 -0500 Received: from heytings.org ([95.142.160.155]:55254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC9y5-0000V4-8M for 60467@debbugs.gnu.org; Sun, 01 Jan 2023 20:50:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672624223; bh=kW9xWpF5Oh0LHwkt96OA6KJS2lX3zXXEF7Gn+I6bsYc=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Yxnw2fyxoXqWDOALOMVoZT1V1Lsr8OUjvSX7DrfvdElr4kIwu8ZyWsng4gQdp0j8h AVpbbkdgy8FBes/6LtVmDedkiIN34SXCrMp3yaroaZQNSDJwDqq4cSiNFRncqKi8NJ MhmCtfNyK3mtDm2Q55+0yhvqEgqfNSgjzDvWeNCKlRazZbn6L7ACY7JjCD7EXZEy4+ ZGAqYlGijtdJhXQdV3isTchnmYvZLpKr5k9f/nf1dNPCg6h54bPesZLjIcVhlNtJiz QnsSMqFZtNDGiG0+Rx2sMyAiObA8mTXxlXGnFcuJwNyQmNGcJEq2yGKZu5IHUhwFLH 4xmjwcdP9tMkg== Date: Mon, 02 Jan 2023 01:50:23 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <9bc9c69ac20a37ded741@heytings.org> Message-ID: <9bc9c69ac282c0148962@heytings.org> References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@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.0 (-) > > If it's an Emacs bug, which is possible, it's in combine-change-calls. > A few more details on the bug. It's still unclear to me whether the bug is in Org or in Emacs. When the file is opened we start with buffer-undo-list = nil. The (org-with-limited-levels (org-map-tree 'org-promote)) body in org-promote-subtree, called inside a combine-change-calls, adds four entries to buffer-undo-list: ("** " . 6) (9 . 11) which means that three characters have been removed and two have been added in the buffer, which seems correct, although the (9 . 11) entry looks a bit suspicious. Perhaps (6 . 8) would have been expected there? However, this change does not happen outside the region on which combine-change-calls is called, which is 6-11. Upon returning from combine-change-calls, buffer-undo-list contains four elements, when a single element would have been expected, if I understand its docstring correctly: (apply 1 6 10 #'undo--wrap-and-run-primitive-undo 6 10 (("** " . 6))) (9 . 11) From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 04:27:23 2023 Received: (at 60467) by debbugs.gnu.org; 2 Jan 2023 09:27:23 +0000 Received: from localhost ([127.0.0.1]:42497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCH6I-0000H4-Hq for submit@debbugs.gnu.org; Mon, 02 Jan 2023 04:27:22 -0500 Received: from mout01.posteo.de ([185.67.36.65]:60037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCH6G-0000Gn-S1 for 60467@debbugs.gnu.org; Mon, 02 Jan 2023 04:27:21 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F30D224026F for <60467@debbugs.gnu.org>; Mon, 2 Jan 2023 10:27:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672651635; bh=uXZUu6LDqt3UwIHYtAUXVQozcEr9mD2/SOsWcl2GCDQ=; h=From:To:Cc:Subject:Date:From; b=nI9B0N/Z1HtMQbW91wa5r6XIkOH/hWA2n10VCSx05grxBxSVCf5KBWjYKOxn6Fswo 5RTxDhNYFO5UMdTKY6BdXuQMpB+KrVZtVEzkzAQap0iKvGZ7FQQMLASkHK+aDcs5la /54r15VJvsFQgMjCdo1CuSa16FxWodjD0N9dvBc+NQzdzFHqKv6vGo608PhYG5FxGt f4NerVTmXcxHE01K4C8UbLrzUiT/eozazaekI+WGa5TaBi+u88la9pKvyZfkcnoQuw C+hz/SK8mvK/66qTwwSr6ZoIJl8wQsg8Nnpe12NLgxvDt0yD/6W6Ua2WN4gw+NsYvm 1XWla2JSAFIOw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nlr9W3nq4z9rxM; Mon, 2 Jan 2023 10:27:11 +0100 (CET) From: Ihor Radchenko To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <9bc9c69ac20a37ded741@heytings.org> References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> Date: Mon, 02 Jan 2023 09:27:41 +0000 Message-ID: <87k025mgky.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: > The culprit is 85e0a69567 (in the Org repository), and the bug is fixed > by: > > - (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) > - (org-with-limited-levels (org-map-tree 'org-promote)))) > + (org-with-limited-levels (org-map-tree 'org-promote))) > (org-fix-position-after-promote)) Unfortunately, `combine-change-calls' is there for a reason. Heading manipulation involves adding/removing stars. When done in batch, this involves drastic AST changes. `combine-change-calls' here is used to merge AST cache modifications into a single update request. It makes orders of magnitudes performance improvement in some scenarios. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 04:31:46 2023 Received: (at 60467) by debbugs.gnu.org; 2 Jan 2023 09:31:46 +0000 Received: from localhost ([127.0.0.1]:42502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCHAM-0000On-B7 for submit@debbugs.gnu.org; Mon, 02 Jan 2023 04:31:46 -0500 Received: from mout01.posteo.de ([185.67.36.65]:54865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCHAK-0000Oa-Ff for 60467@debbugs.gnu.org; Mon, 02 Jan 2023 04:31:33 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 92DBE24025B for <60467@debbugs.gnu.org>; Mon, 2 Jan 2023 10:31:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672651886; bh=q79G1cAemAirtcY4ZRgOyhWaUyMkyQCzVdJePy0aFeg=; h=From:To:Cc:Subject:Date:From; b=nl7oy/41p92AK0f6Q300xMWzAYtCQAv2NSFmEvEDBomUEOy5+JrQQ4qfMv+USXzS9 yZ+wChcy34Ak6NGw1lxxperYXHPeEDHEEX9njIwMJho8Eov9eSuKS+edVtjAT+1lED eXLHf/FKfQW6FTi/7K+AyMmNWqG8mVrO+sLP+MraIWlilVO3aYTmlFoKv4Lr83BTgd Y/whNU7bPvzOZri+pD1dbRRkcznQI+Gm2S4q1bZThStsejHAdrInjN/80k6qTizs+w Tr1lFIKNH4iQS0B0NdeENxWW5gi0pVPt/FISHsLcW8IimEJLFhJHLUQ8sb/D7hX+LI lnGKqhI2JSzIA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NlrGP6Twzz6tmY; Mon, 2 Jan 2023 10:31:25 +0100 (CET) From: Ihor Radchenko To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <9bc9c69ac282c0148962@heytings.org> References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> Date: Mon, 02 Jan 2023 09:31:56 +0000 Message-ID: <87h6x9mgdv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@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.0 (-) Gregory Heytings writes: > The (org-with-limited-levels (org-map-tree 'org-promote)) body in > org-promote-subtree, called inside a combine-change-calls, adds four > entries to buffer-undo-list: > > ("** " . 6) (9 . 11) > > which means that three characters have been removed and two have been > added in the buffer, which seems correct The actual function doing the work is (replace-match (apply #'propertize up-head (text-properties-at (match-beginning 0))) t) The match is "** " and the replacement is "* ". -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 04:41:59 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 09:41:59 +0000 Received: from localhost ([127.0.0.1]:44737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCdnz-0003AA-4F for submit@debbugs.gnu.org; Tue, 03 Jan 2023 04:41:59 -0500 Received: from heytings.org ([95.142.160.155]:56918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCdnu-00039w-Bs for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 04:41:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672738913; bh=ZJYExqxZmtwqBu4psOcesHj70rLocvwdw++VB7lF0kA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=cCKpHDx3sQPKfUAux9L/luQ7yC3l9lpSkZ1GYJ6fL9DOfaNBkjpxv07xk8my61Iyw QyU0Jt96hGBdXOdXpz0wzMZGkhp3tw/gNAhcudqhS08RmxQPj7xBuEw81c+DCHeEeG 1xxICQjRpcK+ycoeCsOA3WdnkPNNQJFEr1lI0BTOONvh3JIQ2apT5IzJA20J2bMZ7v MCg67s+lhhMDHfIWsheHpF9W2PRdBZOaf2EC2TmU5Ylm1couxCXvTGbUw952nLYtkH 0Oo30NUuQntQauhb5DUHWcg8k0gMSgXitKQEvGI6nDSkCY4D7zpmAgfVxQtsMBKwTn saf4025gRsv/g== Date: Tue, 03 Jan 2023 09:41:52 +0000 From: Gregory Heytings To: Ihor Radchenko Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <87h6x9mgdv.fsf@localhost> Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NG9c1wiATu" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@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.0 (-) --NG9c1wiATu Content-Type: text/plain; format=flowed; charset=us-ascii It turns out that the bug is indeed not in Org, but in Emacs. The part of combine-change-call which creates the undo-list element was totally broken. For example, with a buffer-undo-list like nil ofter body has been evaluated, the buffer-undo-list after combine-change-call is (apply ... #'undo--wrap-and-run-primitive-undo ... ()) nil which is clearly wrong, because and should be considered as a single undo step. IOW, after combine-change-call buffer-undo-list should be: (apply ... #'undo--wrap-and-run-primitive-undo ... ( )) nil Patch attached. --NG9c1wiATu Content-Type: text/x-diff; name=Fix-combine-change-call.patch Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=Fix-combine-change-call.patch RnJvbSAyMjYxZGU0ZDIwZDAwNmM1MzQ0NjE1ZDQ5YWRlNTM5NTQxNTc3Zjdl IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUdWUsIDMgSmFu IDIwMjMgMDk6MjM6MTQgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRml4IGNv bWJpbmUtY2hhbmdlLWNhbGwNCg0KKiBsaXNwL3N1YnIuZWwgKGNvbWJpbmUt Y2hhbmdlLWNhbGxzLTEpOiBSZXdyaXRlIHRoZSBwYXJ0IHdoaWNoDQpjcmVh dGVzIHRoZSB1bmRvLWxpc3QgZWxlbWVudC4gIEZpeGVzIGJ1ZyM2MD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0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIChlcSAoY2FhciBwdHIpIHQpKQ0K KyAgICAgICAgICAgICAgICAocHVzaCAoY2FyIHB0cikgYm9keS11bmRvLWxp c3QpKQ0KKyAgICAgICAgICAgICAgKHNldHEgcHRyIChjZHIgcHRyKSkpDQor ICAgICAgICAgICAgKHNldHEgYm9keS11bmRvLWxpc3QgKG5yZXZlcnNlIGJv ZHktdW5kby1saXN0KSkNCisgICAgICAgICAgICAocHVzaCAobGlzdCAnYXBw bHkNCisJICAgICAgICAgICAgICAgICgtIGVuZCBlbmQtbWFya2VyKQ0KKwkg ICAgICAgICAgICAgICAgYmVnDQorCSAgICAgICAgICAgICAgICAobWFya2Vy LXBvc2l0aW9uIGVuZC1tYXJrZXIpDQorCSAgICAgICAgICAgICAgICAjJ3Vu ZG8tLXdyYXAtYW5kLXJ1bi1wcmltaXRpdmUtdW5kbw0KKwkgICAgICAgICAg ICAgICAgYmVnIChtYXJrZXItcG9zaXRpb24gZW5kLW1hcmtlcikNCisgICAg ICAgICAgICAgICAgICAgICAgICBib2R5LXVuZG8tbGlzdCkNCisgICAgICAg ICAgICAgICAgICBidWZmZXItdW5kby1saXN0KQ0KKyAgICAgICAgICAgIChz ZXRjZHIgYnVmZmVyLXVuZG8tbGlzdCBvbGQtYnVsKSkpDQogCShpZiAobm90 IGluaGliaXQtbW9kaWZpY2F0aW9uLWhvb2tzKQ0KIAkgICAgKHJ1bi1ob29r LXdpdGgtYXJncyAnYWZ0ZXItY2hhbmdlLWZ1bmN0aW9ucw0KIAkJCQliZWcg KG1hcmtlci1wb3NpdGlvbiBlbmQtbWFya2VyKQ0KLS0gDQoyLjM5LjANCg0K --NG9c1wiATu-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 07:46:30 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 12:46:30 +0000 Received: from localhost ([127.0.0.1]:44889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCggX-0004GE-Q9 for submit@debbugs.gnu.org; Tue, 03 Jan 2023 07:46:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCggS-0004Fq-Co for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 07:46:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCggK-0005Mf-HJ; Tue, 03 Jan 2023 07:46:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kD/S3cAs7YPanvM6jNfjYIIXg1RZvkbaV4KX78eHJ/U=; b=cPv7TkIfms0b H7qFJu4acf41cIfyzRpDGO7DsW/BIAYH7KWllfxE0/+Jr5OnDLFblWqlaC0i/VEd9qArfEk/WAQwl gcu+TCSGr0qMFZDxqmyAqYS8nfjajzfSkfxwMgOiqbYM5xvuK04ErC/OJ3MwMGPHZSApSLRwT2Kqh VJquk+V+3ZEFOdPDXN25m6n0hDJyKfFlnAROIOri0+1Tt1uNWIQ+MTTiIPdV3uKOg4WODqlXVrh1a SDOsx7AVTcJt8ffKuDJHwTD8N0yV5zCPx0JMAUagyxf5j69R7/jAJSyxd1qr7INSRNnYZ35kkNsyZ PLen7xDRsWAVZ4lVeYS/JA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCggJ-0005s3-TO; Tue, 03 Jan 2023 07:46:16 -0500 Date: Tue, 03 Jan 2023 14:46:25 +0200 Message-Id: <838rij23by.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings , Stefan Monnier In-Reply-To: (message from Gregory Heytings on Tue, 03 Jan 2023 09:41:52 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 60467@debbugs.gnu.org > Date: Tue, 03 Jan 2023 09:41:52 +0000 > From: Gregory Heytings > > It turns out that the bug is indeed not in Org, but in Emacs. The part of > combine-change-call which creates the undo-list element was totally > broken. For example, with a buffer-undo-list like > > nil > > ofter body has been evaluated, the buffer-undo-list after > combine-change-call is > > (apply ... #'undo--wrap-and-run-primitive-undo ... ()) nil > > which is clearly wrong, because and > should be considered as a single undo step. IOW, after > combine-change-call buffer-undo-list should be: > > (apply ... #'undo--wrap-and-run-primitive-undo ... ( )) nil > > Patch attached. Hmm... scary, even if this is intended for the master branch. Could you at least keep the few comments which were in the original code, and perhaps also add comments explaining all those tricky tests with consp, equality to t and to old-bul, the significance of (car ptr) and (caar ptr), etc.? This would make the code more maintainer-friendly, as the need to constantly consult the spec of the various undo-list elements (and hope the spec is complete and accurate ;-) would be avoided. I'd prefer to fix this in Emacs 29 if feasible, but unless the changes are much simpler and/or more clearly documented, so that it becomes possible to assess their risks, I don't see how that could happen. I presume that all the undo tests we have still pass? If so, how about adding a test for this bug? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 08:44:05 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 13:44:05 +0000 Received: from localhost ([127.0.0.1]:44970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pChaG-00060Z-TT for submit@debbugs.gnu.org; Tue, 03 Jan 2023 08:44:05 -0500 Received: from heytings.org ([95.142.160.155]:57142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pChaE-00060F-VW for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 08:44:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672753441; bh=cfB3oSmkoYZVINDbhj7DkdzondQObd6o5yXXNJdjfOg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Dy9rKvcIsnMrTuLbVFBzQi6eMNxnocrfRF2YEXEpkEPO/ELZUvIIClUX9FTAV4xpE tTAZ60TTBHe/keBKEu80waEobq5VgTPGl8O9YiOFz3Ekkmeqel1XkilT4tOFd77xnf xvKG8eSqB6MbQ+GFKO3Nsn6PmsrPct1vIvgdeUjwDczTCkykulMfxep6H9zGtdx3gD WpeJ/b9fY/3f2bWYLkbvB8NSGuzZsC01tHhjQBgcfRRhDyJBcgX+A2mc7+gNPwMPx9 GFggEX+c/toCEDGbm9E5FEKE6P5Le+/8ziL9pU7lH2QsKMoQy45UxkJKkoIWl58o8d EUMlnPSJbtnTQ== Date: Tue, 03 Jan 2023 13:44:01 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <838rij23by.fsf@gnu.org> Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="XIbtaRmN05" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, yantar92@posteo.net, 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: -1.0 (-) --XIbtaRmN05 Content-Type: text/plain; format=flowed; charset=us-ascii >> Patch attached. > > Hmm... scary, even if this is intended for the master branch. Could you > at least keep the few comments which were in the original code, and > perhaps also add comments explaining all those tricky tests with consp, > equality to t and to old-bul, the significance of (car ptr) and (caar > ptr), etc.? This would make the code more maintainer-friendly, as the > need to constantly consult the spec of the various undo-list elements > (and hope the spec is complete and accurate ;-) would be avoided. > Is the attached patch better in that respect? > > I'd prefer to fix this in Emacs 29 if feasible, but unless the changes > are much simpler and/or more clearly documented, so that it becomes > possible to assess their risks, I don't see how that could happen. > I don't see how the changes could be made simpler, sorry, but now they are documented. Feel free to ask further questions if something is still unclear. > > I presume that all the undo tests we have still pass? > They do. > > If so, how about adding a test for this bug? > I'll see if I can do that, but it seems tricky. --XIbtaRmN05 Content-Type: text/x-diff; name=Fix-combine-change-call.patch Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=Fix-combine-change-call.patch RnJvbSA4ZjY1YTc0ZWMxYjg2YjNmNWYyOTU5NzJjOTliMGI0NjFjYzdiZDI4 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUdWUsIDMgSmFu IDIwMjMgMTM6Mjk6MDYgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRml4IGNv bWJpbmUtY2hhbmdlLWNhbGwNCg0KKiBsaXNwL3N1YnIuZWwgKGNvbWJpbmUt Y2hhbmdlLWNhbGxzLTEpOiBSZXdyaXRlIHRoZSBwYXJ0IHdoaWNoDQpjcmVh dGVzIHRoZSB1bmRvLWxpc3QgZWxlbWVudC4gIEZpeGVzI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ZCBlbmQtbWFya2VyKQ0K KwkJCWJlZw0KKwkJCShtYXJrZXItcG9zaXRpb24gZW5kLW1hcmtlcikNCisJ CQkjJ3VuZG8tLXdyYXAtYW5kLXJ1bi1wcmltaXRpdmUtdW5kbw0KKwkJCWJl ZyAobWFya2VyLXBvc2l0aW9uIGVuZC1tYXJrZXIpDQorCQkJYm9keS11bmRv LWxpc3QpDQorCQkgIGJ1ZmZlci11bmRvLWxpc3QpDQorCSAgICA7OyAuLi4g YW5kIHNldCB0aGUgY2RyIG9mIGJ1ZmZlci11bmRvLWxpc3QgdG8NCisJICAg IDs7IGJ1ZmZlci11bmRvLWxpc3QgYmVmb3JlIGJvZHkgd2FzIGV2YWx1YXRl ZC4NCisJICAgIChzZXRjZHIgYnVmZmVyLXVuZG8tbGlzdCBvbGQtYnVsKSkp DQogCShpZiAobm90IGluaGliaXQtbW9kaWZpY2F0aW9uLWhvb2tzKQ0KIAkg ICAgKHJ1bi1ob29rLXdpdGgtYXJncyAnYWZ0ZXItY2hhbmdlLWZ1bmN0aW9u cw0KIAkJCQliZWcgKG1hcmtlci1wb3NpdGlvbiBlbmQtbWFya2VyKQ0KLS0g DQoyLjM5LjANCg0K --XIbtaRmN05-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 09:48:43 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 14:48:43 +0000 Received: from localhost ([127.0.0.1]:45043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCiao-0007gh-Mj for submit@debbugs.gnu.org; Tue, 03 Jan 2023 09:48:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57344) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCiam-0007gU-98 for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 09:48:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCiag-0003H5-4Y; Tue, 03 Jan 2023 09:48:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VijVrdx0F1ZDUU9VMAhJC8+h8YD5temuZWAClg4dfcw=; b=d/vhOlxidZLz Nax2Ml43NZsSLbLeykoqjWwkhn6/6b4dNwgNHZSWIWcl+0Y1DQ39CCCWRTi9yer4XzXlpE1xSA8a9 LIs2RiVmwl6X1fqDqmGFh3GT11DnVHM6tCWB3vmOs9+1grR89sGGlhSR4FLsZBd3YHAMYuScyJBSZ SXEesYJc5yMJmqmRZQMUiOKR07qVYlpCrLYNN4A9I4tt2rERLvK2cSoV1g96dvKfFupoPsreUZMfw ozkbPpR65VEKSiI/L1V7kv7JmsrxKaWoqNNeOH0+fqrpQeCLRVi+4Lhv+/SAegFyKXK8os7VY8zKv Kgh6n0RLys8DR8/+0M8Idw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCiae-00085n-2r; Tue, 03 Jan 2023 09:48:33 -0500 Date: Tue, 03 Jan 2023 16:48:41 +0200 Message-Id: <83zgazznau.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Tue, 03 Jan 2023 13:44:01 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 03 Jan 2023 13:44:01 +0000 > From: Gregory Heytings > cc: Stefan Monnier , 60467@debbugs.gnu.org, > yantar92@posteo.net > > > Hmm... scary, even if this is intended for the master branch. Could you > > at least keep the few comments which were in the original code, and > > perhaps also add comments explaining all those tricky tests with consp, > > equality to t and to old-bul, the significance of (car ptr) and (caar > > ptr), etc.? This would make the code more maintainer-friendly, as the > > need to constantly consult the spec of the various undo-list elements > > (and hope the spec is complete and accurate ;-) would be avoided. > > Is the attached patch better in that respect? To some extent, yes. But there's too much of comments that just say what the code does without explaining. So let me ask some questions instead: > - ;; In case garbage collection has removed OLD-BUL. > - (cdr ptr) Why should we toss this precaution? > - (unless (cdr ptr) > - (message "combine-change-calls: buffer-undo-list broken")) And this one? > + ;; If buffer-undo-list is neither t (in which case undo > + ;; information is not recorded) nor equal to buffer-undo-list > + ;; before body was evaluated (in which case evaluating body > + ;; did not add items to buffer-undo-list) ... > + (when (and (not (eq buffer-undo-list t)) > + (not (eq buffer-undo-list old-bul))) > + (let ((ptr buffer-undo-list) body-undo-list) > + ;; ... then loop over buffer-undo-list, until the head of > + ;; buffer-undo-list before body was evaluated is found ... > + (while (not (eq ptr old-bul)) > + ;; ... and add the entries to body-undo-list, unless > + ;; they are of the form (t . ), which are > + ;; entries that record buffer modification timestamps. > + (unless (and (consp (car ptr)) > + (eq (caar ptr) t)) > + (push (car ptr) body-undo-list)) > + (setq ptr (cdr ptr))) > + (setq body-undo-list (nreverse body-undo-list)) > + ;; Add an (apply ...) entry to buffer-undo-list, using > + ;; body-undo-list ... > + (push (list 'apply > + (- end end-marker) > + beg > + (marker-position end-marker) > + #'undo--wrap-and-run-primitive-undo > + beg (marker-position end-marker) > + body-undo-list) > + buffer-undo-list) > + ;; ... and set the cdr of buffer-undo-list to > + ;; buffer-undo-list before body was evaluated. > + (setcdr buffer-undo-list old-bul))) So basically you are saying that the current code stops too early and doesn't collect all the undo entries that need to be combined, because timestamp entries get in the way, is that right? From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 09:56:54 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 14:56:54 +0000 Received: from localhost ([127.0.0.1]:46461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCiij-0008EX-Lw for submit@debbugs.gnu.org; Tue, 03 Jan 2023 09:56:54 -0500 Received: from heytings.org ([95.142.160.155]:57224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCiih-0008ER-Vl for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 09:56:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672757810; bh=cDfx0gSM/WZw/RVwPnCNCFR4s+ql2CtdGbPaEU+KdPE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Qr9hyKhm8nLHJL/RBZ32WxNesMtZnv/PHuX64LYq9MU4HyhFVha2FzARZ1KHR0ADF P9VgKC0Ao4X1qIf3PFmyxf0K5bP6DedA12aoN2oug00ABnDB5La4T5K5teQdZr3bU3 Pigl2mGxHUXHsfar77ZY1Ca0BVUpcw3FWvHoLOOhHyrhMeNZHAPvFWUjGKmZyn8nfa 3vgbmjoGAecPNcKM3DrurOge6iBDseOrBIq0z5NKlYwUmIK+kRkwkebQxiQCaPkCN5 sNHP4DJeoRXmokH6cuxCce2fBLmT99NxvuaMNWQRxoMo01ZJK+MbELJcvlXfbmjqMs gQZLpBc/AEwGw== Date: Tue, 03 Jan 2023 14:56:49 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="fo8oe4g5dC" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, yantar92@posteo.net, 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: -1.0 (-) --fo8oe4g5dC Content-Type: text/plain; charset=us-ascii; format=flowed >> If so, how about adding a test for this bug? > > I'll see if I can do that, but it seems tricky. > Here you go. Without the patch tests 2 and 3 fail, with the patch all three tests pass. --fo8oe4g5dC Content-Type: text/x-diff; name=Three-new-tests-for-undo-with-combine-change-calls.patch Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=Three-new-tests-for-undo-with-combine-change-calls.patch RnJvbSAzMzNhMWI0NmFhMWE0MzBmYjhjYjdhODQ4OTQ2YjBhNWVhMmEwZWRl IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUdWUsIDMgSmFu IDIwMjMgMTQ6NTQ6MDkgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gVGhyZWUg bmV3IHRlc3RzIGZvciAndW5kbycgd2l0aCAnY29tYmluZS1jaGFuZ2UtY2Fs bHMnDQoNCiogdGVzdC9zcmMvdW5kby10ZXN0cy5lbCAodW5kby10ZXN0LWNv bWJpbmUtY2hhbmdlLWNhbGxzLTEpDQoodW5kby10ZXN0LWNvbWJpbmUtY2hh bmdlLWNhbGxzLTIpDQoodW5kby10ZXN0LWNvbWJpbmUtY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bmdlLWNhbGxzJyBp cw0KK2NhbGxlZC4iDQorICAoZXJ0LXdpdGgtdGVtcC1maWxlIHRlbXBmaWxl DQorICAgICh3aXRoLWN1cnJlbnQtYnVmZmVyIChmaW5kLWZpbGUgdGVtcGZp bGUpDQorICAgICAgKGluc2VydCAiQSIpDQorICAgICAgKHVuZG8tYm91bmRh cnkpDQorICAgICAgKGluc2VydCAiQiIpDQorICAgICAgKHVuZG8tYm91bmRh cnkpDQorICAgICAgKGluc2VydCAiQyIpDQorICAgICAgKHVuZG8tYm91bmRh cnkpDQorICAgICAgKGluc2VydCAiICIpDQorICAgICAgKHVuZG8tYm91bmRh cnkpDQorICAgICAgKGluc2VydCAiRCIpDQorICAgICAgKHVuZG8tYm91bmRh cnkpDQorICAgICAgKGluc2VydCAiRSIpDQorICAgICAgKHVuZG8tYm91bmRh cnkpDQorICAgICAgKGluc2VydCAiRiIpDQorICAgICAgKHNob3VsZCAoPSAo bGVuZ3RoIGJ1ZmZlci11bmRvLWxpc3QpIDE0KSkNCisgICAgICAoc2F2ZS1i dWZmZXIpDQorICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkNCisgICAg ICAoY29tYmluZS1jaGFuZ2UtY2FsbHMgKHBvaW50LW1pbikgKHBvaW50LW1h eCkNCisgICAgICAgIChyZS1zZWFyY2gtZm9yd2FyZCAiQUJDICIpDQorICAg ICAgICAocmVwbGFjZS1tYXRjaCAiWiAiKSkNCisgICAgICAoc2hvdWxkICg9 IChsZW5ndGggYnVmZmVyLXVuZG8tbGlzdCkgMTUpKSkpKQ0KKw0KKyhlcnQt ZGVmdGVzdCB1bmRvLXRlc3QtY29tYmluZS1jaGFuZ2UtY2FsbHMtMyAoKQ0K KyAgIlRlc3QgaG93IGBjb21iaW5lLWNoYW5nZS1jYWxscycgdXBkYXRlcyBg YnVmZmVyLXVuZG8tbGlzdCcuDQorQ2FzZSAzOiBhIGZpbGUtdmlzaXRpbmcg YnVmZmVyIHdpdGggYGJ1ZmZlci11bmRvLWxpc3QnIG5pbCBhbmQNCitgYnVm ZmVyLW1vZGlmaWVkLXAnIG5pbCB3aGVuIGBjb21iaW5lLWNoYW5nZS1jYWxs cycgaXMgY2FsbGVkLiINCisgIChlcnQtd2l0aC10ZW1wLWZpbGUgdGVtcGZp bGUNCisgICAgKHdpdGgtY3VycmVudC1idWZmZXIgKGZpbmQtZmlsZSB0ZW1w ZmlsZSkNCisgICAgICAoaW5zZXJ0ICJBQkMgREVGIikNCisgICAgICAoc2F2 ZS1idWZmZXIpDQorICAgICAgKGtpbGwtYnVmZmVyKSkNCisgICAgKHdpdGgt Y3VycmVudC1idWZmZXIgKGZpbmQtZmlsZSB0ZW1wZmlsZSkNCisgICAgICAo c2hvdWxkICg9IChsZW5ndGggYnVmZmVyLXVuZG8tbGlzdCkgMCkpDQorICAg ICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkNCisgICAgICAoY29tYmluZS1j aGFuZ2UtY2FsbHMgKHBvaW50LW1pbikgKHBvaW50LW1heCkNCisgICAgICAg IChyZS1zZWFyY2gtZm9yd2FyZCAiQUJDICIpDQorICAgICAgICAocmVwbGFj ZS1tYXRjaCAiWiAiKSkNCisgICAgICAoc2hvdWxkICg9IChsZW5ndGggYnVm ZmVyLXVuZG8tbGlzdCkgMSkpKSkpDQorDQogKGRlZnVuIHVuZG8tdGVzdC1h bGwgKCZvcHRpb25hbCBpbnRlcmFjdGl2ZSkNCiAgICJSdW4gYWxsIHRlc3Rz IGZvciBcXFt1bmRvXS4iDQogICAoaW50ZXJhY3RpdmUgInAiKQ0KLS0gDQoy LjM5LjANCg0K --fo8oe4g5dC-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 10:05:33 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 15:05:33 +0000 Received: from localhost ([127.0.0.1]:46479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCir7-0008TB-3O for submit@debbugs.gnu.org; Tue, 03 Jan 2023 10:05:33 -0500 Received: from heytings.org ([95.142.160.155]:57252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCir4-0008T0-S4 for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 10:05:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672758329; bh=bcbaaINL7NgkTtowVAEbdhITYy2/VIyggNfoJikdiWY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=zm3mU5ajCEpNhbipfcAsPBrCjD162LL+oeLf8MocSSKypuhKoYvb4/OE1YJPYSpGq z+9PSUKs6ivyuPlqp2/KCHDkMFqmRGMIwvXT+PFMzHRxQfl7fWNUWJ2B3vjFyPj/Jx wOtUj1tt4PC25tpqcDbQXo/fHohOr6/DtYFeSNaIAv6obBI1J3Me0b6iwbMIXbxGLQ YdJWXCb/DS9jsfLrXDYkOHOOP6NAyv4TeuJIEFMx7ozT35e4LqkS//Y2TW3/9qjiD6 EvnVaYAH3Igx9Rz5y7SyZNUiCmQFOl32PYNPoZB1CBghXO4p8KjJ/YybvRamI7GGdf sLFqlkw7R2iZA== Date: Tue, 03 Jan 2023 15:05:29 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83zgazznau.fsf@gnu.org> Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> - ;; In case garbage collection has removed OLD-BUL. >> - (cdr ptr) > > Why should we toss this precaution? > I don't even understand what this is supposed to do. By definition, garbage collection cannot collect something that is still referred to. >> - (unless (cdr ptr) >> - (message "combine-change-calls: buffer-undo-list broken")) > > And this one? > This one is just plain wrong. It assumes that buffer-undo-list is non-nil initially. >> + ;; If buffer-undo-list is neither t (in which case undo >> + ;; information is not recorded) nor equal to buffer-undo-list >> + ;; before body was evaluated (in which case evaluating body >> + ;; did not add items to buffer-undo-list) ... >> + (when (and (not (eq buffer-undo-list t)) >> + (not (eq buffer-undo-list old-bul))) >> + (let ((ptr buffer-undo-list) body-undo-list) >> + ;; ... then loop over buffer-undo-list, until the head of >> + ;; buffer-undo-list before body was evaluated is found ... >> + (while (not (eq ptr old-bul)) >> + ;; ... and add the entries to body-undo-list, unless >> + ;; they are of the form (t . ), which are >> + ;; entries that record buffer modification timestamps. >> + (unless (and (consp (car ptr)) >> + (eq (caar ptr) t)) >> + (push (car ptr) body-undo-list)) >> + (setq ptr (cdr ptr))) >> + (setq body-undo-list (nreverse body-undo-list)) >> + ;; Add an (apply ...) entry to buffer-undo-list, using >> + ;; body-undo-list ... >> + (push (list 'apply >> + (- end end-marker) >> + beg >> + (marker-position end-marker) >> + #'undo--wrap-and-run-primitive-undo >> + beg (marker-position end-marker) >> + body-undo-list) >> + buffer-undo-list) >> + ;; ... and set the cdr of buffer-undo-list to >> + ;; buffer-undo-list before body was evaluated. >> + (setcdr buffer-undo-list old-bul))) > > So basically you are saying that the current code stops too early and > doesn't collect all the undo entries that need to be combined, because > timestamp entries get in the way, is that right? > Yes. The current code apparently meant to skip these entries, but it does not work at all. Replacing a broken code that does not work with a clean(er) code that does work seems the right thing. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 10:17:08 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 15:17:08 +0000 Received: from localhost ([127.0.0.1]:46499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCj2J-0000LU-Tx for submit@debbugs.gnu.org; Tue, 03 Jan 2023 10:17:08 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCj2F-0000Kt-GZ for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 10:17:06 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 889D1100DDD; Tue, 3 Jan 2023 10:16:57 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BFB57100C89; Tue, 3 Jan 2023 10:16:55 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672759015; bh=htWlswjezwFoQhFFxds2wabgEHSoIRyC85UnjWCD0n0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JAqCxV0fnQlJ26LP8v+PpI2Xg1zTBC7/VFEToLiZyXxJISSpjnjQFeiLvi909Zq5Q rtYqOAa5G/QCrIp8OzBZXqJUWZdNuzUlfyZO20VBvXxx6SR6JptvRTQ1lH3hDmdrC7 NxOrWc8jWTUsEdV1qCUivOtFhTrMZv/mjWxxr50TEx2uHfwYnS+3wdVPEVFzjFd0Ry a98cVCuG56P1AJTOoIovw8snF393ysCYkrCq1Rjtnv8e+r6PhBObgI3wGc8PYl/hYz fqFBzs4mebZ2SyYfHLjJMelyzc8635cbNBCunSp7d5zj2MveCZn6C5f3U12WaMEP5j ha/40eViTwCeg== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 822F4120774; Tue, 3 Jan 2023 10:16:55 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: (Gregory Heytings's message of "Tue, 03 Jan 2023 09:41:52 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> Date: Tue, 03 Jan 2023 10:16:54 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.412 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > nil > > ofter body has been evaluated, the buffer-undo-list after > combine-change-call is > > (apply ... #'undo--wrap-and-run-primitive-undo ... ()) > nil > > which is clearly wrong Indeed. Which begs the question: why does the current code stop when it sees a timestamp? Alan? Do you remember why you did that? What would go wrong if we applied a patch like the one below? Stefan diff --git a/lisp/subr.el b/lisp/subr.el index 5fb150994ec..6f51ac90ce5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4972,10 +4972,11 @@ combine-change-calls-1 ;; In case garbage collection has removed OLD-BUL. (cdr ptr) ;; Don't include a timestamp entry. - (not (and (consp (cdr ptr)) - (consp (cadr ptr)) - (eq (caadr ptr) t) - (setq old-bul (cdr ptr))))) + ;; (not (and (consp (cdr ptr)) + ;; (consp (cadr ptr)) + ;; (eq (caadr ptr) t) + ;; (setq old-bul (cdr ptr)))) + ) (setq ptr (cdr ptr))) (unless (cdr ptr) (message "combine-change-calls: buffer-undo-list broken")) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 10:29:29 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 15:29:29 +0000 Received: from localhost ([127.0.0.1]:46509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCjEH-0000fN-6a for submit@debbugs.gnu.org; Tue, 03 Jan 2023 10:29:29 -0500 Received: from heytings.org ([95.142.160.155]:57284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCjEG-0000fF-0g for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 10:29:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672759766; bh=k0JcD98736/ErbVMS+D3TWnygcX5CZ+8aZ8PL3zQxCw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=wRy2AVQ+rCPcqvfABrB2l11j+WNMscLIb8ZYWYYcFenlxu9UYJg1LSp34PfaYzSjb fMSo3m0CnIQ/3W2CKh02lJoFs2rwhEO6KesCYy8o/Sv8C5zJW67iaN7g/ETjh3O8nh +Z2gCwvLnCAaa9Ewod+1rq9uLE2dNaOxZPfCG65O5rWNn1X3PNlyPD+2HQQqJGSzcP VfylgkFK7vPgWzW2KQcJY3B5TSUNwMvnzq1dLjuaDBoPiru3iAadLMiI6bBCGpMHVu M19k17AlSpnK7bO/arNKdhB1SECo4ZS//BYlmmBOctCV3f+yd5gHS7Gd1jQ+/Ifqbz ZF0PDAxPPfpOw== Date: Tue, 03 Jan 2023 15:29:26 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > What would go wrong if we applied a patch like the one below? > With that patch, the "combine-change-calls: buffer-undo-list broken" message would be displayed with the recipe of this bug report. And timestamp entries would be added to what is "body-undo-list" in my patch. It's not clear to me that this could cause problems, but I guess it's safer to not include them, given that they were never included, and that the intention of the original code was to exclude them. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 11:10:20 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 16:10:20 +0000 Received: from localhost ([127.0.0.1]:46541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCjrn-0001mT-Ig for submit@debbugs.gnu.org; Tue, 03 Jan 2023 11:10:19 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCjrj-0001mA-GE for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 11:10:17 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2104644123E; Tue, 3 Jan 2023 11:10:10 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2ED6E441072; Tue, 3 Jan 2023 11:10:08 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672762208; bh=a1IU7+RqfC2KPxyACilkNEpI3MhWQxP7TcokhWrgppM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=lM+QfkVOCAQHUoYQ+zzgK+DOwiz/U9Wu+rrFJf81eaDAnuZMsbnsvbJNRWGGqLaqE fXQbzIv7kiS+XItAqn0mq433Y/8cA53CI4ukZxVQ8un/92f5cC3RrYAzRI+Pkc9hiP xPyexsCVAjrJmMtG6mK2yRTt63MBJaG6+MXPf1XBBDrHz2BjkP7oek2Af/IQDdthPE 7yUFoV1q/pW18RE7PnMcvkpv7h5Ysojd3DgiByAMTZ2Qk3paHRwdiLW7molZxrn79B BCBUq9qdsAD5GaFwoByumxQpK70OsJenq9xVNJxc7XlhhWxjwmN0Y+l7dyOdKSfYuh aXVk18563+qTQ== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 91EBF1201C2; Tue, 3 Jan 2023 11:10:07 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: (Gregory Heytings's message of "Tue, 03 Jan 2023 15:05:29 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> Date: Tue, 03 Jan 2023 11:10:06 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.323 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> - ;; In case garbage collection has removed OLD-BUL. >>> - (cdr ptr) >> Why should we toss this precaution? > I don't even understand what this is supposed to do. Yet you happily threw it away :-( > By definition, garbage collection cannot collect something that is > still referred to. `garbage-collect` does a bit more than collect garbage. It also truncates undo lists among other things. >>> - (unless (cdr ptr) >>> - (message "combine-change-calls: buffer-undo-list broken")) >> And this one? > This one is just plain wrong. It assumes that buffer-undo-list is > non-nil initially. AFAICT it warns when the GC's truncation has thrown stuff away (in which case there's a good chance the `apply` element we're building is incorrect). But indeed, it probably misfires if `buffer-undo-list` is nil initially. > Yes. The current code apparently meant to skip these entries, but it does > not work at all. Replacing a broken code that does not work with > a clean(er) code that does work seems the right thing. FWIW, I don't see what's cleaner about the new code. Don't get me wrong: it's not worse either. The two look pretty much equivalent to me (well, the layout and ordering is different and your code builds a new list where the old code reuses the old list elements, but these are details that don't make much difference to neither the complexity nor the size of the code, from where I stand). Also, I agree that it's arguably easier/cleaner to install your change (which drops timestamp entries instead of exiting the loop at the first such entry) into your version of the code than into the current one (see patch below for my attempt to do that). But I don't understand why we should drop timestamp entries at all, so I'd first like to hear if Alan has an explanation for his choice to stop at timestamp entries: he presumably went to the trouble to write that extra code for a good reason. Stefan diff --git a/lisp/subr.el b/lisp/subr.el index 5fb150994ec..d84cd33c3a9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4971,12 +4971,13 @@ combine-change-calls-1 (while (and (not (eq (cdr ptr) old-bul)) ;; In case garbage collection has removed OLD-BUL. (cdr ptr) - ;; Don't include a timestamp entry. - (not (and (consp (cdr ptr)) - (consp (cadr ptr)) - (eq (caadr ptr) t) - (setq old-bul (cdr ptr))))) - (setq ptr (cdr ptr))) + ) + (if (and (consp (cdr ptr)) + (consp (cadr ptr)) + (eq (caadr ptr) t)) + ;; Don't include timestamp entries. + (setcdr ptr (cddr ptr)) + (setq ptr (cdr ptr)))) (unless (cdr ptr) (message "combine-change-calls: buffer-undo-list broken")) (setcdr ptr nil) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 11:32:28 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 16:32:28 +0000 Received: from localhost ([127.0.0.1]:46553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkDD-0002MY-2a for submit@debbugs.gnu.org; Tue, 03 Jan 2023 11:32:28 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkD8-0002MH-16 for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 11:32:26 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 42F19100D02; Tue, 3 Jan 2023 11:32:16 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 668D010033C; Tue, 3 Jan 2023 11:32:14 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672763534; bh=u2ImZeJ2nHkYPRe4HuG0GrJtSeuirH8ZhICGN1Z2zYU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BpGVY9bjNslPuQ6GHOfPta1lTBvvlPfwvgNxXmuyz3DIsi5wrjiTYV3MAaNSIuur1 3OMsgByXxgn5M6WcRl9rQXhi3rwDCjEmeVaKNNSkFRFBz/Z7+lKIg4MhGUFYHTN5Sv NctZrpuyEq/dW4/ycGiZhH/VyQJAVNoQeEusuCZjSbU168rh8IEPGaURid4bUgCk2C WpX76PoannL9tWrj+B+iCtQsigeRFzbTTRhXtadLzGzCzI8oCnqD1fVFvjYujxBAlF HiJosueXKWKtParN2diNZtnhw7Tmax69KiKOZFpYBQuSbti+/be4AV84L7QiuATQFd ny+bTpwIdOWkg== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 063CE1201C2; Tue, 3 Jan 2023 11:32:14 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: (Gregory Heytings's message of "Tue, 03 Jan 2023 15:29:26 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> Date: Tue, 03 Jan 2023 11:32:13 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.405 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > With that patch, the "combine-change-calls: buffer-undo-list broken" message > would be displayed with the recipe of this bug report. IIUC this is a separate issue which is fairly easy to fix (and doesn't need to be fixed on `emacs-29`) with something like the patch below. > And timestamp entries would be added to what is "body-undo-list" in my > patch. It's not clear to me that this could cause problems, but > I guess it's safer to not include them, given that they were never > included, AFAICT when they were not included, they resulted in a broken undo entry (as evidenced by the current bug report), so anything we do in their presence is "safer" than what we did before :-) Let's wait to see what Alan has to say, Stefan diff --git a/lisp/subr.el b/lisp/subr.el index 5fb150994ec..ff3a7c403d0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4970,15 +4970,16 @@ combine-change-calls-1 (progn (while (and (not (eq (cdr ptr) old-bul)) ;; In case garbage collection has removed OLD-BUL. - (cdr ptr) + (or (cdr ptr) + (progn + (message "combine-change-calls: buffer-undo-list broken") + nil)) ;; Don't include a timestamp entry. (not (and (consp (cdr ptr)) (consp (cadr ptr)) (eq (caadr ptr) t) (setq old-bul (cdr ptr))))) (setq ptr (cdr ptr))) - (unless (cdr ptr) - (message "combine-change-calls: buffer-undo-list broken")) (setcdr ptr nil) (push ap-elt buffer-undo-list) (setcdr buffer-undo-list old-bul))))) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 11:33:17 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 16:33:18 +0000 Received: from localhost ([127.0.0.1]:46557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkE1-0002O6-Id for submit@debbugs.gnu.org; Tue, 03 Jan 2023 11:33:17 -0500 Received: from heytings.org ([95.142.160.155]:57354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkDv-0002Nr-AV for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 11:33:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672763590; bh=3KcKv5P+OqUO868K9b4zMQmWUS+37K7Kgh5LNMm5tDw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=LwYWg39NPNYk2jcoGnMG8k/ekbymaZYnt15X3EjPv24MTSgK5U18Oy8omoLvCQ1kg FI8R+wNBnL5o5GUv2RYI7i5i+XLkbr6LK2wcZydfV3Z3aOZ1gbRUSuTXkQZVXPnlGD UGc83P9xT5WyAePZBigSWuSGsdjvmoh+vn38CU5jnR6vEShYI7ID/JipIpjga1bI3n 703oVfjmWi/1xiPdZGHh2jkGArhJvNzU3DrG8WW+Mg3lKseKdiM/dWdZFIbrd4PIzb 73j2FI0nqwRnRzyx0QHReFvhZTcndaqdp8qTCddoKD/dwe4bNUcmvgoshqBn9ecgo8 KDgmU8q2fmcAg== Date: Tue, 03 Jan 2023 16:33:09 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> I don't even understand what this is supposed to do. > > Yet you happily threw it away :-( > Because there are no such precautions elsewhere in the code, and the comment above ("In case garbage collection has removed OLD-BUL") does not explain what its purpose is. A few lines below, old-bul is used without such a precaution. Of course, if it has a purpose, it's okay to keep it. >> By definition, garbage collection cannot collect something that is >> still referred to. > > `garbage-collect` does a bit more than collect garbage. It also > truncates undo lists among other things. > Aha. So this means that garbage-collect could be called between (funcall body) and the (while ...) loop two lines below, and could have removed elements that were added to buffer-undo-list by (funcall body), right? If so, that's what the comment should have said. >> This one is just plain wrong. It assumes that buffer-undo-list is >> non-nil initially. > > AFAICT it warns when the GC's truncation has thrown stuff away (in which > case there's a good chance the `apply` element we're building is > incorrect). > Given what you write above, that's probably what it meant to do indeed. But it also warns when buffer-undo-list is initially nil, such as with the recipe of this bug report. If adding such a warning is useful, we should check whether old-bul was initially non-nil. >> Yes. The current code apparently meant to skip these entries, but it >> does not work at all. Replacing a broken code that does not work with >> a clean(er) code that does work seems the right thing. > > FWIW, I don't see what's cleaner about the new code. > It took me a half hour to figure out what the original code was doing with this 'ap-elt' to which 'buffer-undo-list' is added, and subsequenty modified by the loop below, which does not refer to buffer-undo-list, and which also updates 'old-bul' in an unclear way. I'm biased of course, but I think I would have understood the code in my patch much easier: it does one thing (adding the new undo element) after the other (building the list included in that undo element). From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 11:51:12 2023 Received: (at 60467) by debbugs.gnu.org; 3 Jan 2023 16:51:12 +0000 Received: from localhost ([127.0.0.1]:46570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkVM-0002sN-2Z for submit@debbugs.gnu.org; Tue, 03 Jan 2023 11:51:12 -0500 Received: from heytings.org ([95.142.160.155]:57378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCkVI-0002sC-EJ for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 11:51:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672764667; bh=i5KX5xpF+nhYWc6XfI+jeBY4fOYcqxd5Y6meLTaYmy8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Ybp6i03QyXAGz9a/kdfZFtNYbr6N0wtmk3mTyMQTYUgc6Tc70CaBYZSDBKg/fiBX4 4SdIthyq5DFi0tX4QAlkBLb2Az2AW40hso4ZI+6kYL8P3W6G25EytaJjq/ZNiWBR85 OA850QO4tNtCoDBvKtyKgjR61ZIVOzb5I5PfCxNEin/o9rHjU3P1EhpMA73d1v9/T/ a6HYCT0p9dAF72VWwfME/C5ehtGOVGvvfoYyAECHtoXUa+FE/1HMWfx60f2Abgq3r0 FFNyjLitJoSeGDrn4o8I7qVmk/pztELYILl05wabYqRACI+VV+5SFcnb/CTZCuCD7g N3nhSJ2BVoetg== Date: Tue, 03 Jan 2023 16:51:06 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ui8dU5CNie" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --ui8dU5CNie Content-Type: text/plain; charset=us-ascii; format=flowed Updated patch attached, incorporating your comments. --ui8dU5CNie Content-Type: text/x-diff; name=Fix-combine-change-call.patch Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=Fix-combine-change-call.patch RnJvbSAxNDIyZDhlYzMxMDBmNDlkNjlmZWZlYTQ4OGNjZGE3ODJmOTgzZWVj IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ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2YgYnVmZmVyLXVuZG8tbGlzdCB0bw0KKwkgICAgOzsg YnVmZmVyLXVuZG8tbGlzdCBiZWZvcmUgYm9keSB3YXMgZXZhbHVhdGVkLg0K KwkgICAgKHNldGNkciBidWZmZXItdW5kby1saXN0IG9sZC1idWwpKSkNCiAJ KGlmIChub3QgaW5oaWJpdC1tb2RpZmljYXRpb24taG9va3MpDQogCSAgICAo cnVuLWhvb2std2l0aC1hcmdzICdhZnRlci1jaGFuZ2UtZnVuY3Rpb25zDQog CQkJCWJlZyAobWFya2VyLXBvc2l0aW9uIGVuZC1tYXJrZXIpDQotLSANCjIu MzkuMA0KDQo= --ui8dU5CNie-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 19:16:47 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 00:16:47 +0000 Received: from localhost ([127.0.0.1]:47103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCrSZ-00078x-7L for submit@debbugs.gnu.org; Tue, 03 Jan 2023 19:16:47 -0500 Received: from heytings.org ([95.142.160.155]:57780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCrST-00078k-DN for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 19:16:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672791400; bh=Tiypbv4qHhgWwU6v0sHLPlGRnstKQxoJKIQfjhic+QM=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=RRH+o87rToZjrQiUmMQKWpqcZv04WDJksLzV94YjjNOzS5dvdPeaCE+2hjA7MY40w cnJysDdBC0FDqc1g8MMO+0iD+PhgadEoaPq/2Pg4sURLyeXn1HO4hfAfIzqnMp4Lb3 eF9n1sO89zivjKwl+bJgDeWdEtdcZwLYb1nzkEkpS0LxD1TW+oJU232AvHeUcf/M14 gCQvUNddK0u3rHF5tsKECB7IwKEO8eV4rqgAjb1V7uLLCUfLDEAIq23Hlh3lu4aq+t bL32C15+1TSxc2N9aY8GLhR9Y/mdSOj+H+7si9zqZeuruNjgBABd1PMGajuotXaflk Gm/4gVRPGAWaQ== Date: Wed, 04 Jan 2023 00:16:39 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> I don't even understand what this is supposed to do. >> >> Yet you happily threw it away :-( > > Because there are no such precautions elsewhere in the code, and the > comment above ("In case garbage collection has removed OLD-BUL") does > not explain what its purpose is. A few lines below, old-bul is used > without such a precaution. Of course, if it has a purpose, it's okay to > keep it. > I didn't remember the main reason why I removed that (cdr ptr). The reason is not only that the comment above it is wrong, but also that this (cdr ptr) condition itself is wrong: it makes that loop stop when the last element of the buffer-undo-list is reached. When buffer-undo-list is initially nil, (funcall body) adds a number of entries in buffer-undo-list, and there is no reason to exit that loop without processing its last element. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 21:49:15 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 02:49:15 +0000 Received: from localhost ([127.0.0.1]:47219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCtq7-0004xf-0s for submit@debbugs.gnu.org; Tue, 03 Jan 2023 21:49:15 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCtq2-0004xN-Pb for 60467@debbugs.gnu.org; Tue, 03 Jan 2023 21:49:14 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 464DF806D4; Tue, 3 Jan 2023 21:49:05 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8B3798035A; Tue, 3 Jan 2023 21:49:03 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672800543; bh=y1ZFaxkzeIo0XHnG15QlehJ8PK85lLPfGW2NcpSs0yM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KrgxugRIFHT677qGBQ3y+XRH1PsN7gmKLjHUKYASsbjtnZpxPcZ5Mn4w0PUqWHuTq RpaPkTclpOAS8QO9RJruV3IcFI7VI2b/Mgq8K1xsUiQJvDMWz4G9Q1lM+PnTZhqhBp aONQuuZ1WgnfRH5+sOSf4XmRiutKYlIlzlVF8glc6TC/5SVVORLfanvmjG+AYjdse7 ZiD0ixdj4BronTYlzZckk2jM6e3IBGkHDGtTk5Uhx9GSk5bB29m5/dOjwuykq1PBqd UD4TAy5Znm6bslltudTX9gDNLcW2vHpR2dYLf5nvyrCuXJQO23ufraDsWsPla6d6fB bNKtY5SfYFm6A== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 335121208FD; Tue, 3 Jan 2023 21:49:03 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: (Gregory Heytings's message of "Wed, 04 Jan 2023 00:16:39 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> Date: Tue, 03 Jan 2023 21:49:01 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.323 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>> I don't even understand what this is supposed to do. >>> Yet you happily threw it away :-( >> >> Because there are no such precautions elsewhere in the code, and the >> comment above ("In case garbage collection has removed OLD-BUL") does not >> explain what its purpose is. A few lines below, old-bul is used without >> such a precaution. Of course, if it has a purpose, it's okay to keep it. >> > > I didn't remember the main reason why I removed that (cdr ptr). The reason > is not only that the comment above it is wrong, but also that this (cdr ptr) > condition itself is wrong: it makes that loop stop when the last element of > the buffer-undo-list is reached. When buffer-undo-list is initially nil, > (funcall body) adds a number of entries in buffer-undo-list, and there is no > reason to exit that loop without processing its last element. I think for your loop you'd need to check `ptr` instead of (cdr ptr), indeed. For the loop currently in `subr.el` I think the (cdr ptr) is OK because we use the `setcdr` to truncate the list, so that last cons (whose `cdr` may be nil) will be in the list included in the (apply ....) entry. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 04:24:13 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 09:24:14 +0000 Received: from localhost ([127.0.0.1]:47740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD00L-0003iy-LF for submit@debbugs.gnu.org; Wed, 04 Jan 2023 04:24:13 -0500 Received: from heytings.org ([95.142.160.155]:58214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD00J-0003ip-4s for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 04:24:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672824249; bh=zAHKcmzi6QglEwsdKZJwivACdwk/ztzHNpnOVV1XNKo=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=0MN/HRX+E2KLjn2j4iWq7UjhjVng1xzGkTbMQKzc6SLT98aLE3TseEwH+Kl3GDIMi 1SE1Au4H2ytV51a+/hPd2zSsqAsMOim61gV+K/UFWSHfxXG73VT0Y0Gs0N8pdkhK8+ eVFy18a6dsdReBvBILx7stGxLSGOCCCRcGw3uAEvWzgEPOyWtnOBqHJyM5TAfAnWOy AtBi4pz5PC2Yu8OuUC+XuAjHtivOfpu2WuA9Hj/oJdC5AkvrSgWKPEhDmZc8fbfGKF ZT3r64Xle8j6zSeH2R3+fryA61AoGJLy0E7rX46QcFkKzd+s+bb+YZg3EoqMLfPebz O7sgTnDeiTI7A== Date: Wed, 04 Jan 2023 09:24:09 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > For the loop currently in `subr.el` I think the (cdr ptr) is OK because > we use the `setcdr` to truncate the list, so that last cons (whose `cdr` > may be nil) will be in the list included in the (apply ....) entry. > Indeed, now I see it, and I think (without being 100% sure) that it's OK. It's yet another obscure point of the original code, though. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 05:50:35 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 10:50:35 +0000 Received: from localhost ([127.0.0.1]:47830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD1Lv-0005vV-4n for submit@debbugs.gnu.org; Wed, 04 Jan 2023 05:50:35 -0500 Received: from heytings.org ([95.142.160.155]:58298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD1Ls-0005vK-9J for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 05:50:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672829430; bh=jBZGiNS2t9i0C7n2pZ+Xpci7mxgmgAng1fFZ8FZZrTE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=AHkU2N4ZaIt6AYXELZC7NiHuOg9vnDmvcKJxhafnSs4a8CnmDXUK88Yo8YWb9CNtA BZcsw8cob4kRaWjtwB1jjiJ5YDYzeIvTKxYhZA5yeIyW0AeegFv7Ft9zZGEy9OkZFk X98u499eIgSMI3t8hFrFk6d6AQ4t8OWSi6TN8LyULxVy+uWMEX4la9XR9zS4FrArXL ECqe+XEim7bWy7rCHowBLJRBeHYY1xSJ7VS+wPjXjjuQLZ8rqogtj9R0c6C16gFv6G FOSslbFj3rJqIlUh85c3066ObNu2Rz//wZ3ZqAz7K4+vtO8B7IpbEY2EEy3qB5R4xa Jiq/kHQwZsQoQ== Date: Wed, 04 Jan 2023 10:50:30 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Alan Mackenzie , Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Another data point, about the risk assessment aspect: this function is not used by any package on ELPA, and in core it is only used by Org (with which this bug was identified), newcomment.el (2 uses) and dired (a single use, in which the code is in fact bypassed because buffer-undo-list is let-bound to t in the body). From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 09:35:59 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 14:35:59 +0000 Received: from localhost ([127.0.0.1]:48009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4s2-0005ZJ-Lz for submit@debbugs.gnu.org; Wed, 04 Jan 2023 09:35:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4s1-0005Z0-1D for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 09:35:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD4rt-0000SJ-JJ; Wed, 04 Jan 2023 09:35:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AiYO8Lxg45V4cthxUA/M3ydrXE6pXXPNnf27Mrh9X84=; b=auYz5JKsciG5 +V8R3no5WA52T6ojNbsj9/78Csz40aOEO9g7/oM8XybhVPoNgfSLMH38FEiJdmKwPADAMXvh2W7wV twZPBaqB66En6VmD6yr/jQGktE2Rrlfnmpzzrftt8St+yh0AKG+ACjowpxe6Gtv1UuiWypmR+LWmo yUEFm+j/Hds1aabqL8fxp3fUh+xp8sbSL+qKLSC+5PCP/s5T6kA06YLJTeZOWpHVmcpwQ2OzZer6T dl7nijGQrh40jcvrpHEe0Pz09KthS1N7GLKHe0a//X/wyECZLF7ICxMKQw7wV9+s9ye5CLDvdSMzR +A95/FXb/rHozj6IrujvxA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD4rt-0000pX-3I; Wed, 04 Jan 2023 09:35:49 -0500 Date: Wed, 04 Jan 2023 16:36:01 +0200 Message-Id: <83mt6yz7se.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Wed, 04 Jan 2023 09:24:09 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 04 Jan 2023 09:24:09 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, Alan Mackenzie , > Eli Zaretskii , yantar92@posteo.net > > > For the loop currently in `subr.el` I think the (cdr ptr) is OK because > > we use the `setcdr` to truncate the list, so that last cons (whose `cdr` > > may be nil) will be in the list included in the (apply ....) entry. > > > > Indeed, now I see it, and I think (without being 100% sure) that it's OK. > It's yet another obscure point of the original code, though. I hope all these revelations will find their way into comments to this tricky code. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 09:39:36 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 14:39:36 +0000 Received: from localhost ([127.0.0.1]:48025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4vY-0005fr-B7 for submit@debbugs.gnu.org; Wed, 04 Jan 2023 09:39:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4vX-0005fb-2u for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 09:39:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD4vR-0000uS-9z; Wed, 04 Jan 2023 09:39:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yyfk81iIpDIBZGEkNhVKOh1/yVeLkHrs+V8WOFbpe7I=; b=p6tZpDU02hHS LD0n/FqZDl92FaEzsoLibpqTKv9dgJglk6qLMvTe1K7I6Me+lFLN0YmfEFwq2Kqv7XeEm/BvHTgUR M7UorDCTU+r1SVJ+iRfqRSPGaSDTE22Dt9uaFE+dzCdhkreR1p/ecjXtXUNMbIzgtvd9OF558vxxn MAr/9xsS5w7Cx38pSu2Yx7jRgPTbXJj0lGZBi0ArwWkWSl53uoW999Ta4kPh3HjQHeYGyg2wJbuD5 uJaV63EhexmZWXLutmo+6z6kxznpPyIlZ1oiiazwnCoMAAH1s52lqvihYvl4Fp/QG1sJy2cc6jCdG saoI9J5HvYWIPUCNFDdcDQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD4vQ-0001Cj-NR; Wed, 04 Jan 2023 09:39:29 -0500 Date: Wed, 04 Jan 2023 16:39:40 +0200 Message-Id: <83lemiz7mb.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Wed, 04 Jan 2023 10:50:30 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 04 Jan 2023 10:50:30 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, Alan Mackenzie , > Eli Zaretskii , yantar92@posteo.net > > > Another data point, about the risk assessment aspect: this function is not > used by any package on ELPA, and in core it is only used by Org (with > which this bug was identified), newcomment.el (2 uses) and dired (a single > use, in which the code is in fact bypassed because buffer-undo-list is > let-bound to t in the body). Which version of Org? the one that's on the release branch or a newer one? From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 09:39:44 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 14:39:44 +0000 Received: from localhost ([127.0.0.1]:48028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4vf-0005gD-Mv for submit@debbugs.gnu.org; Wed, 04 Jan 2023 09:39:43 -0500 Received: from heytings.org ([95.142.160.155]:58556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4ve-0005g4-0j for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 09:39:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672843181; bh=9zhAlohGDHiu2cwUzXecN2jdzEo+5TMv/R/rkQuiGNA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Af8OXwxwpNedyF4wnjDrBJKZucUXLC/z7S+79+slQSLe+u2K7NbIbRhFkA1JraoJP /2OJ/K9ER1zOFSxpwQYaha4DDT8PlqHv8rnaWrEuSoIuUimYZeqUQ2/MKKAhJVDFvM nWxeD5fFq1My0ydn4f/8cypjaphTTnGX+6kBTIVhk0p6IpQe4RnyUZnsxnG1om80Xp 5dwxjzwwmpCOpcNGM0euXSkrpBgz/36L2lSd9qfmG2Tlg9E+U5v1OKRkSVIIf65zAM sfPlaeLYOKfQtRhnH2+eP4rZZpiCoyNwqet3kke0oQbXKKf2NdWKSk8vaiPoOmPMSQ Y44S77OYhfYGA== Date: Wed, 04 Jan 2023 14:39:40 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83mt6yz7se.fsf@gnu.org> Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> <83mt6yz7se.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> For the loop currently in `subr.el` I think the (cdr ptr) is OK >>> because we use the `setcdr` to truncate the list, so that last cons >>> (whose `cdr` may be nil) will be in the list included in the (apply >>> ....) entry. >> >> Indeed, now I see it, and I think (without being 100% sure) that it's >> OK. It's yet another obscure point of the original code, though. > > I hope all these revelations will find their way into comments to this > tricky code. > Well, I hope this tricky code will be replaced by the non-tricky code I proposed, in which none of these obscurities exist... ;-) From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 09:43:10 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 14:43:10 +0000 Received: from localhost ([127.0.0.1]:48035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4z0-0005lj-9Z for submit@debbugs.gnu.org; Wed, 04 Jan 2023 09:43:10 -0500 Received: from heytings.org ([95.142.160.155]:58570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD4yy-0005la-Ec for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 09:43:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672843387; bh=9elRqIY6skw5IOys8ukTqXyax/sjS6+08dGnHpUKHBk=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=mUjKAd7tKuMibcyd+rsMbKbwpEVlAgVjpg4iRBsJCVpUgL76PrMOW2lTDZuGyiQT0 jwjJIpxrHsjNUT9JvS7h35kHvdrgaZ86IKLX2gmtn3Ox+XmR+wNY14NKCFsFKEsswu 3hRC4Exw4pPJ9DTNUkIEI+zUGn4GEcmq9X9HIstrNuxqlc45v4mxrqQ6Z/ST3wSfW3 DE6PnS8+12oXJeBR4bWqMPas6fHdKyhDaFRk0hQ8dCNKzefRkNNE7qMaeklIrtVEsR X2cqWJlypzrJwTPZ+ojxo+jViaCSCuzmgBwLje6kcb3jYTWZBVYXwxMq+BBVtxMoBn t5mDtG9hp8i1g== Date: Wed, 04 Jan 2023 14:43:07 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83lemiz7mb.fsf@gnu.org> Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> <83lemiz7mb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Another data point, about the risk assessment aspect: this function is >> not used by any package on ELPA, and in core it is only used by Org >> (with which this bug was identified), newcomment.el (2 uses) and dired >> (a single use, in which the code is in fact bypassed because >> buffer-undo-list is let-bound to t in the body). > > Which version of Org? the one that's on the release branch or a newer > one? > All versions or Org, including the one that's on the release branch. The calls to combine-change-call were added to Org on Oct 16 2021 by 85e0a69567 (in the Org repository). From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 13:02:48 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 18:02:48 +0000 Received: from localhost ([127.0.0.1]:49524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD86C-0003J3-Bp for submit@debbugs.gnu.org; Wed, 04 Jan 2023 13:02:48 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD86A-0003Is-Tu for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 13:02:47 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6879C4400F7; Wed, 4 Jan 2023 13:02:41 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CEE2F441420; Wed, 4 Jan 2023 13:02:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672855359; bh=5VUJMTjtuw9hAI9e+bS056FdBzzIV/ADrWZyp9bs1zs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JUcUVlBK7gXIGzqIT4XeEnNfsPTC7kWp3MmCFiIVXIx2wYLw1qE+/Plmhh7kfb5GZ VZ6h/lXw0XASiu12oDQPftPL2RSwzlXTnAt05pLFVsTi4w8qCHkTeOp9HQs+ZYUYjk ougqS9FV8zvJTr8wPQA5Px9JrtearryoFJqad2LBaRCLKwjSP5wgz0qeM8NVtVA6QB eOU3Cp7Cc4IQHMRshGIbuwaCvOmYqm8tsJveV4a3lS510tZrssUa4LQG4WHTVmD9u3 srF7mQGiJxpMBYfLJWJcAa8SVl9ReW/Qg2Y9tKA53Rw4SXZDXY9kp8E17kmXZ22Zdf gOxrGhcchHZlQ== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 95706120978; Wed, 4 Jan 2023 13:02:39 -0500 (EST) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: (Gregory Heytings's message of "Wed, 04 Jan 2023 14:39:40 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> <83mt6yz7se.fsf@gnu.org> Date: Wed, 04 Jan 2023 13:02:37 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.294 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>>> For the loop currently in `subr.el` I think the (cdr ptr) is OK because >>>> we use the `setcdr` to truncate the list, so that last cons (whose `cdr` >>>> may be nil) will be in the list included in the (apply ....) entry. >>> >>> Indeed, now I see it, and I think (without being 100% sure) that it's >>> OK. It's yet another obscure point of the original code, though. >> >> I hope all these revelations will find their way into comments to this >> tricky code. >> > > Well, I hope this tricky code will be replaced by the non-tricky code > I proposed, in which none of these obscurities exist... ;-) My hope is that we can just remove the timestamp special case, in which case we can keep the current code mostly unchanged. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 13:16:11 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 18:16:11 +0000 Received: from localhost ([127.0.0.1]:49542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD8J9-0003e4-IZ for submit@debbugs.gnu.org; Wed, 04 Jan 2023 13:16:11 -0500 Received: from heytings.org ([95.142.160.155]:58878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD8J7-0003dv-3s for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 13:16:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672856167; bh=MeLF0FLNN0RlFdQvxLuDSXphzkYP83ASxWPobLFzgK0=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=D/y0+gppsxGW5zPIXYl5Zxm/TQdCc8llh5ecn7WmWMwn4guROaUOt+KTVeJHckaik ZJ3eKANuxRBjk15EkRbqq6+WnNNA9H3QrWgWy2HAM8lQGy0Tbm9iAICMJdkTAQ57Vi c1OJj9Ei4lTKoBg6ZX9Nvn0BcX+Px9WSHAzngnbwxiUTjRr0jrGDUYa/l8/eHGQOGA fn5y6BLk1hgVv3FeMccli73rmSJBMt8koYs3KUmGw7OcM3phliOYcS/Lc6cPaJJTzB kJwCQz2tYpOUNJ5r+tbNYGIvMfKUJfS6X3FatKXb9ImG/IiawmsYEgL0bVRungTUmq IHJoxV3932TAw== Date: Wed, 04 Jan 2023 18:16:07 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> <83mt6yz7se.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, Eli Zaretskii , yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Well, I hope this tricky code will be replaced by the non-tricky code I >> proposed, in which none of these obscurities exist... ;-) > > My hope is that we can just remove the timestamp special case, in which > case we can keep the current code mostly unchanged. > Then our hopes are different. What's wrong exactly with replacing a piece of code that requires a long discussion with question marks everywhere to be understood by a piece of well-documented code that is much more readable and "evidently" does what it is supposed to do? From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 13:42:30 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 18:42:30 +0000 Received: from localhost ([127.0.0.1]:49606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD8iZ-0004Mj-3w for submit@debbugs.gnu.org; Wed, 04 Jan 2023 13:42:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pD8iX-0004MV-35 for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 13:42:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD8iQ-0004kj-T0; Wed, 04 Jan 2023 13:42:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0OejVq2GAO4sdqocOvKZj+2bFRE4W3oKBzyV0V/sDvc=; b=WPRfx4C0sZkf IsvX9nsJmEr/yy7oS2MZ+bH6MovT2B2aitElfYMiBHOP/p8qG6BtZCWeVxC7G05m+hyH2w1IB+my5 aqbpmhuu2eOYQeo35Mw1o6aNuJqxbG5578CNigdk8+wqcIansndSHQnilWe23MER7B89B9IUmDe2M vJwDwE22V6sZxyaS1Cr1lrm/+OwdTab4KJS6Bm1HHORo8/01BYauSCz9RLkPqEjtSB2F8Tdopa1JG hzj7CkPGIpVQYRtEUTIKXYqHIuFCV1mDhhjae2C7sNzCR5j79RA44zW+dQwfjymgDePJxkBjcRbCK 3JDEhmrQNAOtx7whUo94lg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pD8iQ-0004Zp-8G; Wed, 04 Jan 2023 13:42:18 -0500 Date: Wed, 04 Jan 2023 20:42:31 +0200 Message-Id: <83r0waxht4.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Wed, 04 Jan 2023 18:16:07 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> <83mt6yz7se.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 04 Jan 2023 18:16:07 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, acm@muc.de, Eli Zaretskii , > yantar92@posteo.net > > > My hope is that we can just remove the timestamp special case, in which > > case we can keep the current code mostly unchanged. > > > > Then our hopes are different. What's wrong exactly with replacing a piece > of code that requires a long discussion with question marks everywhere to > be understood by a piece of well-documented code that is much more > readable and "evidently" does what it is supposed to do? The old code was working for quite a few years, so it isn't all wrong. Minimizing changes also minimizes the risk of introducing new exciting bugs. For a release branch, both these aspects are a clear win. Why do you object so much to leaving the timestamps in the undo-list? From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 16:04:59 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jan 2023 21:04:59 +0000 Received: from localhost ([127.0.0.1]:49755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDAwU-0004Mb-Ot for submit@debbugs.gnu.org; Wed, 04 Jan 2023 16:04:59 -0500 Received: from heytings.org ([95.142.160.155]:59060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDAwS-0004MR-6d for 60467@debbugs.gnu.org; Wed, 04 Jan 2023 16:04:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672866295; bh=juq+QyMacgkA2v6Mr9P9XfbIyI0SeiMMnInLx1cQ+gU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Kh7k942Y/UwR5slXUhQQrL7GOAEIEYNdWSVc3WJGRuZTCzHx6rzRFOPJhUriV7vwx GWZxzl0zoehlnNohQ/x7O5TbhkarjEGzzFI0Krotzi4inRWV9YVd0QlrFBdaiyFnx0 VerbDAtDdH6kDLwWpubRkvIK74AVPGF0n28tpH0fcZzVJPRM940sscwbbXGqmqsPrR t44Y5NSaXkpUSjmS1xhtQj06AlFg4Sb4FkwgmljknHchJJpfqgBYNZUcmXwF8ie2Po ziBmMTX0gW11R686Sps40f+CB0FVBNzdYPOM+5Fve6CIIaqjQWvfJRhKnyNcrn0H+Q B55/287dy33Wg== Date: Wed, 04 Jan 2023 21:04:54 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83r0waxht4.fsf@gnu.org> Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <838rij23by.fsf@gnu.org> <83zgazznau.fsf@gnu.org> <83mt6yz7se.fsf@gnu.org> <83r0waxht4.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qTQ3tw3BW8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --qTQ3tw3BW8 Content-Type: text/plain; format=flowed; charset=us-ascii >>> My hope is that we can just remove the timestamp special case, in >>> which case we can keep the current code mostly unchanged. >> >> Then our hopes are different. What's wrong exactly with replacing a >> piece of code that requires a long discussion with question marks >> everywhere to be understood by a piece of well-documented code that is >> much more readable and "evidently" does what it is supposed to do? > > The old code was working for quite a few years, so it isn't all wrong. > It has only a few callers. In fact, its only callers for a long time have been (1) comment-region-default and uncomment-region-default, which, by chance, do not insert timestamps between the undo elements, and (2) dired-readin in which (as I said upthread) this part of the function is simply not executed because buffer-undo-list is let-bound to t around body. In effect, the first caller that actually exercises its logic in full is Org. > > Why do you object so much to leaving the timestamps in the undo-list? > I do not object to leaving timestamps in the undo-list, I object to leaving the code in the state it is, because I think of the future person who will try to make sense of it in 2028. I'm equally fine with the two attached patches, one in which timestamps are kept an the other in which they aren't. And now I believe it's better if I bow out of this thread, and let you and Stefan decide what the best course of action is. --qTQ3tw3BW8 Content-Type: text/x-diff; name=Fix-combine-change-call-without-timestamps.patch Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=Fix-combine-change-call-without-timestamps.patch RnJvbSAxNTc5N2IyMWY2NjM0NjRiNTU5OTU2MGUyYzYyZGY1NWE4MWI3N2Nm IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBXZWQsIDQgSmFu IDIwMjMgMjA6NTA6NDkgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRml4IGNv bWJpbmUtY2hhbmdlLWNhbGwNCg0KKiBsaXNwL3N1YnIuZWwgKGNvbWJpbmUt Y2hhbmdlLWNhbGxzLTEpOiBSZXdyaXRlIGFuZCBkb2N1bWVudA0KdGhlIHBh cnQgd2hpY2ggY3JlYXRlcyB0aGUgdW5kby1saXN0IGVsZW1lbnQuICBGaXhl cyBidWcjNjA0NjcuDQoqIHRlc3Qvc3JjL3VuZG8td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b2RpZmllZC1wJyBub24tbmls IHdoZW4gYGNvbWJpbmUtY2hhbmdlLWNhbGxzJyBpcw0KK2NhbGxlZC4iDQor ICAoZXJ0LXdpdGgtdGVtcC1maWxlIHRlbXBmaWxlDQorICAgICh3aXRoLWN1 cnJlbnQtYnVmZmVyIChmaW5kLWZpbGUgdGVtcGZpbGUpDQorICAgICAgKGlu c2VydCAiQSIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQorICAgICAgKGlu c2VydCAiQiIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQorICAgICAgKGlu c2VydCAiQyIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQorICAgICAgKGlu c2VydCAiICIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQorICAgICAgKGlu c2VydCAiRCIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQorICAgICAgKGlu c2VydCAiRSIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQorICAgICAgKGlu c2VydCAiRiIpDQorICAgICAgKHNob3VsZCAoPSAobGVuZ3RoIGJ1ZmZlci11 bmRvLWxpc3QpIDE0KSkNCisgICAgICAoZ290by1jaGFyIChwb2ludC1taW4p KQ0KKyAgICAgIChjb21iaW5lLWNoYW5nZS1jYWxscyAocG9pbnQtbWluKSAo cG9pbnQtbWF4KQ0KKyAgICAgICAgKHJlLXNlYXJjaC1mb3J3YXJkICJBQkMg IikNCisgICAgICAgIChyZXBsYWNlLW1hdGNoICJaICIpKQ0KKyAgICAgIChz aG91bGQgKD0gKGxlbmd0aCBidWZmZXItdW5kby1saXN0KSAxNSkpKSkpDQor DQorKGVydC1kZWZ0ZXN0IHVuZG8tdGVzdC1jb21iaW5lLWNoYW5nZS1jYWxs cy0yICgpDQorICAiVGVzdCBob3cgYGNvbWJpbmUtY2hhbmdlLWNhbGxzJyB1 cGRhdGVzIGBidWZmZXItdW5kby1saXN0Jy4NCitDYXNlIDI6IGEgZmlsZS12 aXNpdGluZyBidWZmZXIgd2l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=Fix-combine-change-call-with-timestamps.patch Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: attachment; filename=Fix-combine-change-call-with-timestamps.patch RnJvbSBhMWM0MzU3NDlmMWY0MzQ2Y2ZkMDdmZGI4OTNmNjcyMTIzM2ZlOWI3 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBXZWQsIDQgSmFu IDIwMjMgMjA6NDk6MjIgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gRml4IGNv bWJpbmUtY2hhbmdlLWNhbGwNCg0KKiBsaXNwL3N1YnIuZWwgKGNvbWJpbmUt Y2hhbmdlLWNhbGxzLTEpOiBSZXdyaXRlIGFuZCBkb2N1bWVudA0KdGhlIHBh cnQgd2hpY2ggY3JlYXRlcyB0aGUgdW5kby1saXN0IGVsZW1lbnQuICBGaXhl cyBidWcjNjA0NjcuDQoqIHRlc3Qvc3JjL3VuZG8tdGVzdHMuZWwgKHVuZG8t dGVzdC1jb21iaW5lLWNoYW5nZS1jYWxscy0xKQ0KKHVuZG8tdGVzdC1jb21i aW5lLWNoYW5nZS1jYWxscy0yKQ0KKHVuZG8tdGVzdC1jb21iaW5lLWNoYW5n ZS1jYWxscy0zKTogQWRkIHRocmVlIHRlc3RzIGZvciAndW5kbycNCndpdGgg J2NvbWJpbmUtY2hhbmdlLWNhbGxzJy4NCi0tLQ0KIGxpc3Avc3Vici5lbCAg ICAgICAgICAgfCA2MCArKysrKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0t LS0tLQ0KIHRlc3Qvc3JjL3VuZG8tdGVzdHMuZWwgfCA3MiArKysrKysrKysr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysNCiAyIGZpbGVzIGNo YW5nZWQsIDEwNyBpbnNlcnRpb25zKCspLCAyNSBkZWxldGlvbnMoLSkNCg0K ZGlmZiAtLWdpdCBhL2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iYmIiKSkpKQ0KIA0KKyhlcnQtZGVmdGVzdCB1bmRvLXRlc3Qt Y29tYmluZS1jaGFuZ2UtY2FsbHMtMSAoKQ0KKyAgIlRlc3QgaG93IGBjb21i aW5lLWNoYW5nZS1jYWxscycgdXBkYXRlcyBgYnVmZmVyLXVuZG8tbGlzdCcu DQorQ2FzZSAxOiBhIGZpbGUtdmlzaXRpbmcgYnVmZmVyIHdpdGggYGJ1ZmZl ci11bmRvLWxpc3QnIG5vbi1uaWwNCithbmQgYGJ1ZmZlci1tb2RpZmllZC1w JyBub24tbmlsIHdoZW4gYGNvbWJpbmUtY2hhbmdlLWNhbGxzJyBpcw0KK2Nh bGxlZC4iDQorICAoZXJ0LXdpdGgtdGVtcC1maWxlIHRlbXBmaWxlDQorICAg ICh3aXRoLWN1cnJlbnQtYnVmZmVyIChmaW5kLWZpbGUgdGVtcGZpbGUpDQor ICAgICAgKGluc2VydCAiQSIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQor ICAgICAgKGluc2VydCAiQiIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQor ICAgICAgKGluc2VydCAiQyIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQor ICAgICAgKGluc2VydCAiICIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQor ICAgICAgKGluc2VydCAiRCIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQor ICAgICAgKGluc2VydCAiRSIpDQorICAgICAgKHVuZG8tYm91bmRhcnkpDQor ICAgICAgKGluc2VydCAiRiIpDQorICAgICAgKHNob3VsZCAoPSAobGVuZ3Ro IGJ1ZmZlci11bmRvLWxpc3QpIDE0KSkNCisgICAgICAoZ290by1jaGFyIChw b2ludC1taW4pKQ0KKyAgICAgIChjb21iaW5lLWNoYW5nZS1jYWxscyAocG9p bnQtbWluKSAocG9pbnQtbWF4KQ0KKyAgICAgICAgKHJlLXNlYXJjaC1mb3J3 YXJkICJBQkMgIikNCisgICAgICAgIChyZXBsYWNl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2UtbWF0Y2ggIlogIikpDQorICAg ICAgKHNob3VsZCAoPSAobGVuZ3RoIGJ1ZmZlci11bmRvLWxpc3QpIDEpKSkp KQ0KKw0KIChkZWZ1biB1bmRvLXRlc3QtYWxsICgmb3B0aW9uYWwgaW50ZXJh Y3RpdmUpDQogICAiUnVuIGFsbCB0ZXN0cyBmb3IgXFxbdW5kb10uIg0KICAg KGludGVyYWN0aXZlICJwIikNCi0tIA0KMi4zOS4wDQoNCg== --qTQ3tw3BW8-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 08 10:43:47 2023 Received: (at 60467) by debbugs.gnu.org; 8 Jan 2023 15:43:47 +0000 Received: from localhost ([127.0.0.1]:34424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEXpq-0005Cq-KE for submit@debbugs.gnu.org; Sun, 08 Jan 2023 10:43:46 -0500 Received: from mx3.muc.de ([193.149.48.5]:11381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEXpp-0005CP-2E for 60467@debbugs.gnu.org; Sun, 08 Jan 2023 10:43:45 -0500 Received: (qmail 96649 invoked by uid 3782); 8 Jan 2023 16:43:38 +0100 Received: from acm.muc.de (p4fe154fd.dip0.t-ipconnect.de [79.225.84.253]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 08 Jan 2023 16:43:37 +0100 Received: (qmail 7941 invoked by uid 1000); 8 Jan 2023 15:43:36 -0000 Date: Sun, 8 Jan 2023 15:43:36 +0000 To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Gregory Heytings , Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Stefan. On Tue, Jan 03, 2023 at 10:16:54 -0500, Stefan Monnier wrote: > > nil > > ofter body has been evaluated, the buffer-undo-list after > > combine-change-call is > > (apply ... #'undo--wrap-and-run-primitive-undo ... ()) > > nil > > which is clearly wrong > Indeed. Which begs the question: why does the current code stop when it > sees a timestamp? > Alan? Do you remember why you did that? I'm afraid not. On 2018-04-01, I noted down that timestamps get "caught up inside the undo--wrap-and-run-primitive-undo entry.". But I neglected to be more specific, and can no longer remember exactly why. > What would go wrong if we applied a patch like the one below? I don't know. Possibly nothing. Maybe the problem that that code was meant to solve was also solved by some other code. > Stefan > diff --git a/lisp/subr.el b/lisp/subr.el > index 5fb150994ec..6f51ac90ce5 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -4972,10 +4972,11 @@ combine-change-calls-1 > ;; In case garbage collection has removed OLD-BUL. > (cdr ptr) > ;; Don't include a timestamp entry. > - (not (and (consp (cdr ptr)) > - (consp (cadr ptr)) > - (eq (caadr ptr) t) > - (setq old-bul (cdr ptr))))) > + ;; (not (and (consp (cdr ptr)) > + ;; (consp (cadr ptr)) > + ;; (eq (caadr ptr) t) > + ;; (setq old-bul (cdr ptr)))) > + ) > (setq ptr (cdr ptr))) > (unless (cdr ptr) > (message "combine-change-calls: buffer-undo-list broken")) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 01:03:54 2023 Received: (at 60467) by debbugs.gnu.org; 9 Jan 2023 06:03:54 +0000 Received: from localhost ([127.0.0.1]:35580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pElGD-0001Ls-Tn for submit@debbugs.gnu.org; Mon, 09 Jan 2023 01:03:54 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pElGC-0001LZ-DV for 60467@debbugs.gnu.org; Mon, 09 Jan 2023 01:03:53 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5D6B68058E; Mon, 9 Jan 2023 01:03:46 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 980A7806D4; Mon, 9 Jan 2023 01:03:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673244224; bh=KA9z3QbK4EU6PepwGzPWp2uugnnAG9yr90mtC0QZe2s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Odn2SUG4+hvBTwV5WzF9kT82Xe+HgXWsFVY2fFLgvZ+JQnJOae4nE5XEtSWuiEzPU ohv1xVrp1Xyj93/asppmaVO4QLEfUzoBTLYEb88juLKxTAMAi8O6x3pBu6DhzWQU3B 0gTPdyz5kBF90yypCdPjVMkPSejnz+tTDw+b6g3E/JE+BTLsZZrYuMiPgvh4H7iE3S gYxAw4EH+08TqZJP6Ci0z8Qdlc7/TTpiSuxa3DhJtlWb9wiKVLGReYVaMcKYml53QU 5WZ57jEYbXzrT8+9ANGrPzZUpr5LW2yGvGH0MqzayTdMJhanGaBQZx5tFgUUiM/yTh TTe9cOTVZ3NBQ== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 469E01201C2; Mon, 9 Jan 2023 01:03:44 -0500 (EST) From: Stefan Monnier To: Alan Mackenzie Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: (Alan Mackenzie's message of "Sun, 8 Jan 2023 15:43:36 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> Date: Mon, 09 Jan 2023 01:03:43 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.274 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Gregory Heytings , Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Alan? Do you remember why you did that? > I'm afraid not. On 2018-04-01, I noted down that timestamps get "caught > up inside the undo--wrap-and-run-primitive-undo entry.". But I neglected > to be more specific, and can no longer remember exactly why. > >> What would go wrong if we applied a patch like the one below? > > I don't know. Possibly nothing. Maybe the problem that that code was > meant to solve was also solved by some other code. Thanks. So maybe we should strip timestamps on the release branch (just to be on the safe side) and keep them on `master` (since it's likely that we don't need to filter them out, which gives simpler code and might even be arguably more correct). On `emacs-29` the patch I suggest is: diff --git a/lisp/subr.el b/lisp/subr.el index 62f72734e14..34dd847e9d5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4946,13 +4946,13 @@ combine-change-calls-1 (progn (while (and (not (eq (cdr ptr) old-bul)) ;; In case garbage collection has removed OLD-BUL. - (cdr ptr) - ;; Don't include a timestamp entry. - (not (and (consp (cdr ptr)) - (consp (cadr ptr)) - (eq (caadr ptr) t) - (setq old-bul (cdr ptr))))) - (setq ptr (cdr ptr))) + (cdr ptr)) + (if (and (consp (cdr ptr)) + (consp (cadr ptr)) + (eq (caadr ptr) t)) + ;; Don't include a timestamp entry. + (setcdr ptr (cddr ptr)) + (setq ptr (cdr ptr)))) (unless (cdr ptr) (message "combine-change-calls: buffer-undo-list broken")) (setcdr ptr nil) I think it's the simplest&safest change to the code that fixes this bug. [ Of course, it should be accompanied by Gregory's tests. ] Then on master I suggest: diff --git a/lisp/subr.el b/lisp/subr.el index d1d3c76caf8..9e50b1e7f91 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4966,21 +4966,20 @@ combine-change-calls-1 beg (marker-position end-marker) #'undo--wrap-and-run-primitive-undo - beg (marker-position end-marker) buffer-undo-list)) + beg (marker-position end-marker) + ;; We will truncate this list by side-effect below. + buffer-undo-list)) (ptr buffer-undo-list)) (if (not (eq buffer-undo-list old-bul)) (progn (while (and (not (eq (cdr ptr) old-bul)) ;; In case garbage collection has removed OLD-BUL. - (cdr ptr) - ;; Don't include a timestamp entry. - (not (and (consp (cdr ptr)) - (consp (cadr ptr)) - (eq (caadr ptr) t) - (setq old-bul (cdr ptr))))) + (or (cdr ptr) + (progn + (message "combine-change-calls: buffer-undo-list broken") + nil))) (setq ptr (cdr ptr))) - (unless (cdr ptr) - (message "combine-change-calls: buffer-undo-list broken")) + ;; Truncate the list that's in the `apply' entry. (setcdr ptr nil) (push ap-elt buffer-undo-list) (setcdr buffer-undo-list old-bul))))) We could also use Gregory's code on `master`. Obviously Gregory prefers it, tho it's marginally less efficient since it creates a new list instead of re-using the list elements already present. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 07:15:47 2023 Received: (at 60467) by debbugs.gnu.org; 9 Jan 2023 12:15:47 +0000 Received: from localhost ([127.0.0.1]:35924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEr46-0005KW-KA for submit@debbugs.gnu.org; Mon, 09 Jan 2023 07:15:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEr43-0005KK-8b for 60467@debbugs.gnu.org; Mon, 09 Jan 2023 07:15:44 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEr3w-0008WF-Ix; Mon, 09 Jan 2023 07:15:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AKxIrLcIcFTGL+QHs4z6+/MXk+1cKlf+sgbDbf8gaLY=; b=FYlVUvnAzF6J y0jl+MrNEukZARys0bNw2YOben0LAxa3EE8iXLrax6LUYrzp2HhgdW3oj18MfG1lf3SSwptrsabvZ rCIpdyllnLFnC0xEuxl+WriJkK9aLiUZMJFaAsfGxGxMqIFIZpVx5UkPu2l2m0aQO6WAYo5mIO/4D qAt9S+SPL2n5nK8og7EPVI0aDxEafY7XYtni9HOhiV8YPS1JO6llr9sfxU/Wrr09ZJeTCY52yfNzn 0ir/+sTISCiejrRZ+x/WxW0UODQbsYiIpJYQTXF9fHrnqQ3P987WsEKIhgJpWrYquydb3FSpQlLCf 7M0RjW5A7uHD6iwtgfUTSQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEr3w-0000IZ-6N; Mon, 09 Jan 2023 07:15:36 -0500 Date: Mon, 09 Jan 2023 14:16:02 +0200 Message-Id: <83bkn7q4xp.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, acm@muc.de, gregory@heytings.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 60467@debbugs.gnu.org, Gregory Heytings , > Ihor Radchenko > Date: Mon, 09 Jan 2023 01:03:43 -0500 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Thanks. So maybe we should strip timestamps on the release branch > (just to be on the safe side) and keep them on `master` (since it's > likely that we don't need to filter them out, which gives simpler code > and might even be arguably more correct). > > On `emacs-29` the patch I suggest is: Fine with me, thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 17:45:19 2023 Received: (at 60467-done) by debbugs.gnu.org; 13 Jan 2023 22:45:19 +0000 Received: from localhost ([127.0.0.1]:52658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGSnW-0007D3-Qx for submit@debbugs.gnu.org; Fri, 13 Jan 2023 17:45:19 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGSnU-0007Cj-Ct for 60467-done@debbugs.gnu.org; Fri, 13 Jan 2023 17:45:16 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9096A80640; Fri, 13 Jan 2023 17:45:10 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 77C758043D; Fri, 13 Jan 2023 17:45:08 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673649908; bh=ae+Nr74jiB7fiMfcrHzgrrVkS855+Bmam7PtKvLDF7k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UXPAuURuDrP2h19pkq/29Dz1WTooAIeV+9NI0ZttoP39m+amzeFV8Fc1iAXh8o5TC elPYhNvbdlmexrZXYRj+GuVeb3rVgQU2nXgo8208TUW2JJvxr800LVljQbACCYqAMs tqiqPL3My+3fOEXEdbksBT2mL2Z4XBcAL6syCKkfJRiw03y7hiE4I5CaicEf2fHXSf u7k36K2F8OOfaGKokpSAHU41Vjd6Yz9UwWIuNvguce8Mn/qjZbCUKqkuMoBTPZGT7g Z1GFGqTE21uS0IF1ww9dU41pku4BTDwqGy9VvBSySplTC60N264SYQRNWrRAAMMGnc l0Ob+xgfkatwA== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1F7D1120D21; Fri, 13 Jan 2023 17:45:08 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83bkn7q4xp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 09 Jan 2023 14:16:02 +0200") Message-ID: References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <83bkn7q4xp.fsf@gnu.org> Date: Fri, 13 Jan 2023 17:45:06 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.240 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467-done Cc: 60467-done@debbugs.gnu.org, acm@muc.de, gregory@heytings.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Fine with me, thanks. OK, pushed. I also pushed Gregory's new tests. I think we can close this now. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 14 02:06:20 2023 Received: (at 60467-done) by debbugs.gnu.org; 14 Jan 2023 07:06:20 +0000 Received: from localhost ([127.0.0.1]:53078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGacN-0007Sp-UJ for submit@debbugs.gnu.org; Sat, 14 Jan 2023 02:06:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGacM-0007Sb-3G for 60467-done@debbugs.gnu.org; Sat, 14 Jan 2023 02:06:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGacE-00034e-Ht; Sat, 14 Jan 2023 02:06:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=PtOlPAYeFxLs/v0414cZqFCp9OuV5VSObQqolB6ZHR0=; b=Lkt7ST4YCHdV m56N+y0tGrRh/wxsb9WZe2eb55/A7DKuB+h2FTUla0BnXDyq0i78keBk3TMATIG5FZVefOGA8Aawt doDMZIP181FqRm0iqVYxp/iLKojGkqcrt6XaOc9d4gZTn/k/yFwTMzrDRd58ifdo6bb/KE/vlshK7 xZ5OaBKzTxJjo3HoEPyB3FoKTqBIv8kE8WN42r09wS7T9PEAxaSXL9lLIwntF7PEdOfLX7a/kdc67 44LmtXHzri9xvwQyfF6AGzm9HafdlJ7zllsoBY8CEveMNkMkc3q9ML+ilKE+yJ4Lay66p3x6b1Wnz KCUkRA6aHChVfRa/NmkyMg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGacD-0007X9-Km; Sat, 14 Jan 2023 02:06:10 -0500 Date: Sat, 14 Jan 2023 09:06:12 +0200 Message-Id: <83tu0t8ujf.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Fri, 13 Jan 2023 17:45:06 -0500) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <9bc9c69ac20a37ded741@heytings.org> <9bc9c69ac282c0148962@heytings.org> <87h6x9mgdv.fsf@localhost> <83bkn7q4xp.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467-done Cc: 60467-done@debbugs.gnu.org, acm@muc.de, gregory@heytings.org, yantar92@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: acm@muc.de, 60467-done@debbugs.gnu.org, gregory@heytings.org, > yantar92@posteo.net > Date: Fri, 13 Jan 2023 17:45:06 -0500 > > > Fine with me, thanks. > > OK, pushed. > I also pushed Gregory's new tests. I think we can close this now. Thanks. From unknown Thu Aug 14 22:17:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Feb 2023 12:24:10 +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 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 15:27:40 2023 Received: (at control) by debbugs.gnu.org; 22 Jun 2023 19:27:40 +0000 Received: from localhost ([127.0.0.1]:36786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCPy0-0003M0-6S for submit@debbugs.gnu.org; Thu, 22 Jun 2023 15:27:40 -0400 Received: from smtp-outgoing-1801.laposte.net ([160.92.124.102]:40452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCPxx-0003Ll-N1 for control@debbugs.gnu.org; Thu, 22 Jun 2023 15:27:39 -0400 X-mail-filterd: {"version":"1.7.1","queueID":"4Qn9PB4dJVzjWvq","contextId": "59dbe8df-a1a1-45b3-a8d9-6034821b5921"} Received: from outgoing-mail.laposte.net (localhost.localdomain [127.0.0.1]) by mlpnf0116.laposte.net (SMTP Server) with ESMTP id 4Qn9PB4dJVzjWvq for ; Thu, 22 Jun 2023 21:27:26 +0200 (CEST) X-mail-filterd: {"version":"1.7.1","queueID":"4Qn9PB3cRQzjWvm","contextId": "a7beec37-0403-4293-8d93-6fc2c24b7648"} X-lpn-mailing: LEGIT X-lpn-spamrating: 40 X-lpn-spamlevel: not-spam Received: from [192.168.29.56] (82-64-20-182.subs.proxad.net [82.64.20.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mlpnf0116.laposte.net (SMTP Server) with ESMTPSA id 4Qn9PB3cRQzjWvm for ; Thu, 22 Jun 2023 21:27:26 +0200 (CEST) Message-ID: <3eea0a7dff2915453876fc3a2b628886c78a4d4b.camel@laposte.net> Subject: unarchive 60467 From: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Giquel To: control@debbugs.gnu.org Date: Thu, 22 Jun 2023 21:27:25 +0200 Content-Type: text/plain Content-Transfer-Encoding: 7bit User-Agent: Evolution 3.48.2-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laposte.net; s=lpn-wlmd; t=1687462051; bh=frJDgJKuu4ZxZKAZw7fW1LeoxsQwlWOhHDX5w/59C+4=; h=Message-ID:Subject:From:To:Date:Content-Type:Content-Transfer-Encoding:MIME-Version; b=Y45t4/nsUBamuSrAOGxIuSTEgOhGfUeFICfFKY/ZHAnokH9bJPwL+v/vRih7kb8onlGlY58Q9uZKMxrbC9oq1+dQYOVQwET9s6reofmrrEbXqa/myW7+FankYpfal8LaOfk46Yw8uHx7FkrOr3NQpYRPAGOvRe7+247OQdwhs/dnI83yToVsXZk1ngc26+L2e/IcejnANz/mmtv9n/wZTJMk4k7+B0MGlTgTDvEkKw2IAwnxfz+l9XJOOatbnynxYc0b3W8/F+EpVigtSsUo90n2wauLcs8euVfl6B6SwAoEY+wOGrFjKai7E2hm2eXwYv1y1nlwpwwSfRizYNWo3g==; X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) unarchive 60467 From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 22 15:28:55 2023 Received: (at 60467) by debbugs.gnu.org; 22 Jun 2023 19:28:55 +0000 Received: from localhost ([127.0.0.1]:36793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCPzD-0003P8-Hm for submit@debbugs.gnu.org; Thu, 22 Jun 2023 15:28:55 -0400 Received: from smtp-outgoing-1902.laposte.net ([160.92.124.106]:52227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCPzB-0003Ou-J5 for 60467@debbugs.gnu.org; Thu, 22 Jun 2023 15:28:54 -0400 X-mail-filterd: {"version":"1.7.1","queueID":"4Qn9Qh66bwzjWvm","contextId": "5939c14b-053a-4a89-af1b-90f5ab87de82"} Received: from outgoing-mail.laposte.net (localhost.localdomain [127.0.0.1]) by mlpnf0116.laposte.net (SMTP Server) with ESMTP id 4Qn9Qh66bwzjWvm for <60467@debbugs.gnu.org>; Thu, 22 Jun 2023 21:28:44 +0200 (CEST) X-mail-filterd: {"version":"1.7.1","queueID":"4Qn9Qh5MHSzjWvW","contextId": "ed85b675-c5ab-4a9b-8f89-e2cacc288935"} X-lpn-mailing: LEGIT X-lpn-spamrating: 40 X-lpn-spamlevel: not-spam Received: from [192.168.29.56] (82-64-20-182.subs.proxad.net [82.64.20.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mlpnf0116.laposte.net (SMTP Server) with ESMTPSA id 4Qn9Qh5MHSzjWvW for <60467@debbugs.gnu.org>; Thu, 22 Jun 2023 21:28:44 +0200 (CEST) Message-ID: <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> Subject: New problem introduced From: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Giquel To: 60467@debbugs.gnu.org Date: Thu, 22 Jun 2023 21:28:44 +0200 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.2-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laposte.net; s=lpn-wlmd; t=1687462127; bh=apRc0TnfKyc4XT4gGHbgl3TTy7kQcZOV6i0AzgWnt5U=; h=Message-ID:Subject:From:To:Date:Content-Type:Content-Transfer-Encoding:MIME-Version; b=ebNR2/DrIsiWpr5bFan7ZiLfLQuhs1QAbD9EphXgz9RbR/84eT16vzia0I5eHjkiwg/ysOMbNyZyXfSQYESoBQh0qlDmHbwi9hlzdjWdP1eG1L7yAqszVQ31Hj2Mk6yfPAMDNjQYVAjrY70sjbQartN+x1/qBjYF9AUjlLokysnDOvlDLXwnc3UYS5N7kYqKi7Lli1ySg3a9vKPQc664gMbqzt9igwXPMYqzkfoa5+DsuNOPzim5CWf7AL/Qx88FA0nZx9MEEUaa02+ysvZbb1vbTqD4xF8PDMruAoGrapYE7gdyN9uRBnGAT0lqKRIDt/Id3hqEJp5d4I+CEQoutw==; X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 60467 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.7 (-) Hi all, I'm reopening this bug because the fix has introduced a new problem. This can be highlighted with the following procedure (verified with Emacs 29.0.92) : 1. Open a file: emacs -Q 2. Move point to a line you can comment 3. M-x comment-line 4. M-x undo 5. Check buffer modification status in modeline or use (buffer- modified-p) Without the patched version of combine-change-calls-1, the buffer status is "not modified since last save". Same result if you use another command, for example kill-line, at step 2. With new version of combine-change-calls-1, the buffer is seen as modified. I'm not sure but I imagine it has something to do with the lack of timestamp in buffer-undo-list created by combine-change-calls-1. From unknown Thu Aug 14 22:17:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Fri, 23 Jun 2023 06:06:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 23 07:01:14 2023 Received: (at 60467) by debbugs.gnu.org; 23 Jun 2023 11:01:14 +0000 Received: from localhost ([127.0.0.1]:37766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCeXS-0000HQ-9E for submit@debbugs.gnu.org; Fri, 23 Jun 2023 07:01:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCeXQ-0000HE-LZ for 60467@debbugs.gnu.org; Fri, 23 Jun 2023 07:01:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCeXK-0002mS-3B; Fri, 23 Jun 2023 07:01:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=XKso+qGt7ONhbjMlcOcGdEgZ4HaGyP3w3Wmv0phC5bk=; b=jY8AEWYiH038z+V2rNQV 4dz5eg+WQ/HF4yAPUrcgXjW/n+7eHXLhHhYDXGLsCYYaT+pMLGULIgu791xd7wLl7srWBRLR0iJs9 k8jz9S5iILGoycCna8V+J/zuu2MbxVgLR8hEyK/A84RXS+H7sUJ3LXjWJyzFghG1kWXkA115JeisK 55aKk9rOtkN/r7YXgDWpd7m7FRwZ0bAlfPzEXMFQoW9yXIEZpkv1JmRwTplHf284UkLLZEXbmKWIB V+JgIw8UCN17Y8e2iPsyCJXZ0sFekeFX8KV+Hr7SZX8kboePxsJFwPAP5Ke6opS9AWKA0f2c8Y8b6 mBOwoFKVG7SMYA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCeXI-0000w6-PB; Fri, 23 Jun 2023 07:01:05 -0400 Date: Fri, 23 Jun 2023 14:01:17 +0300 Message-Id: <83o7l61lz6.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?RnLDqWTDqXJpYw==?= Giquel , Stefan Monnier , Alan Mackenzie In-Reply-To: <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> (bug-gnu-emacs@gnu.org) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, Gregory Heytings , Ihor Radchenko X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [Please don't change the Subject when you reopen a bug.] > Date: Thu, 22 Jun 2023 21:28:44 +0200 > From: Frédéric Giquel via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Hi all, > > I'm reopening this bug because the fix has introduced a new problem. > > This can be highlighted with the following procedure (verified with > Emacs 29.0.92) : > 1. Open a file: emacs -Q > 2. Move point to a line you can comment > 3. M-x comment-line > 4. M-x undo > 5. Check buffer modification status in modeline or use (buffer- > modified-p) > > Without the patched version of combine-change-calls-1, the buffer > status is "not modified since last save". Same result if you use > another command, for example kill-line, at step 2. > With new version of combine-change-calls-1, the buffer is seen as > modified. > > I'm not sure but I imagine it has something to do with the lack of > timestamp in buffer-undo-list created by combine-change-calls-1. Stefan, can you please look into this? From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 23 09:06:10 2023 Received: (at 60467) by debbugs.gnu.org; 23 Jun 2023 13:06:10 +0000 Received: from localhost ([127.0.0.1]:37858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCgUM-00064o-Kd for submit@debbugs.gnu.org; Fri, 23 Jun 2023 09:06:10 -0400 Received: from heytings.org ([95.142.160.155]:55144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qCgUJ-00064e-Lk for 60467@debbugs.gnu.org; Fri, 23 Jun 2023 09:06:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1687525566; bh=xXuibynr6GoMhxwVle3FydnjBM1Buih+kezW1pt+XLQ=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=4b85Y1kr+ybb+BezFtwaStJZsHLErNQs3dOAnTqrsJTJtvcRQGAF7zFUl+V5f72+m QGc84o+AV+iW+qR+K4sFXQNXV49sek5kSF2DkiZwZ2xVyCabbjec8IsxjNq75pdN8h YTWvef/Ko/jv4Kc8dEv917+2/F4OhbkcBYd1CZnBN9nG2PqYylUW7PO3IK0ZMf3oC3 wt5VYbJ9O0dgddaNeVSn3c+khrjYR+CZvKYcjpcSxUNrkudslCu+kswqHdPj38iysG sKw8+YFFp6hyPY5IQh60/n2d5eA9OvkWXM1epvXIAF//WDeP6UTke4JBH11sSTPTeg nnLMAwUtyRVbA== Date: Fri, 23 Jun 2023 13:06:06 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83o7l61lz6.fsf@gnu.org> Message-ID: <2aa76ba11fd0a77ba107@heytings.org> References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Giquel?= , Ihor Radchenko , Stefan Monnier , Alan Mackenzie X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Stefan, can you please look into this? > FYI, that issue is fixed with the Fix-combine-change-call-with-timestamps patch. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 26 10:51:49 2023 Received: (at 60467) by debbugs.gnu.org; 26 Jun 2023 14:51:49 +0000 Received: from localhost ([127.0.0.1]:46813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDnZF-0002Rn-Jy for submit@debbugs.gnu.org; Mon, 26 Jun 2023 10:51:49 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:6313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDnZD-0002Rb-Vw for 60467@debbugs.gnu.org; Mon, 26 Jun 2023 10:51:48 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B1FA410011A; Mon, 26 Jun 2023 10:51:42 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BB940100086; Mon, 26 Jun 2023 10:51:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1687791101; bh=m+UxqamskwpzR8o3mM9kC+BCwSP3JXehs8zcL9TnjRU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=P86c8Yt/s3rR77/SAx5bWdv1jPdSC7r6sh6SBqGQqij6Pu3wWnYuJk7zqyakd2Bxf ziX6vMMy9oUyg4DvfrUdO5whhD9SAxgObHh64CgntXQX03feSR8O+hbq260hoPCf9o +s1gio2LDLrrl121AQ/0K7FjzOJmADN6WN2xJ82ZAoV7zCOzW22UTon01C4FA3TMc1 RyO21Q0H923TWsMhXZl5rr9fvO4HZKuycxSJrctXH4KLu0ya4rIsnqABUpsGFDK14Q vo8VGKxpvuDtipi9aI3e9mPSl4O+qeZ4/ppJrJcmqPuVh/mossFGyfMgTIcTNAqxc3 1Oamr7vGQwTew== Received: from pastel (69-165-155-162.dsl.teksavvy.com [69.165.155.162]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 751C212086B; Mon, 26 Jun 2023 10:51:41 -0400 (EDT) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <2aa76ba11fd0a77ba107@heytings.org> (Gregory Heytings's message of "Fri, 23 Jun 2023 13:06:06 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> Date: Mon, 26 Jun 2023 10:51:40 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.324 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, =?windows-1252?B?RnLpZOlyaWM=?= Giquel , Eli Zaretskii , Ihor Radchenko , Alan Mackenzie X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Stefan, can you please look into this? > FYI, that issue is fixed with the > Fix-combine-change-call-with-timestamps patch. Be my guest, Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 26 10:53:50 2023 Received: (at 60467) by debbugs.gnu.org; 26 Jun 2023 14:53:50 +0000 Received: from localhost ([127.0.0.1]:46820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDnbC-0002Uv-3J for submit@debbugs.gnu.org; Mon, 26 Jun 2023 10:53:50 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDnbB-0002Uf-1Z for 60467@debbugs.gnu.org; Mon, 26 Jun 2023 10:53:49 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B90B3442231; Mon, 26 Jun 2023 10:53:43 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8142A441666; Mon, 26 Jun 2023 10:53:42 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1687791222; bh=R5skvee7eyfnU26Ca4jKWZp3Sidif9Asge2D8hkvqpM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kPO8kzRMhyrRmZKxL+T5hPZYmfD/UF5oWUgpFeW9QkIR/TuU9ri9s5es95LTfSQFZ Cqxl32E9fek8HfDWSJPCjo1ODL2deAHC7qNz1ujOlbjRYhxemx61Q0Cm7h9y23YlBN hHCG1wz1OVMM/peii23TfcXuBt/TwYTcbUntE5MxkG/WodFjGAiDa4iV+IAy4OZDzu g3lifp66wHp3bd/O1xSIQdVbpip1pStE36oXEJzOvC8WY69CODMP0J3HAw9apH7lxR OL+x9i+P1oDHeigON/d9H2QJjw6yEu7spd0ZVI7sH9Z5oAPVhJNK1KskGdKywSJ9is 3sEwl5pFjKggQ== Received: from pastel (69-165-155-162.dsl.teksavvy.com [69.165.155.162]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 36A62120153; Mon, 26 Jun 2023 10:53:42 -0400 (EDT) From: Stefan Monnier To: Gregory Heytings Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <2aa76ba11fd0a77ba107@heytings.org> (Gregory Heytings's message of "Fri, 23 Jun 2023 13:06:06 +0000") Message-ID: References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> Date: Mon, 26 Jun 2023 10:53:41 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.114 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, =?windows-1252?B?RnLpZOlyaWM=?= Giquel , Eli Zaretskii , Ihor Radchenko , Alan Mackenzie X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Stefan, can you please look into this? > FYI, that issue is fixed with the > Fix-combine-change-call-with-timestamps patch. Oh, but I don't think this is OK for the `emacs-29` branch, so we still need a more targetted fix for the `emacs-29` branch. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 26 11:18:48 2023 Received: (at 60467) by debbugs.gnu.org; 26 Jun 2023 15:18:48 +0000 Received: from localhost ([127.0.0.1]:46861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDnzL-00037e-Sc for submit@debbugs.gnu.org; Mon, 26 Jun 2023 11:18:48 -0400 Received: from heytings.org ([95.142.160.155]:59144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDnzK-00037V-Bt for 60467@debbugs.gnu.org; Mon, 26 Jun 2023 11:18:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1687792725; bh=NX95Wh3ncaacM976DCysgeZhk+KUWap1aFxxY8VtMbI=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=TRZKyhnPKDBavvo/F0QMbVB4D9XusjaMmoMAm1eI/vdzgfYQcaODHyN1dFerpTB3L /Xxj4GINqVq3lolx7X4qxk2sHwOn6MSITxyBCpPA/a6qLvH3UzbpJInitfpWuErC1h km4UQyVR1g55cfwgLH6ZkVqOg0XDIQEpLXlGKXtPvFVs8I6JYrUz3Te3vR3r+9LbHF sOS1PB1V2oX1h1ddH9zucN3/L/CfPWC9sQeqWiEZGT6kNCHQjqb4pK/pDcStN2tmy+ 18J698V8YyhCWBMfi3rph//O+XQmG4VK2gUNDtbGyvhkX9LIDSRaOKz9bIprpyTOjZ 1BPjUhAuLqnrQ== Date: Mon, 26 Jun 2023 15:18:45 +0000 From: Gregory Heytings To: Stefan Monnier Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: Message-ID: <30832e86470f7dc33387@heytings.org> References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Giquel?= , Eli Zaretskii , Ihor Radchenko , Alan Mackenzie X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>> Stefan, can you please look into this? >> >> FYI, that issue is fixed with the >> Fix-combine-change-call-with-timestamps patch. > > Oh, but I don't think this is OK for the `emacs-29` branch, so we still > need a more targetted fix for the `emacs-29` branch. > Well, that bug was already discussed at length six months ago, and the minimal change that was in the end installed (59c3c53efa) introduced a new bug. Should we design another minimal change, at the risk of introducing another bug? ISTM that the safe thing to do is the refactoring that was suggested. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 26 11:30:26 2023 Received: (at 60467) by debbugs.gnu.org; 26 Jun 2023 15:30:26 +0000 Received: from localhost ([127.0.0.1]:46881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDoAc-0003RO-90 for submit@debbugs.gnu.org; Mon, 26 Jun 2023 11:30:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDoAZ-0003R5-TY for 60467@debbugs.gnu.org; Mon, 26 Jun 2023 11:30:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDoAQ-0000pY-M9; Mon, 26 Jun 2023 11:30:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=gLlLrLG4KwwtRU2j5AV4jex9yYL2wzojh4Lztn+LX1Q=; b=p7CecVdmURSB7JZOmHsf xN2DeN5PyNefynPHWpHdPvpssT9zllFkQFp+agBEL//jRCtyeoU1ow/cg+cf3VL4CmfmH7t6hepvc prL/mnFDVZPccBKskH+DPpvEIo1TuivXrbr1F+/KfOGSZtH9G8ghWLCwZXnc0cl92+WFWMWkW1KLd xUPWI876gSE47fPV5ldVjb4ONLKN2xagvYWm032Oo4s+Jb0M8jAcT2rfgt6mb5/JyS/HXFemOJ+2C tBuWh9uBPldKGDpjxslT9M78FXnj/rjidhfAGgVgIXf901dWCjI/dWwkPXSwFBPn0qnU20z7lj6s2 VhDUVTmygHpa+A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDoAP-0005DR-S7; Mon, 26 Jun 2023 11:30:14 -0400 Date: Mon, 26 Jun 2023 18:30:33 +0300 Message-Id: <83r0pyw89y.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <30832e86470f7dc33387@heytings.org> (message from Gregory Heytings on Mon, 26 Jun 2023 15:18:45 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Mon, 26 Jun 2023 15:18:45 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, > Frédéric Giquel , > Eli Zaretskii , Ihor Radchenko , > Alan Mackenzie > > >> FYI, that issue is fixed with the > >> Fix-combine-change-call-with-timestamps patch. > > > > Oh, but I don't think this is OK for the `emacs-29` branch, so we still > > need a more targetted fix for the `emacs-29` branch. > > Well, that bug was already discussed at length six months ago, and the > minimal change that was in the end installed (59c3c53efa) introduced a new > bug. Should we design another minimal change, at the risk of introducing > another bug? ISTM that the safe thing to do is the refactoring that was > suggested. If there's no safer way than the refactoring suggested back then, we will have to stay with this regression in Emacs 29.1 and install a better fix only on master. After all, the fact that buffer-modified-p is not undone is a minor inconvenience at best. I'm sorry, but I cannot wait too much time longer before the release. The Emacs 29.1 release cycle already took significantly longer than I ever imagined. So if someone can think about some clever ideas to fix what we have on the release branch by small and safe changes, please speak up soon. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 10:14:16 2023 Received: (at 60467) by debbugs.gnu.org; 1 Jul 2023 14:14:16 +0000 Received: from localhost ([127.0.0.1]:58412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFbMe-0003Rr-5Z for submit@debbugs.gnu.org; Sat, 01 Jul 2023 10:14:16 -0400 Received: from heytings.org ([95.142.160.155]:36896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFbMa-0003Rg-9W for 60467@debbugs.gnu.org; Sat, 01 Jul 2023 10:14:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1688220851; bh=ZamH90jNbhLKMkrxPdhZS+yZ//XU4i1iFN/gN/v4EAU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=J2ajx+FzKGB4vK1KorTHPfi4OuDVo+cXtevog4G2009v+K+L0VHfN9zHBP8zd6/xM jFQYZouiAyouhphdjLDlXtXpyqt8g572GFKBrk7RNH8lKzAAZJvE0i6u4RAO4MLr+9 nDnXFc1cNgLTciCceb+xMFm5di7agN6+NKooMJUsqLQbdaYe+iL1ofalf4qd5yl9dg vjYfxYg5xE/mncFHmnNPrMPXJZkrvo5ZG/VmOfGuQSplvpHZJ4aVCmwKRuG1FWr800 5azdSiT7LfCp9ZmFW3BAYCPK6XyUEZj++bULLbFHcKImArJpipBYrPzfdeZKT7ATx9 dE9aTegYAfDfA== Date: Sat, 01 Jul 2023 14:14:11 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83r0pyw89y.fsf@gnu.org> Message-ID: <215b00d2590a10728db4@heytings.org> References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Well, that bug was already discussed at length six months ago, and the >> minimal change that was in the end installed (59c3c53efa) introduced a >> new bug. Should we design another minimal change, at the risk of >> introducing another bug? ISTM that the safe thing to do is the >> refactoring that was suggested. > > If there's no safer way than the refactoring suggested back then, we > will have to stay with this regression in Emacs 29.1 and install a > better fix only on master. After all, the fact that buffer-modified-p > is not undone is a minor inconvenience at best. > Indeed. A safer way probably exists, but I would not dare writing that patch. I believe Stefan is in a better position to write it. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 01 10:27:32 2023 Received: (at 60467) by debbugs.gnu.org; 1 Jul 2023 14:27:33 +0000 Received: from localhost ([127.0.0.1]:58428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFbZU-0003kv-Ep for submit@debbugs.gnu.org; Sat, 01 Jul 2023 10:27:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFbZR-0003ki-69 for 60467@debbugs.gnu.org; Sat, 01 Jul 2023 10:27:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFbZJ-0000bF-Cz; Sat, 01 Jul 2023 10:27:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=35RhA178fkUhEnRCsqQgG7i4mL7ElzeVFPuXJojEJlo=; b=fZwdRyb32HXo sreisLOv0/pVHZWGMxSvmI8mdmBpWd8IGieHH7V8ZoN91LrMxyNLV6NFNWMkSiO51xWagJw1jGp3+ btLl/yTzxHzCsyiwnKdKVlUBK4mVG649bg/ME+YZ+Y20G1ahkKnlWUPAVMtqe4ESLJh25yovOKqys 7p6MkypdbCuXDSFHNIZg804+8ZXteE9rdUMrofNdVlV7ehr4evoMrGO4Srxl4fVBUZsXHbh/slQJg HLrTNH5EpDnuoNB5qDiULsCraoRX2101OCK73oG6w6nI8AOQFI6Upw52uxLPhMOG/pjyEV9kEgHAW MDUJM28pcni+1SyJ3p4OEA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFbZI-0004AV-TJ; Sat, 01 Jul 2023 10:27:21 -0400 Date: Sat, 01 Jul 2023 17:27:52 +0300 Message-Id: <83sfa7puzb.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <215b00d2590a10728db4@heytings.org> (message from Gregory Heytings on Sat, 01 Jul 2023 14:14:11 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 01 Jul 2023 14:14:11 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > monnier@iro.umontreal.ca, acm@muc.de > > > >> Well, that bug was already discussed at length six months ago, and the > >> minimal change that was in the end installed (59c3c53efa) introduced a > >> new bug. Should we design another minimal change, at the risk of > >> introducing another bug? ISTM that the safe thing to do is the > >> refactoring that was suggested. > > > > If there's no safer way than the refactoring suggested back then, we > > will have to stay with this regression in Emacs 29.1 and install a > > better fix only on master. After all, the fact that buffer-modified-p > > is not undone is a minor inconvenience at best. > > > > Indeed. A safer way probably exists, but I would not dare writing that > patch. I believe Stefan is in a better position to write it. How about installing your patch, which you proposed back then, on master, then? From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 03 20:03:14 2023 Received: (at 60467) by debbugs.gnu.org; 4 Jul 2023 00:03:14 +0000 Received: from localhost ([127.0.0.1]:34667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGTVi-00020c-IX for submit@debbugs.gnu.org; Mon, 03 Jul 2023 20:03:14 -0400 Received: from s.wrqvtzvf.outbound-mail.sendgrid.net ([149.72.126.143]:61826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGTVf-00020M-TH for 60467@debbugs.gnu.org; Mon, 03 Jul 2023 20:03:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=Y1iPa+RFwyfVWgeXTKihAbyGaIUleKfNQ3KT56tghSM=; b=Zwul9pi++jjBsNxWZ67Gc+FPhgXg/BxGd1lexYabrlli5lmykF9sxTaJgUgLTCytuW0j aTmvaadpXPWWHlbXb6s5RW0QA57D+tQcw1/y4x4UfZfuRBotpW3XBNNi9OlqBfoBgCWCPt lTOaaU7Izcfb44VHQJaPKeqq6HTc2TMqzM1X0qHGb1/ltZntptM2zy4j8vgZW8QgzanDeU hmNl0XUj1Ri6Q1hMQS5xFEwRMahLIvp2O8Ies3sfzdSnksj2uDJR3kUuPbfBIk3JTkB+/0 MJccplgtyjdnLjtNlwev6VpPG7VpaB0osiD6I5z6x/AO7sb2XPn74OpsZ8i8bz5g== Received: by filterdrecv-8684c58db7-nkctk with SMTP id filterdrecv-8684c58db7-nkctk-1-64A361B9-6E 2023-07-04 00:03:05.757637325 +0000 UTC m=+4667077.930869525 Received: from earth.catern.com (unknown) by geopod-ismtpd-5 (SG) with ESMTP id ni54xzRZQZyBv1pJNL_uRA Tue, 04 Jul 2023 00:03:05.485 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=debbugs.gnu.org Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 152316250F; Mon, 3 Jul 2023 20:03:04 -0400 (EDT) From: sbaugh@catern.com Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <3eea0a7dff2915453876fc3a2b628886c78a4d4b.camel@laposte.net> (=?utf-8?B?IkZyw6lkw6lyaWM=?= Giquel"'s message of "Thu, 22 Jun 2023 21:27:25 +0200") References: <3eea0a7dff2915453876fc3a2b628886c78a4d4b.camel@laposte.net> Date: Tue, 04 Jul 2023 00:03:05 +0000 (UTC) Message-ID: <87zg4cpmpz.fsf@catern.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?ZgbRq7gjGrt0q=2FPjvxk7wM0yQFRdOkTJAtEbkjCkHbKJjCz6=2F0we8jsyJIY1M7?= =?us-ascii?Q?=2F8f+5C5TU2WoK5QibMizDDw5A405VBJT=2FQv=2F0SG?= =?us-ascii?Q?rV=2FynnhsW44edP6p+yyNlAw9kVU4775MdbhiB=2FN?= =?us-ascii?Q?r0Grqy+GVp6cuKslZCOUTq2+RTuaAMVecu=2FdQ48?= =?us-ascii?Q?XnR2TBxVlf7SUs94zuhQtq+1mNDxmj8mXQA=3D=3D?= To: 60467@debbugs.gnu.org X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: frederic.giquel@laposte.net, Gregory Heytings , acm@muc.de, yantar92@posteo.net, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Incidentally, this bug has an easy reproduction in emacs -Q on Emacs 29 and before: (with-temp-buffer (insert "foo") (setq-local buffer-undo-list nil comment-start ";") (comment-line 1)) which produces the "combine-change-calls: buffer-undo-list broken" warning. This is easy to trigger in practice: simply open a file already containing text, and comment a line as your first action. Anyway, this was also fixed by Stefan's change 977630b5285809a57e50, * lisp/subr.el (combine-change-calls-1): Fix bug#60467 (I send this email just because I spent some time tracking this down only to find it was already fixed. Maybe my smallish reproducer will somehow be helpful to someone...) From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 15 03:46:29 2023 Received: (at 60467) by debbugs.gnu.org; 15 Jul 2023 07:46:29 +0000 Received: from localhost ([127.0.0.1]:43987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKZz2-0001P5-Re for submit@debbugs.gnu.org; Sat, 15 Jul 2023 03:46:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKZz0-0001Or-Pv for 60467@debbugs.gnu.org; Sat, 15 Jul 2023 03:46:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKZyl-0006XT-52; Sat, 15 Jul 2023 03:46:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9ybx8MNh60+ooNC6FrXfOSAXaV7RwwFzJ3gcqLLPw6E=; b=qdjWsYjeVniW jCpzldV+URp+iBCIENxjXEzQ9GAfEpgixExfaZ4+fE5yMVmPk2t2L1mb1KYWzEohUb5z03aQ+gd7U l4U0NuQez4dDLZd2wauBYvlPcGgsbjCTJX91/Z/eW261mLH8OiI2mcTZzk8q0XlhcvGi8Rj36QZoQ L2mXagKhgG3dwhC7KYcBBfto9biP20A80EoUJwxbH82xc7/M7dKAQB8SWIPprtqEW51wgG7+TIon6 20ktUuXafwToFe4KN21pj0T/g2mvmz6lf5MwA1ImOTVgmZ95V03OXQwaUNmHQ1NuL6KgYSXLtog8O k5np+ExxL6XdOl+6uweYkg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKZyj-00026T-QW; Sat, 15 Jul 2023 03:46:10 -0400 Date: Sat, 15 Jul 2023 10:46:30 +0300 Message-Id: <83351pehwp.fsf@gnu.org> From: Eli Zaretskii To: gregory@heytings.org In-Reply-To: <83sfa7puzb.fsf@gnu.org> (message from Eli Zaretskii on Sat, 01 Jul 2023 17:27:52 +0300) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! > Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > monnier@iro.umontreal.ca, acm@muc.de > Date: Sat, 01 Jul 2023 17:27:52 +0300 > From: Eli Zaretskii > > > Date: Sat, 01 Jul 2023 14:14:11 +0000 > > From: Gregory Heytings > > cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > > monnier@iro.umontreal.ca, acm@muc.de > > > > > > >> Well, that bug was already discussed at length six months ago, and the > > >> minimal change that was in the end installed (59c3c53efa) introduced a > > >> new bug. Should we design another minimal change, at the risk of > > >> introducing another bug? ISTM that the safe thing to do is the > > >> refactoring that was suggested. > > > > > > If there's no safer way than the refactoring suggested back then, we > > > will have to stay with this regression in Emacs 29.1 and install a > > > better fix only on master. After all, the fact that buffer-modified-p > > > is not undone is a minor inconvenience at best. > > > > > > > Indeed. A safer way probably exists, but I would not dare writing that > > patch. I believe Stefan is in a better position to write it. > > How about installing your patch, which you proposed back then, on > master, then? > > > > From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 03 03:38:21 2023 Received: (at 60467) by debbugs.gnu.org; 3 Aug 2023 07:38:21 +0000 Received: from localhost ([127.0.0.1]:50626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRSua-0003sy-Rk for submit@debbugs.gnu.org; Thu, 03 Aug 2023 03:38:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRSuZ-0003sm-6u for 60467@debbugs.gnu.org; Thu, 03 Aug 2023 03:38:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRSuR-00020Z-GM; Thu, 03 Aug 2023 03:38:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qvBVzDOTlzF3GYwcngWColsvDhvKYHX/yfL224HQK4M=; b=flTxwXtygwTG X74ueI1ffnfZomHkpLn5Zg/Vif3wjfi17sKUG9t8qz9MAQPP3C0NG1NcPLiV5W7CAsEbqc69O9CCF B0pp+Xwk+2PjYiotozEmqEYmVzP5Du1spQ0HedEaahyDAJMbFVmUggbBfCJoYFqYIGK9NjrKW5XFI S6HlX4Cy7dWfLvu3mwLG07eEGqNSdk46hkaCaR822dqt6XZAkc23o/Ux/MOpuw2lF99IxVg9mqded KDNJO8SEyuJJ+g1wmgzlC13BT4m2QkEAmlOUJd4vibeldPQfyGqKjBW1mx8DhAc6WuqHGHLgQ5VUe OpC/A8tpBX4EBgKXNswVXA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRSuQ-0000rL-W2; Thu, 03 Aug 2023 03:38:11 -0400 Date: Thu, 03 Aug 2023 10:38:18 +0300 Message-Id: <833510zic5.fsf@gnu.org> From: Eli Zaretskii To: gregory@heytings.org In-Reply-To: <83351pehwp.fsf@gnu.org> (message from Eli Zaretskii on Sat, 15 Jul 2023 10:46:30 +0300) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> <83351pehwp.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Ping! Can we please finish handling of this issue? > Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > monnier@iro.umontreal.ca, acm@muc.de > Date: Sat, 15 Jul 2023 10:46:30 +0300 > From: Eli Zaretskii > > Ping! > > > Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > > monnier@iro.umontreal.ca, acm@muc.de > > Date: Sat, 01 Jul 2023 17:27:52 +0300 > > From: Eli Zaretskii > > > > > Date: Sat, 01 Jul 2023 14:14:11 +0000 > > > From: Gregory Heytings > > > cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > > > monnier@iro.umontreal.ca, acm@muc.de > > > > > > > > > >> Well, that bug was already discussed at length six months ago, and the > > > >> minimal change that was in the end installed (59c3c53efa) introduced a > > > >> new bug. Should we design another minimal change, at the risk of > > > >> introducing another bug? ISTM that the safe thing to do is the > > > >> refactoring that was suggested. > > > > > > > > If there's no safer way than the refactoring suggested back then, we > > > > will have to stay with this regression in Emacs 29.1 and install a > > > > better fix only on master. After all, the fact that buffer-modified-p > > > > is not undone is a minor inconvenience at best. > > > > > > > > > > Indeed. A safer way probably exists, but I would not dare writing that > > > patch. I believe Stefan is in a better position to write it. > > > > How about installing your patch, which you proposed back then, on > > master, then? > > > > > > > > > > > > From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 10 07:28:37 2023 Received: (at 60467) by debbugs.gnu.org; 10 Aug 2023 11:28:37 +0000 Received: from localhost ([127.0.0.1]:41532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU3qG-000439-SH for submit@debbugs.gnu.org; Thu, 10 Aug 2023 07:28:37 -0400 Received: from heytings.org ([95.142.160.155]:60690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU3qF-000430-2q for 60467@debbugs.gnu.org; Thu, 10 Aug 2023 07:28:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1691666914; bh=1+gIZuEPphidV4W8IBTvHnn38IKZrcYrE2JPf6YOK7Y=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=kE3PRxXd7AiL6BgcXIimPt9DwD3LLyf7vQscUHU8gCMsZ4w7h8bXtyCzfU/OlOejn ISqn1O55mYN2lo54wmAIOxSIa4NUemPy8nCpG3egqqZnZgGY0kZa5myooW8nM7MQJK tQEGoPk9oUhSoTB1wtZFMvrXiFHJ1vOHNAQFg7MYGcAK2I2b2BiWWEkgdW30W8X6np UOEBeapSICIXHq+g+2mvajAr+BcNa2AJgpQv+y+6t5QfA64YbhFvsrPbWtkZz0p/H7 zhX0eSY5fhfxurqu076nJ1MhYx7eO8kyxOGWZTWejM4Gnqh+1r9fnH3GBVbHPKL5tx fN3Lgx/ov2PZQ== Date: Thu, 10 Aug 2023 11:28:33 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <833510zic5.fsf@gnu.org> Message-ID: <3283828c971107fba129@heytings.org> References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> <83351pehwp.fsf@gnu.org> <833510zic5.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8xev9aj6rl" Content-ID: <3283828c97615f574314@heytings.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --8xev9aj6rl Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-ID: <3283828c977fee323675@heytings.org> > > Can we please finish handling of this issue? > It's not clear to me what you want: do you want to fix this issue on the=20 emacs-29 branch or on the master branch? We now have two bug reports on=20 this (the one by Fr=C3=A9d=C3=A9ric Giquel in this bug, and the one by Easo= n Huang=20 in bug#64989). I just verified (again) that the=20 Fix-combine-change-call-with-timestamps patch fixes these two recipes. --8xev9aj6rl-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 10 09:41:20 2023 Received: (at 60467) by debbugs.gnu.org; 10 Aug 2023 13:41:20 +0000 Received: from localhost ([127.0.0.1]:41736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU5ui-0001pk-CL for submit@debbugs.gnu.org; Thu, 10 Aug 2023 09:41:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU5uf-0001pV-CM for 60467@debbugs.gnu.org; Thu, 10 Aug 2023 09:41:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU5uX-0004gm-Jh; Thu, 10 Aug 2023 09:41:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=p3Vd/CE/It2FZsAcna5AzuiCM5o2yeAISrUm3tnPSmw=; b=FKmLeG3XUGQbOY9dwSky 4zgjU4tH7thYJzLdQDzffuhr2lh3TXfDnbOodFZM3vY4sm0dplrQpbqylKUdows1yXP+VMkqwPp1T HCXh64ZfrLKXR6uhVwRaj56ZKGe6eE5gFp2bsZPawZiBWs3bAnW7c2CR+CSJ5irFDSitqFODJtQk2 jE9XmkJRE+J66XJQNxQYRAltACAcaxhXoQv0R70YRXDehLICfaVDzDJ5r4L7MIFltlu/iv24ZnqsV sWNg4LQLW04ED+uDO3fSVJe87/Bn6O78KkwgdDNwMsoY1C7hzSUw9GmEvn8aTTPhllX47JDaSuguy /pApt6a0O+yPkA==; Date: Thu, 10 Aug 2023 16:41:34 +0300 Message-Id: <83jzu3hv5d.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <3283828c971107fba129@heytings.org> (message from Gregory Heytings on Thu, 10 Aug 2023 11:28:33 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> <83351pehwp.fsf@gnu.org> <833510zic5.fsf@gnu.org> <3283828c971107fba129@heytings.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 10 Aug 2023 11:28:33 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > monnier@iro.umontreal.ca, acm@muc.de > > > Can we please finish handling of this issue? > > It's not clear to me what you want: do you want to fix this issue on the > emacs-29 branch or on the master branch? I suggested to install your fix on master. > We now have two bug reports on this (the one by Frédéric Giquel in > this bug, and the one by Eason Huang in bug#64989). I just verified > (again) that the Fix-combine-change-call-with-timestamps patch fixes > these two recipes. If bug#64989 could be fixed by a simpler, safer change (which remains to be seen), we might do that on emacs-29. If not, at least we will have this fixed in Emacs 30. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 10 09:56:04 2023 Received: (at 60467) by debbugs.gnu.org; 10 Aug 2023 13:56:04 +0000 Received: from localhost ([127.0.0.1]:43752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU68x-0005TF-OD for submit@debbugs.gnu.org; Thu, 10 Aug 2023 09:56:04 -0400 Received: from heytings.org ([95.142.160.155]:60870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU68s-0005Ol-4j for 60467@debbugs.gnu.org; Thu, 10 Aug 2023 09:56:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1691675757; bh=BH7DsnVS2nTwuw6zQmhg3E6iQCmHrMji9Kgw7gPBnzE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=EAPuEBttEAwWiUB3l62Ev8yqhkxhNaAZ1YPCXRlxDBzxQyRTpx0xn8XlYmVK/03Yw XPahdLqPjOGUbg8c7IkDO/ndgEuWD0gs2JXMB5NJShVWEdqKjQMyczofk6o8eM1nqu pjiiXOA8CJgqoy7lRoL+E6337RAsc2iRdwqW0TMqcYICm3ijx1s/EjMdv6SZ+KhXY5 LXRVUh7iQckm9cR4TwqCUZja2NGQRDHo5rjKvLEWr3Q8BDxhPALgfdFXfc9yvXvnp2 1ux+exKIT48fGIEHZFSSmG7hQ5JNKxhRHnZKSwmq6lePbo5HpWXph7x0bQOM2aLblR /lvtm+N5R2g/Q== Date: Thu, 10 Aug 2023 13:55:56 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83jzu3hv5d.fsf@gnu.org> Message-ID: <3283828c97405b694421@heytings.org> References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> <83351pehwp.fsf@gnu.org> <833510zic5.fsf@gnu.org> <3283828c971107fba129@heytings.org> <83jzu3hv5d.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="WpSojQ5nM3" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --WpSojQ5nM3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable >> It's not clear to me what you want: do you want to fix this issue on=20 >> the emacs-29 branch or on the master branch? > > I suggested to install your fix on master. > Okay, but see below. >> We now have two bug reports on this (the one by Fr=C3=A9d=C3=A9ric Gique= l in this=20 >> bug, and the one by Eason Huang in bug#64989). I just verified (again)= =20 >> that the Fix-combine-change-call-with-timestamps patch fixes these two= =20 >> recipes. > > If bug#64989 could be fixed by a simpler, safer change (which remains to= =20 > be seen), we might do that on emacs-29. If not, at least we will have=20 > this fixed in Emacs 30. > Bug#64989 is the same bug, only the recipe differs. And the change I=20 suggested six months ago is safe, it replaces an obscure and bugged piece= =20 of code with a refactored and clear piece of code. I attach it again=20 (that patch is for emacs-29, the one for master would be similar). If Stefan (or anyone else) fixes the bug in a safer way, that patch is not= =20 necessary. --WpSojQ5nM3 Content-Type: text/x-diff; name=Fix-combine-change-call.patch Content-Transfer-Encoding: base64 Content-ID: <3283828c9775c5136147@heytings.org> Content-Disposition: attachment; filename=Fix-combine-change-call.patch RnJvbSAxNjliMjA2NGE0YzUyMDBmYmZkZmQ3YzZmNDNjYjE4ZTRmODU0Yjky IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUaHUsIDEwIEF1 ZyAyMDIzIDEzOjQ5OjE1ICswMDAwDQpTdWJqZWN0OiBbUEFUQ0hdIEZpeCBj b21iaW5lLWNoYW5nZS1jYWxsDQoNCiogbGlzcC9zdWJyLmVsI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jINCg0K --WpSojQ5nM3-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 12 03:08:50 2023 Received: (at 60467) by debbugs.gnu.org; 12 Aug 2023 07:08:50 +0000 Received: from localhost ([127.0.0.1]:48620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUijx-0004L3-S3 for submit@debbugs.gnu.org; Sat, 12 Aug 2023 03:08:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUijv-0004Kh-To for 60467@debbugs.gnu.org; Sat, 12 Aug 2023 03:08:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUijp-000151-H5; Sat, 12 Aug 2023 03:08:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bIVgJSo6gCXKAuLH7dAq2TNZbSsFjxY0Xjx6apjWK2M=; b=YlcGIUjCZD8o wIV+Pfc2YugEgoUwUGr2sFMgRZFiYsKJlDoJcvygzTRiCD9uUiFd4V2/QwzUTlZYA1367z02n2G9L zr3Y6g3svPkU9Qm8+Wk6Qxnypo+/Y90PNisfwwE+ZDRXpMlemscQsk/1jKyuZ7iqsB1Ir4lNkNwC2 cRZlX1Rhe8Y8pyaqWf74bz46OKfZO5i2WtlGppvtyHwQfT5s62yW/YLAemkI7JD5N2EWzItr+y+RS aka/m7k73QN//Lvt2490bl3m3aTc9CIR5Nonaw6/LMhWGZ7qB07UW+YSvrYZ6uZtakuaVNUa47Yfm F3wZcTqztG8eL79jokSqxA==; Date: Sat, 12 Aug 2023 10:09:11 +0300 Message-Id: <83wmy0enzc.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <3283828c97405b694421@heytings.org> (message from Gregory Heytings on Thu, 10 Aug 2023 13:55:56 +0000) Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> <83351pehwp.fsf@gnu.org> <833510zic5.fsf@gnu.org> <3283828c971107fba129@heytings.org> <83jzu3hv5d.fsf@gnu.org> <3283828c97405b694421@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60467 Cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Thu, 10 Aug 2023 13:55:56 +0000 > From: Gregory Heytings > cc: 60467@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, > monnier@iro.umontreal.ca, acm@muc.de > > >> It's not clear to me what you want: do you want to fix this issue on > >> the emacs-29 branch or on the master branch? > > > > I suggested to install your fix on master. > > > > Okay, but see below. I see that you haven't yet installed your fix on master; please do. TIA From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 12:09:30 2023 Received: (at 60467-done) by debbugs.gnu.org; 16 Aug 2023 16:09:30 +0000 Received: from localhost ([127.0.0.1]:41887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWJ5O-0003kc-Ag for submit@debbugs.gnu.org; Wed, 16 Aug 2023 12:09:30 -0400 Received: from heytings.org ([95.142.160.155]:40872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWJ5M-0003kS-Ql for 60467-done@debbugs.gnu.org; Wed, 16 Aug 2023 12:09:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1692202166; bh=YjJuPhLauy1n4/gkjMIXs9BW2QY3oYbSLQX/4QFvfNs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=JU+dN0pe6whIHiqvP+MMH69Gpxr2Xowywjzy7zTWaplkuBcaEdPJi87H6T3yWeRJB AzaSwzp0cAVDWzXFTAkTJ/OQjEyx3noMcJI0pwFF0vjTr6ghJEa6HX+Ubvn2tSncnt JZA5d2Lgr59yxn0+u0TXaDY7lq5DjmsekPy/ViKygO7cCT+l28ST/syJWCqH2KWtiO oiODTNfkrPEvYZtjCatT614ByF2uWsmAZCHW84UJiVkoCGRZyNb/uBmQ+fXP+o60mY iCvkA5kwyM9WSA8TcqjzsuzdEJKuyZ9BzE7nBfj/c7tldVlrMfpIEBQdbFJ+lbX3ZI a/sNcj0Ze1IFA== Date: Wed, 16 Aug 2023 16:09:25 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced In-Reply-To: <83wmy0enzc.fsf@gnu.org> Message-ID: <77cdab433942b18b0737@heytings.org> References: <87o7ri74qv.fsf@localhost> <7ccb0e8131f84ca2ea0f0c0aed11dc197b578a64.camel@laposte.net> <83o7l61lz6.fsf@gnu.org> <2aa76ba11fd0a77ba107@heytings.org> <30832e86470f7dc33387@heytings.org> <83r0pyw89y.fsf@gnu.org> <215b00d2590a10728db4@heytings.org> <83sfa7puzb.fsf@gnu.org> <83351pehwp.fsf@gnu.org> <833510zic5.fsf@gnu.org> <3283828c971107fba129@heytings.org> <83jzu3hv5d.fsf@gnu.org> <3283828c97405b694421@heytings.org> <83wmy0enzc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60467-done Cc: 60467-done@debbugs.gnu.org, frederic.giquel@laposte.net, yantar92@posteo.net, monnier@iro.umontreal.ca, acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > I see that you haven't yet installed your fix on master; please do. > I was waiting for your and Stefan's comments. Now done (d622602452), and closing this bug (again?). From unknown Thu Aug 14 22:17:53 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, 14 Sep 2023 11:24:11 +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