From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65451: 30.0.50; `after-change-functions' are not triggered in the same order the changes are made Date: Sat, 26 Aug 2023 10:10:02 +0300 Message-ID: <83cyzamg8l.fsf@gnu.org> References: <871qfv2zlk.fsf@localhost> <83a5ujtgfo.fsf@gnu.org> <87jztn1c5x.fsf@localhost> <834jkrters.fsf@gnu.org> <87v8d7i48y.fsf@localhost> <83ttsrrroo.fsf@gnu.org> <874jkq87jl.fsf@localhost> <83y1i1r689.fsf@gnu.org> <87fs487uip.fsf@localhost> <83zg2gq2vj.fsf@gnu.org> <871qfsel8q.fsf@localhost> <83r0nsprrk.fsf@gnu.org> <87cyzck1uh.fsf@localhost> <83il94pk49.fsf@gnu.org> <83pm3bocea.fsf@gnu.org> <87o7ivh4js.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11792"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 65451@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 26 09:10:24 2023 Return-path: Envelope-to: geb-bug-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 1qZnR8-0002qz-Tb for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Aug 2023 09:10:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZnQl-0002Bm-9z; Sat, 26 Aug 2023 03:09:59 -0400 Original-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 1qZnQj-0002Ba-Gn for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 03:09:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZnQj-0003vG-8D for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 03:09:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZnQo-0002eS-7z for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 03:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Aug 2023 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65451 X-GNU-PR-Package: emacs Original-Received: via spool by 65451-submit@debbugs.gnu.org id=B65451.169303378910168 (code B ref 65451); Sat, 26 Aug 2023 07:10:02 +0000 Original-Received: (at 65451) by debbugs.gnu.org; 26 Aug 2023 07:09:49 +0000 Original-Received: from localhost ([127.0.0.1]:41612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZnQb-0002dt-2V for submit@debbugs.gnu.org; Sat, 26 Aug 2023 03:09:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZnQZ-0002df-5x for 65451@debbugs.gnu.org; Sat, 26 Aug 2023 03:09:48 -0400 Original-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 1qZnQM-0003qg-SQ; Sat, 26 Aug 2023 03:09:35 -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=FVhN+naUvo8lC1i6FwGAo4nZdy43xh7soxxc/pDvxrg=; b=Hw2rFLUJHZzt vhQD3wKIBgoW82wxjOMbV6VnV70L+jo2IxQFk0YP9Y2V0QP9lEiZTIXYv+b2zx/UZR5dszejAxQSJ N456Ksfm91F0EW+SGJek3uTtKgb9S1NwCbiLHtyNwyL9H1baPMLJ7Z/v4umwbQj1/gBG51tp4Voao 0A3qJWO3Zqyu4a2uCrlBmuTc58Ap/3OT8oPyDGiM44rT4wZ0ExoAW7TsYVK1Q/q7sQyPSxg10aWy7 4sVg+mD56KEfEzcrVIX0qqy8PdOupgbIdVXezTPgY+A3tE+flGB24Pr8gTMxKGStdSgYULhFyDcPs PnqkiuL1R0+6N2wsMRrd3g==; In-Reply-To: <87o7ivh4js.fsf@localhost> (message from Ihor Radchenko on Fri, 25 Aug 2023 09:09:11 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268472 Archived-At: > From: Ihor Radchenko > Cc: casouri@gmail.com, 65451@debbugs.gnu.org > Date: Fri, 25 Aug 2023 09:09:11 +0000 > > Eli Zaretskii writes: > > > Thinking about this some more, we will need to consider whether this > > list of accumulated transactions is ever compacted by deleting old > > transactions, or we let it grow indefinitely. If the former, we > > should consider the case where more than one feature wants to track > > buffer edits (so it is impossible to remove entries once they have > > been processed by a single consumer). > > What I propose is actually quite similar to `buffer-undo-list'. > But a bit less generic - (apply FUN-NAME ARGS) entries cannot be handled > outside the narrow scope of `undo'. > Similar to `buffer-undo-list' it needs to be compacted. Not sure what this means in practice. the entries in the list we are discussing will be very different from the entries in buffer-undo-list. > To not lose the information when the edit history is compacted, there > may be a hook executed right before the compaction, so that all the > users can update their state as needed. If the compaction will run from GC, then we cannot safely call Lisp hooks at that time.