From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Unbalanced change hooks (part 2) Date: Wed, 03 Aug 2016 05:36:09 +0300 Message-ID: <83bn1amvdy.fsf@gnu.org> References: <20160731121642.GB2205@acm.fritz.box> <20160802101549.GA2328@acm.fritz.box> <83r3a7md69.fsf@gnu.org> <20160802165545.GD2328@acm.fritz.box> <83fuqnm6og.fsf@gnu.org> <83eg67m3aq.fsf@gnu.org> <20160802193835.GF2328@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1470191809 17177 195.159.176.226 (3 Aug 2016 02:36:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2016 02:36:49 +0000 (UTC) Cc: ofv@wanadoo.es, rcopley@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 03 04:36:43 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bUm30-0003pV-EY for ged-emacs-devel@m.gmane.org; Wed, 03 Aug 2016 04:36:42 +0200 Original-Received: from localhost ([::1]:59805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUm2x-0000KC-4G for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2016 22:36:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUm2r-0000Ju-KB for emacs-devel@gnu.org; Tue, 02 Aug 2016 22:36:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUm2o-0007Yq-Eu for emacs-devel@gnu.org; Tue, 02 Aug 2016 22:36:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUm2o-0007Yj-Bt; Tue, 02 Aug 2016 22:36:30 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2954 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bUm2f-0005gY-PX; Tue, 02 Aug 2016 22:36:22 -0400 In-reply-to: <20160802193835.GF2328@acm.fritz.box> (message from Alan Mackenzie on Tue, 2 Aug 2016 19:38:35 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206382 Archived-At: > Date: Tue, 2 Aug 2016 19:38:35 +0000 > Cc: ofv@wanadoo.es, rcopley@gmail.com, rms@gnu.org, emacs-devel@gnu.org > From: Alan Mackenzie > > > Btw, I'm slowly but surely arriving to the conclusion that the > > problems we are discussing can only happen when insert-file-contents > > is called with VISIT and REPLACE non-nil, i.e. when reverting a > > buffer. Do we have any evidence to the contrary? > > As long as C-x C-f on a file changed outside of Emacs is included in > "reverting", then no. You will see in files.el that C-x C-f on such a file calls revert-buffer. > > If we do, can someone show or point to such contradicting evidence? > > You haven't said how you reached this conclusion. By reading the code, of course. > I've grepped for calls of the five functions (insert_1_both, > replace_range, del_range_\(1\|byte\|both\)) which have `prepare' > parameters, and noted where the argument is false. I see 15 > occurrences. They are in callproc.c, coding.c, editfns.c, fileio.c, > fns.c, insdel.c, print.c, and xdisp.c. > > Can you persuade me that it wouldn't be a good use of my time to look at > each of these 15 occurrences? :-) You can if you want to, of course. The above is my conclusion from looking at all those places: the only one that counts is in insert-file-contents.