From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25111: Date: Fri, 09 Dec 2016 19:26:46 +0200 Message-ID: <83bmwlggix.fsf@gnu.org> References: <8360myl7ay.fsf@gnu.org> <87wpfbpual.fsf@russet.org.uk> <83eg1iiffm.fsf@gnu.org> <87pol1kon4.fsf@russet.org.uk> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1481317875 30454 195.159.176.226 (9 Dec 2016 21:11:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Dec 2016 21:11:15 +0000 (UTC) Cc: 25111@debbugs.gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 09 22:11:12 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 1cFSRj-0007Cg-73 for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Dec 2016 22:11:11 +0100 Original-Received: from localhost ([::1]:49008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFSRn-0005ND-8w for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Dec 2016 16:11:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFSRe-0005E1-Pf for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 16:11:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFSRa-0003pO-Be for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 16:11:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cFSRa-0003pK-8N for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 16:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cFSRa-0004AO-2u for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 16:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2016 21:11: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.148131781515778 (code B ref 25111); Fri, 09 Dec 2016 21:11:02 +0000 Original-Received: (at 25111) by debbugs.gnu.org; 9 Dec 2016 21:10:15 +0000 Original-Received: from localhost ([127.0.0.1]:36308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFSQp-00046L-1h for submit@debbugs.gnu.org; Fri, 09 Dec 2016 16:10:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFRns-0007Wf-1K for 25111@debbugs.gnu.org; Fri, 09 Dec 2016 15:30:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFOw5-0001PA-6h for 25111@debbugs.gnu.org; Fri, 09 Dec 2016 12:26:21 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFOw5-0001P6-3N; Fri, 09 Dec 2016 12:26:17 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4338 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cFOw4-0002nZ-CS; Fri, 09 Dec 2016 12:26:16 -0500 In-reply-to: <87pol1kon4.fsf@russet.org.uk> (phillip.lord@russet.org.uk) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:126782 Archived-At: > From: phillip.lord@russet.org.uk (Phillip Lord) > Cc: 25111@debbugs.gnu.org > Date: Fri, 09 Dec 2016 17:17:51 +0000 > > > So how would you want the manual to help avert such calamities? > > > My own feeling is that "inhibit-modification-hooks" should *only* be for > modifications that really should not be detected by anything else. I can > think of examples of this (I used to change the buffer to display a > completion string to the user for instance, although I now use an > "after-string" overlay property). > > The simplest advice makes calls to the modification hooks consistent is > to say "You should not modify the buffer on these hooks". The potential > solution, for instance, for yasnippet is to record the changes on > after-change-function, and then change the buffer on > post-command-hook. I think this would work? Is this what the manual > should say? IMO, the manual should advise the safe practices, and then tell how to behave if the code really needs to play it less safe. The former would be what you say above, I think. But since we know there are packages out there that don't choose the safe approach, we should cover those as well.