From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: New undo element (fun . args) Date: Mon, 07 Feb 2005 13:25:35 +0100 Message-ID: References: <87fz0jyn19.fsf-monnier+emacs@gnu.org> <87mzunvyki.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107779244 24423 80.91.229.2 (7 Feb 2005 12:27:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Feb 2005 12:27:24 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 07 13:27:23 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cy7z4-0004x8-7S for ged-emacs-devel@m.gmane.org; Mon, 07 Feb 2005 13:27:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cy8DB-0005DW-O3 for ged-emacs-devel@m.gmane.org; Mon, 07 Feb 2005 07:41:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cy8Ct-000599-PF for emacs-devel@gnu.org; Mon, 07 Feb 2005 07:41:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cy8Cp-00057d-M1 for emacs-devel@gnu.org; Mon, 07 Feb 2005 07:41:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cy8Cp-000567-Br for emacs-devel@gnu.org; Mon, 07 Feb 2005 07:41:31 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cy7xY-0006PF-FQ for emacs-devel@gnu.org; Mon, 07 Feb 2005 07:25:44 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1Cy7uC-0003U4-PD; Mon, 07 Feb 2005 07:22:17 -0500 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Mon, 07 Feb 2005 12:51:03 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32999 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32999 storm@cua.dk (Kim F. Storm) writes: > storm@cua.dk (Kim F. Storm) writes: > >>> In what way does the undo process fail to work? Where is the >>> bug? >> >> I'm not sure it is a bug in the undo machinery or the way I try to >> use it in cua, or a combination... > > I have installed change to cua to use the new undo apply element. > > The problems reported earlier were just errors in my code. > > It turned out to be quite tricky to get the usage right as an apply > function need to install a proper _redo_ entry which may not really > do anything but re-install the original _undo_ entry etc. > > > I also changed primitive-undo to install at most one dummy apply > element. A _lot_ of people are annoyed at the way `undo' also redos things. For that reason, a package redo.el exists, and people get told about it frequently on Emacs lists and groups. I consider it likely that with the new changes, this package will no longer work. I also have detected the variable undo-no-redo (not customizable, though) which wouls appear from its name and description to solve one half of the problem, the remaining half being that an actual redo command working in the opposite direction would be required. Even if we don't find an actual keybinding for that (one could see what redo.el uses), using undo with a negative argument could be used instead. Since we are likely to break redo.el, wouldn't it be sensible to provide the functionality from within Emacs once and for all? It does not seem like much would be missing for implementing this, and one could even make do without an extra keybinding by using negative prefixes to undo. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum