From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24340: insert-file-contents calls before-change-functions too late Date: Wed, 31 Aug 2016 18:03:12 +0300 Message-ID: <83inuhkmkv.fsf@gnu.org> References: <8360qim5sv.fsf@gnu.org> <83vayhkogv.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1472655897 17703 195.159.176.226 (31 Aug 2016 15:04:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2016 15:04:57 +0000 (UTC) Cc: 24340@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 31 17:04:48 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf74J-0003dB-If for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Aug 2016 17:04:47 +0200 Original-Received: from localhost ([::1]:54530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf74H-0002eE-97 for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Aug 2016 11:04:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf73e-0002En-U2 for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 11:04:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf73a-0008Mn-2I for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 11:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf73Z-0008Mh-VE for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 11:04:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bf73Z-0000n3-Qn for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 11:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Aug 2016 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24340 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24340-submit@debbugs.gnu.org id=B24340.14726558132999 (code B ref 24340); Wed, 31 Aug 2016 15:04:01 +0000 Original-Received: (at 24340) by debbugs.gnu.org; 31 Aug 2016 15:03:33 +0000 Original-Received: from localhost ([127.0.0.1]:45572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf732-0000mC-Sp for submit@debbugs.gnu.org; Wed, 31 Aug 2016 11:03:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf72w-0000lq-GI for 24340@debbugs.gnu.org; Wed, 31 Aug 2016 11:03:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf72n-00080S-M0 for 24340@debbugs.gnu.org; Wed, 31 Aug 2016 11:03:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf72n-00080O-J7; Wed, 31 Aug 2016 11:03:13 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2969 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bf72m-0005kT-N0; Wed, 31 Aug 2016 11:03:13 -0400 In-reply-to: (message from Stefan Monnier on Wed, 31 Aug 2016 10:48:09 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:122805 Archived-At: > From: Stefan Monnier > Cc: 24340@debbugs.gnu.org > Date: Wed, 31 Aug 2016 10:48:09 -0400 > > > I'm sorry, but I must insist. The change I proposed is the only one > > in insert-file-contents for that use case that I'm prepared to > > consider in the current situation. (We could also leave this bug > > open, until such time as a more thorough refactoring is done of the > > related functionalities.) Deeper changes are exactly the can of worms > > that I don't want to open to fix just this one use case, especially > > since Emacs 25.2 will almost certainly be branched from what now is > > the master branch. Such deeper changes were what Alan proposed in the > > first place (with a similar patch), and I already said I didn't want > > to do that. > > Right: I do not intend for my patch to go to 25.2. But for Emacs-26, > it seems there's plenty of time to find and fix any possible fallout. Since I believe master will be used for 25.2, we cannot currently push anything that must wait for 26. > > I think a cleaner way is to change the model of how we partition > > piecemeal changes, when we signal the changes and when don't, when we > > ask the user about supersession-threat, etc. The current model is > > fundamentally flawed, if we want to use the buffer-change hooks in the > > ways that emerged from these discussions. > > All I care about is for any change to the buffer to be announced by > a prior b-c-f. My proposed simple change satisfies this requirement, albeit the effect is less optimal.