From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Monnier Subject: =?UTF-8?B?YnVnIzIzOTE3OiBQbGVhc2UgY29uc2lkZXIgbWFraW5nIEJ1ZyAj?= =?UTF-8?B?MjM5MTcgYSBibG9ja2VyIGZvciAyNS4xICh3YXMgUmU6IG9yZy1jYXB0dXJl?= =?UTF-8?B?OiBDYXB0dXJlIHRlbXBsYXRlIOKAmGfigJk6IE1hdGNoIGRhdGEgY2xvYmJl?= =?UTF-8?B?cmVkIGJ5IGJ1ZmZlciBtb2RpZmljYXRpb24gaG9va3Mp?= Date: Wed, 20 Jul 2016 14:19:59 -0400 Message-ID: References: <87vb066ejv.fsf@linaro.org> <8360s67qcp.fsf@gnu.org> <87bn1yyaui.fsf@linaro.org> <87mvlhmv0x.fsf_-_@moondust.awandering> <837fcl5zs9.fsf@gnu.org> <87a8hgkwcb.fsf@linaro.org> <8360s42mcb.fsf@gnu.org> <87eg6rgmlg.fsf@gmail.com> <83lh0y24y6.fsf@gnu.org> <83eg6q1hbo.fsf@gnu.org> <83a8hd1vzi.fsf@gnu.org> <834m7l1u8u.fsf@gnu.org> <83shv4z7e8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPw7G-0000pQ-PK for emacs-orgmode@gnu.org; Wed, 20 Jul 2016 14:21:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPw7C-0006Yy-Ht for emacs-orgmode@gnu.org; Wed, 20 Jul 2016 14:21:05 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <83shv4z7e8.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 20 Jul 2016 17:55:11 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Eli Zaretskii Cc: nljlistbox2@gmail.com, npostavs@users.sourceforge.net, jwiegley@gmail.com, rpluim@gmail.com, 23917@debbugs.gnu.org, alex.bennee@linaro.org > Is it OK to adjust the match data before actually making the > replacement? If so, I think it's a simpler solution. >> PS: I can think of one (theoretical) other/better way to fix this >> problem: move the match-data adjustment so it's done within >> replace_range before running the after-change-functions. > Isn't that almost the same as what Noam suggested? Yes, it's the same. And yes, I like the idea, but I just don't know what it would look like as a patch. I have the impression that it could prove either expensive in CPU time and backward incompatible (e.g. adjust markers for every buffer modification), or require extensive code surgery and/or breaking some abstractions. This is just an impression, tho. I think it'd definitely be the better solution, so it's worth investigating anyway, if only for "master" rather than for "emacs-25". Stefan