From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: (insert ?\n) spuriously calls before-change-functions twice. Help! Date: Wed, 06 Jan 2010 09:33:36 -0500 Message-ID: References: <20100105110954.GA2639@muc.de> <20100105173158.GB2639@muc.de> <20100106130521.GA2447@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1262788581 15447 80.91.229.12 (6 Jan 2010 14:36:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jan 2010 14:36:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 06 15:36:14 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NSWzd-00058s-Bk for ged-emacs-devel@m.gmane.org; Wed, 06 Jan 2010 15:36:13 +0100 Original-Received: from localhost ([127.0.0.1]:51976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSWzd-00009a-B1 for ged-emacs-devel@m.gmane.org; Wed, 06 Jan 2010 09:36:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSWxD-00075Q-RU for emacs-devel@gnu.org; Wed, 06 Jan 2010 09:33:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSWx9-00071g-4P for emacs-devel@gnu.org; Wed, 06 Jan 2010 09:33:43 -0500 Original-Received: from [199.232.76.173] (port=36145 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSWx8-00071X-TZ for emacs-devel@gnu.org; Wed, 06 Jan 2010 09:33:38 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:17022) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSWx8-0006Z4-DM for emacs-devel@gnu.org; Wed, 06 Jan 2010 09:33:38 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSWx7-0003Sw-P0 for emacs-devel@gnu.org; Wed, 06 Jan 2010 09:33:37 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtIFALItREvO+KPG/2dsb2JhbACBRdELhDAEiig X-IronPort-AV: E=Sophos;i="4.49,229,1262581200"; d="scan'208";a="53143692" Original-Received: from 206-248-163-198.dsl.teksavvy.com (HELO ceviche.home) ([206.248.163.198]) by ironport2-out.pppoe.ca with ESMTP; 06 Jan 2010 09:33:37 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 13378B4077; Wed, 6 Jan 2010 09:33:36 -0500 (EST) In-Reply-To: <20100106130521.GA2447@muc.de> (Alan Mackenzie's message of "Wed, 6 Jan 2010 13:05:21 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:119524 Archived-At: >> Even if we fix the bug, there can be any number of reasons why the two >> hooks may occasionally not be paired, ..... > Really? I would have thought they should be rigorously paired, without > any "recursive" invocations in-between (barring elisp code doing this > deliberately). There's combine-after-change-functions for one. Or there's the case where a signal is thrown in between the two. Of course, there's also the nesting case. >> .... so your hooks should be robust against such situations. IOW it's >> best to try and avoid relying in the after-hook on info passed from the >> before hook. > Haven't we discussed this before at some time? ;-) You mean I should just have said "Told ya!"? Stefan