From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.bugs Subject: bug#25111: Date: Wed, 07 Dec 2016 16:40:02 +0000 Message-ID: References: <8360myl7ay.fsf@gnu.org> <87wpfbpual.fsf@russet.org.uk> 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 1481129950 25604 195.159.176.226 (7 Dec 2016 16:59:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2016 16:59:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: 25111@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 07 17:59:06 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 1cEfYc-0005fy-Sk for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Dec 2016 17:59:03 +0100 Original-Received: from localhost ([::1]:40080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEfYg-0004V8-Qv for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Dec 2016 11:59:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEfXi-0003z1-08 for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2016 11:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEfXe-0004OV-U1 for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2016 11:58:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cEfXe-0004OR-QI for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2016 11:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cEfXe-0003Xq-He for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2016 11:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2016 16:58: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.148112984613583 (code B ref 25111); Wed, 07 Dec 2016 16:58:02 +0000 Original-Received: (at 25111) by debbugs.gnu.org; 7 Dec 2016 16:57:26 +0000 Original-Received: from localhost ([127.0.0.1]:59459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEfX4-0003X0-30 for submit@debbugs.gnu.org; Wed, 07 Dec 2016 11:57:26 -0500 Original-Received: from mailhub-mx4.ncl.ac.uk ([128.240.234.84]:47630 helo=mailhub-mx4) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEfX1-0003Wr-EB for 25111@debbugs.gnu.org; Wed, 07 Dec 2016 11:57:24 -0500 Original-Received: (Haraka outbound); Wed, 07 Dec 2016 16:57:22 +0000 Authentication-Results: mailhub-mx4; spf=pass smtp.mailfrom=newcastle.ac.uk X-Haraka-RcptSummary: valid=0/0 invalid=0/0 unverified=0/0 relay=1/1 norelay=0/0 X-Haraka-Relay: true Received-SPF: Pass (mailhub-mx4: domain of newcastle.ac.uk designates 10.3.193.34 as permitted sender) receiver=mailhub-mx4; identity=mailfrom; client-ip=10.3.193.34; helo=mailhub-ncl4.ncl.ac.uk; envelope-from= Original-Received: from mailhub-ncl4.ncl.ac.uk ([10.3.193.34]) by mailhub-mx4 (DefenderMX/2.7.3) with ESMTP id BD4885A3-38E3-4524-A6C5-0AA344F2B5CA.1 envelope-from ; Wed, 07 Dec 2016 16:57:21 +0000 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by mailhub-ncl4.ncl.ac.uk with esmtp (Exim 4.84_2) (envelope-from ) id 1cEfWz-00008e-Cg; Wed, 07 Dec 2016 16:57:21 +0000 Original-Received: from cpc2-benw10-2-0-cust42.gate.cable.virginm.net ([77.103.60.43] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1cEfWy-0005iT-R2; Wed, 07 Dec 2016 16:57:21 +0000 In-Reply-To: <8360myl7ay.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Dec 2016 17:33:25 +0200") X-NCL-mrate: cflags=() mflags=() X-Haraka-Syntax: mail_case=upper mail_leading_spaces=N mail_trailing_spaces=N mail_missing_brackets=N rcpt_case=upper rcpt_leading_spaces=N rcpt_missing_brackets=N rcpt_trailing_spaces=N X-Haraka-HostID: 10.3.193.34 X-Haraka-SenderAuth: 10.3.193.34 newcastle.ac.uk X-Haraka-AccessMap: connect:10 OK X-Haraka-Domain-Info: domain="russet.org.uk" last_update=284 primary_ns="dns5.planethippo.com" serial=2016022702 refresh=3600 retry=7200 expiration=1209600 minimum=86400 flags="NS_SAME_NET, MX_IS_NS, MX_SINGLE" domain="newcastle.ac.uk" last_update=0 primary_ns="dns0.ncl.ac.uk" serial=2016120712 refresh=10800 retry=3600 expiration=604800 minimum=3600 flags="SOA_UPDATE_1" X-Haraka-SubjectNonLatin: 0 X-Haraka-NonLatin: 0.458 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:126616 Archived-At: Eli Zaretskii writes: >> Date: Sun, 4 Dec 2016 20:53:24 -0000 >> From: "Phillip Lord" >>=20 >> The documentation for "modification-hooks" on overlays says: >>=20 >> 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. >>=20 >> 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. >>=20 >> Also, the documentation for inhibit-modification-hooks says: >>=20 >> 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. >>=20 >> 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? I think that the first of these is incorrect. There is no need to bind `inhibit-modification-hooks' to `t'. More over, there may be reasons by bind `inhibit-modification-hooks' to `nil' (i.e. "If you do want modification hooks to be run..."). I am unclear whether this will "confuse the internal mechanism", since I don't know exactly what this means. It possible that the documentation should say "Mostly, you should avoid modifying the buffer on these hooks, any other functionality using these modification-hooks will not be called." The reason I ask all of this as a result of a concrete use case. yasnippet modifies the buffer in these hooks, in turn breaks my own package, lentic, which uses these hooks to respond to changes. https://github.com/joaotavora/yasnippet/issues/756 https://github.com/phillord/lentic/issues/51 Phil