From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs undo behavior frustrating for new users. Date: Sun, 14 Oct 2018 14:42:26 -0400 Message-ID: References: <0CCFABF4-0F2B-4DAA-9C8E-11E1254A325E@gmail.com> <87woqka4wg.fsf_-_@red-bean.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1539542441 18977 195.159.176.226 (14 Oct 2018 18:40:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 14 Oct 2018 18:40:41 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 14 20:40:37 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 1gBlJc-0004sH-6z for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2018 20:40:36 +0200 Original-Received: from localhost ([::1]:49214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBlLi-0006lu-HG for ged-emacs-devel@m.gmane.org; Sun, 14 Oct 2018 14:42:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBlLb-0006ll-DY for emacs-devel@gnu.org; Sun, 14 Oct 2018 14:42:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBlLY-0005gu-AZ for emacs-devel@gnu.org; Sun, 14 Oct 2018 14:42:39 -0400 Original-Received: from [195.159.176.226] (port=37373 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBlLY-0005gJ-3O for emacs-devel@gnu.org; Sun, 14 Oct 2018 14:42:36 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gBlJN-0004dy-JP for emacs-devel@gnu.org; Sun, 14 Oct 2018 20:40:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:5juuAlov+zH1EF3rUgRUD7UMw3k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:230387 Archived-At: > Here is an answer from my friend Noel, who was recently a new user of Emacs. > (He still uses Emacs, he's just no longer a new user.) When I saw your > question above, I remembered Noel's frustration with Emacs's default undo > behavior when he was learning Emacs, and I asked him if he'd be willing to > write it up. BTW, Emacs does provide the "usual" undo command under the name `undo-only` (it only affects the way Emacs traverses the undo history, not the way the undo history is built, so it can be mixed with Emacs's traditional `undo` just fine). We could also provide a corresponding `undo-redo` command, which similarly only performs redo actions. >> The other behavior that can be confusing to new users of emacs is >> that if the user is in the process of "undoing" to an earlier point >> in the action history, the act of moving the cursor (for example, >> with the arrow keys) will interrupt the undo sequence even though no >> change has been made to the contents of the buffer. I've been using here a patch which makes `undo` query the user when this happens. More specifically, if you call `undo` when the last buffer modification was itself an undo but the last command was not an undo, it prompts the user asking where they want to continue undoing. Stefan