From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: An idea: combine-change-calls Date: Fri, 30 Mar 2018 11:12:37 +0200 Message-ID: <87zi2qkjui.fsf@gnu.org> References: <20180324135024.GA6319@ACM> <20180325191424.GE6292@ACM> <20180326201728.GA28620@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522401088 29869 195.159.176.226 (30 Mar 2018 09:11:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2018 09:11:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 30 11:11:24 2018 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 1f1q4B-0007gJ-OX for ged-emacs-devel@m.gmane.org; Fri, 30 Mar 2018 11:11:23 +0200 Original-Received: from localhost ([::1]:46146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1q6F-0004TH-Bg for ged-emacs-devel@m.gmane.org; Fri, 30 Mar 2018 05:13:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1q5Y-0004Sl-E6 for emacs-devel@gnu.org; Fri, 30 Mar 2018 05:12:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1q5T-0004P8-Gt for emacs-devel@gnu.org; Fri, 30 Mar 2018 05:12:48 -0400 Original-Received: from ns57.manufrog.com ([98.142.98.3]:36317 helo=manu26.manufrog.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f1q5T-0004OR-CC for emacs-devel@gnu.org; Fri, 30 Mar 2018 05:12:43 -0400 Original-Received: from c-bb05e555.04-211-6c6b701.cust.bredbandsbolaget.se ([85.229.5.187]:59482 helo=muon.localdomain) by manu26.manufrog.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1f1q5P-0004xA-OT; Fri, 30 Mar 2018 11:12:40 +0200 Original-Received: by muon.localdomain (Postfix, from userid 1000) id AF4304841A6; Fri, 30 Mar 2018 11:12:37 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Mon, 26 Mar 2018 17:07:40 -0400") X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - manu26.manufrog.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gnu.org X-Get-Message-Sender-Via: manu26.manufrog.com: authenticated_id: noreply@tryserumgardar.se X-Authenticated-Sender: manu26.manufrog.com: noreply@tryserumgardar.se X-Source: X-Source-Args: X-Source-Dir: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 98.142.98.3 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:224175 Archived-At: Stefan Monnier writes: >> I'm experimenting with a different strategy: surrounding the mass of >> elements in buffer-undo-list with a `(combine-change-begin ,beg ,end) >> and a `(combine-change-end ,beg ,end). > > Beware: this changes the format of entries that can appear in the > buffer-undo-list, which has repercussions beyond primitive-undo, IOW it > can/will break other things such as undo-in-region and undo-tree. But the `(apply ...)' forms are a problem for exactly these other things. It's too powerful. The packages that manipulate buffer-undo-list can't (and don't try to) handle `apply' properly, since it can contain arbitrary effects. > Better use the (apply DELTA BEG END FUN-NAME . ARGS) form, which was > introduced specifically for use of such extensions.