From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: Re: Emacs undo behavior frustrating for new users. (WAS: delete-selection-mode as default) Date: Mon, 15 Oct 2018 09:54:03 +0200 Message-ID: <87sh17prvo.fsf@fastmail.fm> 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; format=flowed X-Trace: blaine.gmane.org 1539589972 28017 195.159.176.226 (15 Oct 2018 07:52:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 15 Oct 2018 07:52:52 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 26.1.50 Cc: Noel Taylor , Richard Stallman , Bingo , emacs-devel@gnu.org To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 15 09:52:47 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 1gBxgE-00079p-GX for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2018 09:52:46 +0200 Original-Received: from localhost ([::1]:50870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBxiL-0006AU-32 for ged-emacs-devel@m.gmane.org; Mon, 15 Oct 2018 03:54:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBxhf-0006AO-4h for emacs-devel@gnu.org; Mon, 15 Oct 2018 03:54:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBxhb-00066C-Ba for emacs-devel@gnu.org; Mon, 15 Oct 2018 03:54:15 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49909) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gBxhb-00064c-4M; Mon, 15 Oct 2018 03:54:11 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1402721F1C; Mon, 15 Oct 2018 03:54:09 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 15 Oct 2018 03:54:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm1; bh=F0wZuTlDZ7UA1QK7xCGk504wgs FFuDjvj8RaZb4b+go=; b=vFlUDZVGuN5vZ0nFyr+ahX/H/pBf4Z5wEt7lJWy7sO sBZyHFD0SOheXRIXaOHTOZvvhiVPFGxpWXYJOtOn1irYTqjxIsxeGbVq0SjYAqEt Obaacix3PYHbmSasrnv13miDX0HOiJFXAOofL1cGHdP3V4HQhAHa28v8kBIwJZI+ f9cJOBR60MYPlYTRtTEEc1AwqaM8HDGASFSR2cHWbyL1jHunw/xYAofISyR/00uA oeAYvK05iTqoE83wnMcZ/DsDVBcfe4Na0b9u27g+ZSNjXp3NuebS2FLqnWkD2p4D iQtMgUO7HiT7OufTX82RL+hxUyUFxDbLOQhFkb7PaQjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=F0wZuT lDZ7UA1QK7xCGk504wgsFFuDjvj8RaZb4b+go=; b=MEGQZmjuOZe/VtwiXWPPko PE+ZQ8kzJQKQRFW1WQRG4HvNaTX0bl5Aj+7+x/BxIn1oO85xYd1POb6JnaD/+NDJ gCVCa63iA1Q3o+LqKGBJ9D/02CgxEF9Xy0cmd5yxdfAsrY55o0iuYpni0QMwanl3 sy013f7oJO3Wzt6N9BXr4CwghkZ1fl4EiEghk4JIAdtRCxwryJ8Wa3ajKO3wPGgG sYov49dWmBcOZoVtxO6wWCZuQN20vj6y8LzDS26UOrjNV+3FCY3uGniiaPqSsHQv X6QNsGtEO8oLTuGd8IHflKhxuqO+q86UmCcfizWW4tpSVI4HKIL4PxxCc0eD/42w == X-ME-Sender: X-ME-Proxy: Original-Received: from IdeaPad.fastmail.com (ip5f5ac90a.dynamic.kabel-deutschland.de [95.90.201.10]) by mail.messagingengine.com (Postfix) with ESMTPA id D5AC4E455C; Mon, 15 Oct 2018 03:54:07 -0400 (EDT) In-reply-to: <87woqka4wg.fsf_-_@red-bean.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 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:230396 Archived-At: On Sun, Oct 14 2018, Karl Fogel wrote: > Richard Stallman writes: >> > 1. Emacs undo is frustrating for most new users. >> >>If that is true, it is an important issue. >>What evidence is there for that statement? >>If so, do we know why it is so? > > 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. Personally, I'm also not very fond of Emacs' standard undo system, even though I appreciate the fact that past states of the buffer don't get lost, unlike the more common MS-Word undo/redo system. It's a little surprising to me, though, that this discussion comes up, because I thought the difficulties of Emacs' undo system for new users are well-known, and moreover, the solution is already on GNU ELPA in the form of the `undo-tree' package: In short, undo-tree gives Emacs the common undo/redo system, but with an Emacs twist: instead of a single, linear, history of changes, in which previously "undone" states are lost when you edit the text in any way, are not lost but stored as separate branches. So the history of changes is not a single, linear line, it's a tree. One path in this tree is current, meaning undo/redo will move over it, but you can switch branches to access states that would have been lost by MS Word. The package comes with a visualiser that shows you the tree and that updates the buffer when you walk it, making it very easy to get back to any state of the buffer's edit history. It also has some other niceties, such as time stamps and diff display. The beauty of the package is that a new user can simply use undo/redo in the way they[1] are familiar with, but the entire power of Emacs' undo system is there when needed. IMvHO `undo-tree' should simply be made the default undo in Emacs. Joost [1] Sorry, Richard! :-) -- Joost Kremers Life has its moments