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, 3 Jun 2019 19:15:49 +0000 Message-ID: <20190603191549.GA4009@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> <20190527143109.GA5863@ACM> 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="248771"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 25111@debbugs.gnu.org, Noam Postavsky , Phillip Lord To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 03 21:16:14 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 1hXsRJ-0012cH-Gt for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jun 2019 21:16:13 +0200 Original-Received: from localhost ([127.0.0.1]:39765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXsRI-00069n-6h for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jun 2019 15:16:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hXsRA-00069g-9E for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 15:16:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hXsR8-0002sX-GQ for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 15:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hXsR8-0002s1-78 for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 15:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hXsR7-0007fK-U6 for bug-gnu-emacs@gnu.org; Mon, 03 Jun 2019 15:16:01 -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, 03 Jun 2019 19:16:01 +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.155958936129458 (code B ref 25111); Mon, 03 Jun 2019 19:16:01 +0000 Original-Received: (at 25111) by debbugs.gnu.org; 3 Jun 2019 19:16:01 +0000 Original-Received: from localhost ([127.0.0.1]:43162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXsR6-0007f3-Oi for submit@debbugs.gnu.org; Mon, 03 Jun 2019 15:16:01 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:15207 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hXsR4-0007eu-3Z for 25111@debbugs.gnu.org; Mon, 03 Jun 2019 15:15:59 -0400 Original-Received: (qmail 64064 invoked by uid 3782); 3 Jun 2019 19:15:51 -0000 Original-Received: from acm.muc.de (p4FE15E26.dip0.t-ipconnect.de [79.225.94.38]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 03 Jun 2019 21:15:49 +0200 Original-Received: (qmail 4440 invoked by uid 1000); 3 Jun 2019 19:15:49 -0000 Content-Disposition: inline In-Reply-To: <20190527143109.GA5863@ACM> 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:160083 Archived-At: Hello, Eli. To recap, the problem we were talking about was the modification-hooks overlay property, whose value is a function which gets called before and after modification of the text under an overlay. When such a function gets called, inhibit-modification-hooks is left at nil. When the other four similar overlay/text-property "change functions" get called, inhibit-modification-hooks gets bound to t. This is difficult to document coherently. My proposal of last week was to fix the code, also to bin inhibit-modification-hooks to t for the modification-hooks overlay property, even though this would be an incompatibility in Lisp. Ping? ----------------------------->----------------------------------- | On Mon, May 27, 2019 at 14:31:09 +0000, Alan Mackenzie wrote: | > 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}. | v > > >> 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. | V > 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).