From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23542 invoked by alias); 6 Jul 2015 11:52:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35701 Received: (qmail 27152 invoked from network); 6 Jul 2015 11:52:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1436183186; bh=A4kt89SQb2EoxdkSMXlMYk7APWRev2zJ5KLRXv1cPMU=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=TLJZt3KHHp0O+UPNOacqO7kM1IgcNyr/Yhda6aos/airj1OjusZ4NYalFFHxqJnR3U0XYicZTXexV/rnkedkmw6Qt/T5sy5lsBCCy7nER78WlWhXlI/gOyx7vrCiGax7TEOuBZLKGRaHEwzpArVQ7h3aWG/iFakr9qzrGAT41pviqEJVRGShkmcf7rzUsdP5e1Zmds3cX91RVIVeGMszbLF0leCnhMs5pIbI0+7tRJxzu3wYeh9BBIaDsx7YWk58j4Ila8NIqvKZbcYq3Bi/RcpBxRE31aPjHElWZUuNtA0xMT/Eltds/1SAn7MVV3m3pYE0IWlibX/vX07JO+1+qw== X-Yahoo-Newman-Id: 957128.20091.bm@smtp123.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: u_qK5.cVM1mBG4Zmbf5OYdBgi3x.2Vgl0uKsFk7fFV.5hsG Tj2M0HBJPwTsRVP5XQCnenLSdl7Z0x8ngRRRSQuNOMuNxn0YvXNWz1AmMnVr .6kchG0Rnn4ZQn9w7EN6wK1FpGfibLxPWJujnL_bIPYz4SfLcoz2ZBsqESbp NHd0MT0Fb.SsWtxAx0RNdqCxPbKfGwsBlcEOqdZt149_9vUzzpiX2vP7cKzb KA7UaphyffHsjE0TKNEAuLQ_TnsquGdR0CbtIphiMPGRg.loiyTYpKJ9o436 Wo9TOAfoMCWnAh5QyzRmQtH5lyz.W7SY3uj6Kif.DA1dWwMFnFqGuzEwHAXs YV1agHd3kTXOUNgo.MNIBZf.5t7hd3B4Cc_frluZGW.Vjk32meEXjts5.zg5 77U_tM4pnSsKyr2PyfIYEXumXgXr4R_o.WKg81geeJw3szFOJhwZHn1887f5 9_DfIXMoENq7b5dbvPlaMu21rndrZtPx47rZBg98CDMnTo_cAQ8.w9P_hGs. ZPOjgblyCDPNvD2vCsz8GtFj5zAbWAA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20150706093957.33d9cb25@pwslap01u.europe.root.pri> From: Oliver Kiddle References: <8242.1435937191@thecus.kiddle.eu> <20150706093957.33d9cb25@pwslap01u.europe.root.pri> To: Zsh workers Subject: Re: Undo is also confused with narrow-to-region MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4899.1436183185.1@thecus.kiddle.eu> Date: Mon, 06 Jul 2015 13:46:25 +0200 Message-ID: <4900.1436183185@thecus.kiddle.eu> Peter wrote: > > Would it be possible to implement some kind of 'zle push-undo-stack' > > and 'zle pop-undo-stack'? If you push it you would get a whole new > > instance of undo, and popping it then throws all those entries away > > again. I can't really think of an instance outside recursive-edit > > where it would be useful, though. > > You can already basically do this: see read-from-minibuffer. > > integer changeno=$UNDO_CHANGE_NO ... > zle undo $changeno That prevents redoing minibuffer changes from the main editor but doesn't stop you undoing main editor changes within the minibuffer. It might be sufficient to mark the current undo state as a point beyond which an undo will not go unless passed a change number as a parameter. Or should we do that directly from recursive-edit? Oliver