From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#31035: 27.0.50; (apply ...) doesn't work with undo-in-region Date: Mon, 02 Apr 2018 20:41:11 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522716014 12916 195.159.176.226 (3 Apr 2018 00:40:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2018 00:40:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Alan Mackenzie , Johan =?UTF-8?Q?Bockg=C3=A5rd?= To: 31035@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 03 02:40:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1f39ze-0003FC-6o for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Apr 2018 02:40:10 +0200 Original-Received: from localhost ([::1]:47148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3A1g-0007pX-3W for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Apr 2018 20:42:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3A1W-0007oF-GY for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 20:42:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3A1S-0001G8-Dg for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 20:42:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55966) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3A1S-0001Fg-9K for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 20:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f3A1R-0005pR-NB for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 20:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Apr 2018 00:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31035 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31035-submit@debbugs.gnu.org id=B31035.152271608022358 (code B ref 31035); Tue, 03 Apr 2018 00:42:01 +0000 Original-Received: (at 31035) by debbugs.gnu.org; 3 Apr 2018 00:41:20 +0000 Original-Received: from localhost ([127.0.0.1]:35630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f3A0l-0005oY-Ms for submit@debbugs.gnu.org; Mon, 02 Apr 2018 20:41:19 -0400 Original-Received: from pmta31.teksavvy.com ([76.10.157.38]:2737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f3A0j-0005oL-OM for 31035@debbugs.gnu.org; Mon, 02 Apr 2018 20:41:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2HmBwA/zcJa/06mSC1dGgEBAQEBAgEBAQEIAQEBAYMTL4FQgz2EaZBhgXQTfJRNC4UEAoQzITcVAQIBAQEBAQECA2gohSYBBAF5BQsLDScSFBhfhGoIsAEaAogmgiWHYYIThBCFO4UIApc6CI9ehgEihGSHJohXgSUyI4FSMxoIMDqCRJBoI48DAQE X-IPAS-Result: A2HmBwA/zcJa/06mSC1dGgEBAQEBAgEBAQEIAQEBAYMTL4FQgz2EaZBhgXQTfJRNC4UEAoQzITcVAQIBAQEBAQECA2gohSYBBAF5BQsLDScSFBhfhGoIsAEaAogmgiWHYYIThBCFO4UIApc6CI9ehgEihGSHJohXgSUyI4FSMxoIMDqCRJBoI48DAQE X-IronPort-AV: E=Sophos;i="5.48,398,1517893200"; d="scan'208";a="25817752" Original-Received: from unknown (HELO fmsmemgm.homelinux.net) ([45.72.166.78]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Apr 2018 20:41:12 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C5713AE27B; Mon, 2 Apr 2018 20:41:11 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon, 02 Apr 2018 19:54:28 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144821 Archived-At: > The main problem being that undo-in-region (as well as > erc-update-undo-list, incidentally) needs not just to know which part of > the buffer is modified and with which DELTA, but it also needs to be > able to create a new entry to apply the same change at another > buffer position. I think the easiest solution for that is to somehow pass BEG to the function so that the function can be made "position independent". The easiest way to do that without changing the format is to probably move point to BEG before calling the function (and to document the fact that the function should not bake-in the values of BEG and END but should instead assume that point is the beginning of the area that should be modified). Stefan