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: [Request for Mentor] subst-char-in-region Date: Fri, 12 Dec 2014 09:35:16 -0500 Message-ID: References: <87r3w5jdow.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418394964 20498 80.91.229.3 (12 Dec 2014 14:36:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2014 14:36:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: phillip.lord@newcastle.ac.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 12 15:35:57 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XzRK1-0004k1-AH for ged-emacs-devel@m.gmane.org; Fri, 12 Dec 2014 15:35:57 +0100 Original-Received: from localhost ([::1]:57579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzRK0-0002ZG-TI for ged-emacs-devel@m.gmane.org; Fri, 12 Dec 2014 09:35:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzRJa-0002Yg-Dd for emacs-devel@gnu.org; Fri, 12 Dec 2014 09:35:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzRJS-0007Ee-UC for emacs-devel@gnu.org; Fri, 12 Dec 2014 09:35:30 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:42515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzRJS-0007Dv-Qg for emacs-devel@gnu.org; Fri, 12 Dec 2014 09:35:22 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsPAOwQflTO+ILA/2dsb2JhbABbDoJ5g2CFWsUdBAICgSQXAQEBAQEBfIQDAQEDAVYjBQsLNBIUGA2IbgnWWQEBAQEGAQEBAR6QbweESAWLAYNhjlCDOI5FgXiDO14hgncBAQE X-IPAS-Result: AjsPAOwQflTO+ILA/2dsb2JhbABbDoJ5g2CFWsUdBAICgSQXAQEBAQEBfIQDAQEDAVYjBQsLNBIUGA2IbgnWWQEBAQEGAQEBAR6QbweESAWLAYNhjlCDOI5FgXiDO14hgncBAQE X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="100278328" Original-Received: from 206-248-130-192.dsl.teksavvy.com (HELO pastel.home) ([206.248.130.192]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2014 09:35:22 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id BBAF12F23; Fri, 12 Dec 2014 09:35:16 -0500 (EST) In-Reply-To: <87r3w5jdow.fsf@newcastle.ac.uk> (Phillip Lord's message of "Fri, 12 Dec 2014 11:43:43 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:179909 Archived-At: > ooo > bbb > Changing ooo to xxx reports the following from Emacs > before(1,8) > after(1,4,3) That looks correct to me. > origin/fix/subst-char-in-region > (hopefully adding a new branch is okay for this, obviously it can be > deleted later). After adding this fix I get... Please use "scratch/" rather than "fix/". > before(1,8) > after(1,8,8) This wouldn't be wrong, but would be less precise. > Assuming others agree with me that this behaviour is wrong, I would like > to fix the problem, but would welcome some help and code review. Assuming a close&direct correct correspondence between before-change-functions and after-change-functions is just a bad idea. Does you code *really* need that? Stefan