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: Sun, 27 Aug 2023 11:29:44 +0300 Message-ID: <83v8d0khvr.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> <83cyzamg8l.fsf@gnu.org> <87pm38gax9.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34839"; 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 Sun Aug 27 10:31:22 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 1qaBB3-0008u3-1q for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Aug 2023 10:31:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaBAt-0004pp-4l; Sun, 27 Aug 2023 04:31:11 -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 1qaBAg-0004pM-Hr for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 04:31:00 -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 1qaBAe-0002uF-Qt for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 04:30:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qaBAk-0003kU-EY for bug-gnu-emacs@gnu.org; Sun, 27 Aug 2023 04:31: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: Sun, 27 Aug 2023 08:31: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.169312502714361 (code B ref 65451); Sun, 27 Aug 2023 08:31:02 +0000 Original-Received: (at 65451) by debbugs.gnu.org; 27 Aug 2023 08:30:27 +0000 Original-Received: from localhost ([127.0.0.1]:44081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaBAA-0003jZ-PD for submit@debbugs.gnu.org; Sun, 27 Aug 2023 04:30:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qaBA8-0003jJ-1y for 65451@debbugs.gnu.org; Sun, 27 Aug 2023 04:30:26 -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 1qaB9w-0002jg-SP; Sun, 27 Aug 2023 04:30:12 -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=g4nCs3S4oFgR9kBL8M3xxx6Rm50cJyqQEFRamGsfHvA=; b=hVXhx5m3b5Cl QGm0G8emPxt6ufXz0ugyxZEJb8dLW4FZw/AlUJxRJ2YH5TxBPXUcpQQbe104FSqnvdd8L4DyzFwu2 bTpKzAV13uMfHRdEVFV9dX9eR3Rl3jMAuYT07UzJomOaGc3kroPB+WQX/AlmqTjh+HdAU2GpgLCJx DXn4C11x2avuN3HrelGWLjjDukD3MnITdwHli354Hx/wrxugOGqWb2zCfv09d7cC93mcrTTZ2nbSA 7GaYmyskmIGDj081FCla0IQJO6PxDPiH/QW8wCWUpynvVyW0lLct4iSIvOC4z0SXXnp9w6AnCEniQ pmeX1H752a1sQEqqbJk73w==; In-Reply-To: <87pm38gax9.fsf@localhost> (message from Ihor Radchenko on Sun, 27 Aug 2023 08:13:38 +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:268547 Archived-At: > From: Ihor Radchenko > Cc: casouri@gmail.com, 65451@debbugs.gnu.org > Date: Sun, 27 Aug 2023 08:13:38 +0000 > > Eli Zaretskii writes: > > >> 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. > > What I meant is that similar principles with undo-limit-like variables > may apply. Well, the devil is in the details ;-) > >> 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. > > Fair point. > Then, what about compacting the "edit list" more frequently, so that we > do not need to worry about its size? But I am not sure what frequency > will be safe. Something like that, yes. But we need to invent a protocol which would allow several clients to consume the list safely and without the risk of missing edits.