From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#25111: (Inaccurate documentation of inhibit-modification-hooks) Date: Mon, 27 May 2019 14:31:09 +0000 Message-ID: <20190527143109.GA5863@ACM> References: <83eg1iiffm.fsf@gnu.org> <87pol1kon4.fsf@russet.org.uk> <83bmwlggix.fsf@gnu.org> <878trmxgjh.fsf@russet.org.uk> <83lgvlcet1.fsf@gnu.org> <20190519203119.GA5309@ACM> <87y32u908k.fsf@gmail.com> <20190525134407.GA10864@ACM> <87sgt28ut4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="59638"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 25111@debbugs.gnu.org, Phillip Lord To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 27 16:32:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hVGfd-000FEw-Pn for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 May 2019 16:32:13 +0200 Original-Received: from localhost ([127.0.0.1]:46689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVGfc-0005Su-OI for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 May 2019 10:32:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVGfU-0005SF-B3 for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 10:32:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVGfT-0002K4-9n for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 10:32:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVGfT-0002Jy-7j for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 10:32:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hVGfT-0007Cb-3Z for bug-gnu-emacs@gnu.org; Mon, 27 May 2019 10:32:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 May 2019 14:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25111 X-GNU-PR-Package: emacs Original-Received: via spool by 25111-submit@debbugs.gnu.org id=B25111.155896748125570 (code B ref 25111); Mon, 27 May 2019 14:32:03 +0000 Original-Received: (at 25111) by debbugs.gnu.org; 27 May 2019 14:31:21 +0000 Original-Received: from localhost ([127.0.0.1]:53725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hVGem-0006e5-VI for submit@debbugs.gnu.org; Mon, 27 May 2019 10:31:21 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:61576 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hVGek-0006bn-VI for 25111@debbugs.gnu.org; Mon, 27 May 2019 10:31:19 -0400 Original-Received: (qmail 86435 invoked by uid 3782); 27 May 2019 14:31:11 -0000 Original-Received: from acm.muc.de (p4FE15E6C.dip0.t-ipconnect.de [79.225.94.108]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 27 May 2019 16:31:09 +0200 Original-Received: (qmail 6083 invoked by uid 1000); 27 May 2019 14:31:09 -0000 Content-Disposition: inline In-Reply-To: <87sgt28ut4.fsf@gmail.com> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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: 209.51.188.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:159811 Archived-At: Hello, Noam. On Sat, May 25, 2019 at 10:36:55 -0400, Noam Postavsky wrote: > Alan Mackenzie writes: > >>> @@ -3621,9 +3621,14 @@ Special Properties > >>> +When Emacs calls these functions, @code{inhibit-modification-hooks} is > >>> +set to @code{nil}. > >> As Phillip mentioned in the OP, Emacs in fact binds it to t. > > Are you sure? We're talking here about the text property (in which I > > think inhibit-modification-hooks IS at nil) as opposed to the overlay > > property (where inhibit-modification-hooks is bound to t). > Oh, you're quite right. Here's some test code: [ .... ] > Which produces this: > mod-hook-text-prop (1 4), inhibit? nil > mod-hook-change-fun (1 4), inhibit? t > mod-hook-ov-prop (# nil 1 4), inhibit? t > mod-hook-change-fun (1 1 3), inhibit? t > mod-hook-ov-prop (# t 1 1 3), inhibit? t > mod-hook-change-fun (1 1), inhibit? t > mod-hook-change-fun (1 4 0), inhibit? t > I think we need to emphasize the difference in this case, it's rather > confusing. Alternatively, we could perhaps regard the first of these results (for modification-hooks) as a bug in the code, which seems like it ought to be binding inhibit-modification-hooks to non-nil like the others. Maybe we should amend the code, even though this would be a jarring incompatibility with previous Emacs versions. Eli? [ .... ] > I've updated the patch based on your and Eli's feedback. Yes, I agree that "confusing the internal mechanism" is unhelpful here. Thanks for getting rid of it. [ .... ] -- Alan Mackenzie (Nuremberg, Germany).