From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: A strange issue with buffer-undo-list Date: Tue, 09 Mar 2021 01:32:21 +0100 Message-ID: <87r1kp9nfu.fsf@web.de> References: <87o8gbqs28.fsf@mbork.pl> <8735xm2t3p.fsf@web.de> <87r1l4n2w8.fsf@mbork.pl> <875z2f8xai.fsf@web.de> <87blbtiapu.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1762"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 09 01:33:29 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJQJU-0000MF-HS for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 Mar 2021 01:33:28 +0100 Original-Received: from localhost ([::1]:33114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJQJT-00056a-Ji for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 19:33:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJQJ9-00056R-GY for help-gnu-emacs@gnu.org; Mon, 08 Mar 2021 19:33:07 -0500 Original-Received: from mout.web.de ([212.227.17.12]:56543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJQJ7-0000K5-98 for help-gnu-emacs@gnu.org; Mon, 08 Mar 2021 19:33:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1615249942; bh=dD/yX8UeQklS+HsyvnD00Redr7XwYHnNrG9i2iiuFpE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=WurfgQoJA3JLs7U4etfdK9h2iCsz80LUuIIHVLJmYw6OVIZ6Rq2EUlCf7ls4d33A2 mWuLXe3ItA9d+NIRgMp6Jxt+/zMUqdRAbKF3DCOAcl0L9leAP9i4GGSLGwQPUJYC3u UZJv+kBL3vesZgZGRzvve6ZOOwf/EAjJY51CgItw= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.220.60]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M0Qkb-1lcCnj0c97-00uXwV; Tue, 09 Mar 2021 01:32:22 +0100 In-Reply-To: <87blbtiapu.fsf@mbork.pl> (Marcin Borkowski's message of "Mon, 08 Mar 2021 22:42:21 +0100") X-Provags-ID: V03:K1:8vsXMBJI50kqSm/X8XUenSPYMB+wmsgYi/Faki53C8Ou8oLGwjr IiEenhL8YX2C7F2RZ5H5o9n2b3/q1j7bRg5kI1jwbbvk5Cv1SqiUmKhitRptoFFPBXj0VJc srmqKK59R7WYDKLtIy6iOQRyW5H3Qm9lE/9nkAOimoTfPcEaL3L0pmiSr5YZ5FR46r1upVl 5W7NGgMGVVjq50Z/SADtA== X-UI-Out-Filterresults: notjunk:1;V03:K0:VJzLKOm6js0=:xoU/hUbg8TOPUN7lTidd93 QJntSYpFhVH8Scp2KEH6AtwYlfo4BpE0d639rsD6awt9yJqziQst5lRCDrOQugu36TtJShoTj 6iyi/MmW1vJUTpEEDyp7rUKDolKz5cxfy3hd3HpC11GEmW1Dv42fW9S5t3PykEmAwTNXUSE/L qJhyAPVn/be8Lay6V7p8LSA9mfQ3s61uSI0Xa1wZkkCF8BfhtKgnjE9AUbtUz1iCR6AY5gPd3 C1kVyDGLjPwxFi+EbD6ILV8llW0eTYPev6hvgluahp4kYpf/jY9cGlmYTO26A3IdDG7wncJqx BekeQfyQWdiqtgkjj5VvWZDOXXrJKBNzQF/6pj/KLxPd8tZpu3KC+mEUtC6uKzLsaUfKLIvSc DWrOcGcGPfrA9JMJzn+K+QhzTc2ZAdtfmU9ycEBPEDD5GG0AJesWCojUnTzhBvrKGNxiiJJYu xFeCmetPzHQiFytE3BmVk9/Izo450LH6PuMUwL9hd2L0kF43znYNsOa6KLwvUsknlNLOqnDVo scuHTMf/pXTjjEivZnwG8LBt7CsG0O/d1Awj/pfvTmH/v2NaE8vtYJPQLW1Q+WlAGymmiamLw FH4hnR+7ARt+caKXF4t56rbC7A/bQp5Gp91QMOkMQ41BjeY12/60cCzW/gpDRWqoIa1gzmUF/ hTO9QWf9MmqN2i3i67MYMYTk4ff2xwKBTt2B/p20JKAThVtIrwfqNRfI52gbp0ez/lGEEA02g 6dP9Gy9We2NVg95vucQDSf6CX06x7nwbqxu1K8xXvYY+gQrOnqB4J/78ppWxlCzi04lU8WRe Received-SPF: pass client-ip=212.227.17.12; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128366 Archived-At: Marcin Borkowski writes: > > Seems so. Where they are used - e.g. in the implementation of > > `transpose-subr', they are important however. You wouldn't want that > > undoing a transposition would happen in multiple steps uncovering > > implementation details. > > Agreed, although I don't think undo would kick in within one command > (without explicit undo boundaries). Maybe I had not yet completely understood how this works. It seems one (primitive) undo undoes until it finds a boundary, and boundaries seem to be implicitly inserted after any command. Then I think the change group is used in `transpose-subr' to prevent that the transposition or its undoing is left in a half-done state in case of an error, and it has more or less no user visible effect if no errors happen. Someone should really write a short summary on how the undo system is implemented, it is not trivial and finding out is also not. Regards, Michael.