From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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, 30 Mar 2024 11:38:24 -0400 Message-ID: References: <871qfv2zlk.fsf@localhost> <83a5ujtgfo.fsf@gnu.org> <86frw7dd3d.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15396"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: acm@muc.de, yantar92@posteo.net, 65451@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 30 16:39:16 2024 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 1rqanc-0003po-GL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 16:39:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqanO-0000ql-3X; Sat, 30 Mar 2024 11:39:02 -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 1rqanM-0000qM-AQ for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 11:39: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 1rqanM-0006iZ-2J for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 11:39:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqanN-0006lf-Ro for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 11:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 15:39:01 +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.171181312125951 (code B ref 65451); Sat, 30 Mar 2024 15:39:01 +0000 Original-Received: (at 65451) by debbugs.gnu.org; 30 Mar 2024 15:38:41 +0000 Original-Received: from localhost ([127.0.0.1]:46061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqan3-0006kV-4C for submit@debbugs.gnu.org; Sat, 30 Mar 2024 11:38:41 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqan1-0006jm-AN for 65451@debbugs.gnu.org; Sat, 30 Mar 2024 11:38:39 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E9972441058; Sat, 30 Mar 2024 11:38:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1711813105; bh=1cik+zN37MvuPEZMg9V6TzlNwZt2CTjAjDIp/HpGC8k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iK4AOP0Is4XnqTrhdjODDzlNL3F1J31+39O4RbOdk8NqcRt5QFpujmuAJ03soA0Sd S9wAOXnx/zNE3YyREnuJSXBkJW1KAbs6LA5Vy75L9ER/SH72dMWmJZQSBGdNO7yvJV MwvKJTphBkMlNRXYgZbEfrBTdZOxux1oEc3VzlvN9pBfANEtc3PI+yKygzZiss6ier OsWvBZ28Tz+f25lrKXjfSZm4CeZ5YMuTk0ysj6S/WXjiORBEOLfL0Q0J80lX6b/dNE N5mtbqG1vg+3F9MLtsAfRqxGEE2Qk+DOWP1WfPu8+WvND2fuFeD5/bvks6KeOpeUoW R9PfiL471o2Nw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2BFE4441451; Sat, 30 Mar 2024 11:38:25 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EC0E312077F; Sat, 30 Mar 2024 11:38:24 -0400 (EDT) In-Reply-To: <86frw7dd3d.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Mar 2024 17:11:02 +0300") 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:282379 Archived-At: > I still stand by my opinion: Org is relying on something it cannot > rely upon, not as long as a function that changes a buffer can be > called from another function which changes the same buffer. `*-change-functions` should not modify the buffer (we could try and enforce this, tho in my experience those that do will get punished pretty quickly already), so the only cases I can think of where "a function that changes a buffer can be called from another function which changes the same buffer" is when both of those functions are in our C code and we should have enough control to fix those cases. > I don't see how we can avoid breaking code which relies on such > assumptions, not in general anyway. All sophisticated-enough users of `*-change-functions` rely on this (and come with sanity checks to detect the problem and fallback on an expensive recovery when needed, because indeed we tend to break our promises =F0=9F=99=81). So we really should try and fix those. Alan did convince me that we should treat them as bugs and that we should try and fix them. Stefan