From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Unbalanced change hooks (part 2) [Documentation fix still remaining] Date: Tue, 30 Aug 2016 14:22:08 -0400 Message-ID: References: <20160811112951.GA2154@acm.fritz.box> <7e1478b6-cf00-fcbf-8c24-43bdaa57e2b6@dancol.org> <415d1cca-f32c-624e-a4be-9aadcf8a0f17@dancol.org> <83inujbpek.fsf@gnu.org> <20160830171222.GA6672@acm.fritz.box> <5857ab7e-e85c-c6ae-ba1a-b1337ae57f2c@dancol.org> <83fupmm9ul.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1472726680 2288 195.159.176.226 (1 Sep 2016 10:44:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2016 10:44:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 12:44:36 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bfPU3-0008VN-R3 for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 12:44:35 +0200 Original-Received: from localhost ([::1]:36160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfPU4-0003bX-NA for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 06:44:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfPH8-00005D-LD for emacs-devel@gnu.org; Thu, 01 Sep 2016 06:31:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfPGy-0005Qw-VC for emacs-devel@gnu.org; Thu, 01 Sep 2016 06:31:13 -0400 Original-Received: from [195.159.176.226] (port=51140 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfPGy-0005Qm-O1 for emacs-devel@gnu.org; Thu, 01 Sep 2016 06:31:04 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1benct-0006X6-TN for emacs-devel@gnu.org; Tue, 30 Aug 2016 20:19:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:+qgtWfcYaIbhVI0F/8+bQcbY618= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207055 Archived-At: >> - Do @emph{not} expect the before-change hooks and the after-change >> -hooks be called in balanced pairs around each buffer change. Also >> -don't expect the before-change hooks to be called for every chunk of >> -text Emacs is about to delete. These hooks are provided on the >> -assumption that Lisp programs will use either before- or the >> -after-change hooks, but not both, and the boundaries of the region >> -where the changes happen might include more than just the actual >> -changed text, or even lump together several changes done piecemeal. >> + Do @emph{not} expect the before-change hooks and the after-change >> +hooks be called in balanced pairs around each buffer change. >> +The before-change-functions region is a conservative bound on the zero >> +or more fine-grained changes to follow. Emacs informs user code about >> +the actual changes to the buffer through calls to >> +after-change-functions; these fine-grained changes will always fall >> +inside the broad change region Emacs describes by calling >> +before-change-functions. > You removed the part about text deletion, which is not specific to > revert-buffer, so that information is now lost. I don't want to > lose it. I do want to lose it, because this failure to call b-c-f is a bug, not something part of the intended behavior. I could live with something like "There are still some known bugs in which b-c-f fails to be called", tho. > Other than that, I don't see how your text is more accurate, it's just > a different wording dancing around the same issues trying to side-step > them by replacing one vague description by another. They do seem mostly equivalent, so if it can satisfy one of the complainant I'm happy to accept the change ;-) Stefan