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: Mon, 02 Apr 2018 19:52:15 +0200 Message-ID: <877epp338w.fsf@gnu.org> References: <20180324135024.GA6319@ACM> <20180325191424.GE6292@ACM> <20180326201728.GA28620@ACM> <87zi2qkjui.fsf@gnu.org> <20180402162557.GA16027@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522691428 6287 195.159.176.226 (2 Apr 2018 17:50:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 17:50:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 02 19:50: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 1f33b5-0001WO-Nx for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 19:50:23 +0200 Original-Received: from localhost ([::1]:52136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f33d9-0005ns-IR for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 13:52:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f33d2-0005nT-Jd for emacs-devel@gnu.org; Mon, 02 Apr 2018 13:52:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f33cy-0004RI-Nq for emacs-devel@gnu.org; Mon, 02 Apr 2018 13:52:24 -0400 Original-Received: from ns57.manufrog.com ([98.142.98.3]:58642 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 1f33cy-0004R5-JD for emacs-devel@gnu.org; Mon, 02 Apr 2018 13:52:20 -0400 Original-Received: from c-bb05e555.04-211-6c6b701.cust.bredbandsbolaget.se ([85.229.5.187]:50440 helo=muon.localdomain) by manu26.manufrog.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1f33cu-0004aL-0u; Mon, 02 Apr 2018 19:52:17 +0200 Original-Received: by muon.localdomain (Postfix, from userid 1000) id 1475A4841B0; Mon, 2 Apr 2018 19:52:15 +0200 (CEST) In-Reply-To: <20180402162557.GA16027@ACM> (Alan Mackenzie's message of "Mon, 2 Apr 2018 16:25:57 +0000") 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:224250 Archived-At: Alan Mackenzie writes: > On Fri, Mar 30, 2018 at 09:04:06 -0400, Stefan Monnier wrote: > >> So, AFAIK it's handled properly by undo itself, undo-tree, and >> undo-in-region. Which "package that manipulate buffer-undo-list" are >> you thinking of? > > Actually, undo-in-region is problematic. Aside from undo-elt-in-region > (see above), which is easy to fix, there is undo-adjust-elt "Return > adjustment of undo element ELT by the undo DELTAS list.", which can't > adjust the contents of an (apply ...) element, since it doesn't know the > internal structure of each type of (apply ...). In this sense, (apply > ...) is indeed too powerful. Yes. Another example is ERC (see erc-update-undo-list). Since only the user's current input at the prompt should be undo-able, undo recording is enabled for user edits but suppressed for process output (which can happen concurrently). All positions in buffer-undo-list need to be adjusted when process output moves the prompt.