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) Date: Thu, 01 Sep 2016 09:36:00 -0400 Message-ID: References: <20160731121642.GB2205@acm.fritz.box> <83a8gxq288.fsf@gnu.org> <87h9ag3j8c.fsf@russet.org.uk> <87pooqcolw.fsf@russet.org.uk> <8760qh6w4q.fsf@russet.org.uk> <87shtkxgfp.fsf@russet.org.uk> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1472736841 17142 195.159.176.226 (1 Sep 2016 13:34:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Sep 2016 13:34:01 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 01 15:33:52 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 1bfS7p-0003UA-Py for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 15:33:49 +0200 Original-Received: from localhost ([::1]:37169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfS7m-0002EL-Vd for ged-emacs-devel@m.gmane.org; Thu, 01 Sep 2016 09:33:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfS7A-00029p-3q for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:33:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfS74-0004cv-5w for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:33:07 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:40610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfS74-0004cn-1S for emacs-devel@gnu.org; Thu, 01 Sep 2016 09:33:02 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u81DXgFk003845; Thu, 1 Sep 2016 09:33:42 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 15F6860324; Thu, 1 Sep 2016 09:36:00 -0400 (EDT) In-Reply-To: <87shtkxgfp.fsf@russet.org.uk> (Phillip Lord's message of "Thu, 01 Sep 2016 07:49:46 +0100") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5784=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5784> : inlines <5166> : streams <1693529> : uri <2279490> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:207061 Archived-At: > So, on a-c-f revert the change, do what we are currently doing on b-c-f, > then reapply the change and run what we are currently running on a-c-f. Yup. > Yes, that does seem a possibility albeit a fairly hideous one. > It's really not something I'd want to be doing after every command. Yes, hideous sounds about right. OTOH if your code can work straight from the old-text string without too much gymnastics, it's not that bad. > I'll test out expanding the region with the code you suggested earlier. Yes, that's probably a much better option. Stefan