From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Undo boundary Date: Wed, 08 Dec 2004 16:22:48 +0200 Organization: JURTA Message-ID: <87sm6g7tty.fsf_-_@jurta.org> References: <20041208064957.GF14847@boetes.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102517221 31425 80.91.229.6 (8 Dec 2004 14:47:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2004 14:47:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 08 15:46:50 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cc35d-0006JE-00 for ; Wed, 08 Dec 2004 15:46:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc3FU-0007e2-BB for ged-emacs-devel@m.gmane.org; Wed, 08 Dec 2004 09:57:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cc3FJ-0007bZ-L3 for emacs-devel@gnu.org; Wed, 08 Dec 2004 09:56:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cc3FI-0007as-EY for emacs-devel@gnu.org; Wed, 08 Dec 2004 09:56:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cc3FI-0007ai-8I for emacs-devel@gnu.org; Wed, 08 Dec 2004 09:56:48 -0500 Original-Received: from [194.126.101.111] (helo=MXR-3.estpak.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cc35H-0006xC-BR for emacs-devel@gnu.org; Wed, 08 Dec 2004 09:46:27 -0500 Original-Received: from jurta.org.jurta.org (80-235-39-106-dsl.mus.estpak.ee [80.235.39.106]) by MXR-3.estpak.ee (Postfix) with ESMTP id D4AC7CF53E; Wed, 8 Dec 2004 16:46:23 +0200 (EET) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Wed, 08 Dec 2004 08:17:34 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at neti.ee 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 Xref: main.gmane.org gmane.emacs.devel:30863 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30863 Stefan Monnier writes: >> It would be nice if the undo history would recognize that: >> "any char" >> followed by >> m-x delete-backward-char > >> Is functionally the same as. > >> "any char" >> followed by >> m-x undo > >> I admit it's easier said than done. > > What would be the benefit? > I.e. in which cases would it make a diference? It seems OP refers to the fact that `command_loop_1' has the built-in constant value 20 for undo-boundary of self-inserting characters. It makes sense to make it configurable. Often `undo' undoes too much characters than needed. To get them back, the user has to break the undo chain, redo undoing of the last 20 characters, and to start to delete the needed amount of characters with delete-backward-char. This is too inconvenient and also breaks the undo history unnecessarily. Users with high keyboard repeat rate would prefer to change this value to 1, press C-_ key, and hold it while `undo' undoes characters one at a time. However, this is useful only for the last inserted characters. It would be a nuisance to undo characters one at a time for earlier character insertions. For them even the value 20 is too small. It is desirable to undo whole blocks of earlier character insertions, not in chunks of 20 characters. -- Juri Linkov http://www.jurta.org/emacs/