From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#25111: How modification-hooks let-bind inhibit-modification-hooks? Date: Mon, 5 Dec 2016 12:39:29 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480959678 4611 195.159.176.226 (5 Dec 2016 17:41:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2016 17:41:18 +0000 (UTC) Cc: 25111@debbugs.gnu.org, Phillip Lord To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 05 18:41:10 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 1cDxGI-00005Q-0R for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Dec 2016 18:41:10 +0100 Original-Received: from localhost ([::1]:43599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDxGL-0003jl-VK for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Dec 2016 12:41:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDxFF-0002ue-Mw for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2016 12:40:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDxFC-0002bs-Hr for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2016 12:40:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDxFC-0002bF-EG for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2016 12:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cDxFC-0004oE-3A for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2016 12:40:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Dec 2016 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25111 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25111-submit@debbugs.gnu.org id=B25111.148095957718438 (code B ref 25111); Mon, 05 Dec 2016 17:40:02 +0000 Original-Received: (at 25111) by debbugs.gnu.org; 5 Dec 2016 17:39:37 +0000 Original-Received: from localhost ([127.0.0.1]:57224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDxEn-0004nK-Bu for submit@debbugs.gnu.org; Mon, 05 Dec 2016 12:39:37 -0500 Original-Received: from mail-oi0-f47.google.com ([209.85.218.47]:35611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDxEl-0004my-D9 for 25111@debbugs.gnu.org; Mon, 05 Dec 2016 12:39:35 -0500 Original-Received: by mail-oi0-f47.google.com with SMTP id b126so348468310oia.2 for <25111@debbugs.gnu.org>; Mon, 05 Dec 2016 09:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=zqFrjo7Orf6etu/CtYc8/RuoL7T6Djrb2pfLGYSc+08=; b=b5DMoe3pCTbjugs9xSFPexoMwZSugqLn+WqKA7PY8g/J/mWOXNnV96ALX/HlmHNO5A /kQ+qNjaUHX0Uf1R4Xsaqz93/HnasQkxXVbMEh+r0I5hrIwN5GDxxIAzRb4UqxNF6p2t immgWDNS0xnaKrFqpx1DOjeu+Gng60OfmYJj4Fyz03AT2bMViVPzaRKwIuV9q8yxIWGu tTOSqQajU9JMOkS/0PtqLuL2m+LL8ZwclyAO3U86bn9p/kfmB4DV1sBTjjErjUKvmRyj S18bRC5r1pI9rhvzU7lOgDvM1i4g74M83jaFi1NiiqDuEbLPxW7Wd/gjz80jNdpQQ9Uj U1Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:cc:content-transfer-encoding; bh=zqFrjo7Orf6etu/CtYc8/RuoL7T6Djrb2pfLGYSc+08=; b=Lm0U0HNiKrCnwjx5j2pO6IfHvcGcilBHgVImadW1iZD6b2fO3LUvjnwiV0+qLY8hUO LxZCgwSgR3U1baSSdbvHk4VRZefPIam/a+cO3dLD/v/I0txhwe25U5HF7lA71a1LzLh1 pSUzBjQYtwZ1fy52+bQOEIolyxgX+J4bHoJ42gh3In8nG4jB97j5fzL0YHKIj6dPdmrn vQ3ZgcT0ivRwvTJYrCkpBbjhxKpEPgUGN8RIEhxfrr6bLQ6b47XWdgyjTkGxG7CUwQ9g vVkInz9fzbdffBiXu+4kv9g5BKtWIOnVO5p4iCdmG62a3DIuIaARUSkFbTNx6kN3rAsz /jEw== X-Gm-Message-State: AKaTC02fVoVCtj6Eool802Q/um9hC3BNU72qE0VIrus4M0qFi8k92IFRs51VMw9qXeGDPHwz9gOJMjGEC5o7vA== X-Received: by 10.202.63.65 with SMTP id m62mr30875343oia.167.1480959569775; Mon, 05 Dec 2016 09:39:29 -0800 (PST) Original-Received: by 10.157.6.234 with HTTP; Mon, 5 Dec 2016 09:39:29 -0800 (PST) X-Google-Sender-Auth: dtxryMXwZEJU3xN95yIxIRsnBtQ 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:126518 Archived-At: On Mon, Dec 5, 2016 at 10:33 AM, Eli Zaretskii wrote: >> Date: Sun, 4 Dec 2016 20:53:24 -0000 >> From: "Phillip Lord" >> >> The documentation for "modification-hooks" on overlays says: >> >> If these functions modify the buffer, they should bind >> =E2=80=98inhibit-modification-hooks=E2=80=99 to =E2=80=98t=E2=80=99= around doing so, to avoid >> confusing the internal mechanism that calls these hooks. >> >> But as far as I can see, the only place these gets called >> "signal_after_change" >> and "signal_before_change", inhibit-modification-hooks is already specbo= und >> to t, so this advice is unnecessary. >> >> Also, the documentation for inhibit-modification-hooks says: >> >> If you do want modification hooks to be run in a particular >> piece of code that is itself run from a modification hook, then >> rebind locally =E2=80=98inhibit-modification-hooks=E2=80=99 to =E2= =80=98nil=E2=80=99. >> >> which suggests that, in fact, it is possible to call the modification >> hooks from inside another call to these functions. > > Given these two excerpts, it seems to me that there's no inaccuracies > in the manual, perhaps we just need to tell both stories in the same > place or something? Or do you still think there's something incorrect > in these two fragments? Would following the advice in the second fragment confuse the "internal mechanism" (as suggested in the first fragment) or not?