From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: bug#11774: bug#11774: bug#11774: org-mode causes undo boundaries to be lost Date: Tue, 3 Jul 2012 11:13:07 -0700 Message-ID: References: <20120703095729.GA6651@c3po> <4FF30D50.8010009@os.inf.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm7i3-0006mK-OJ for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 14:20:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm7i0-0008J1-72 for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 14:20:23 -0400 Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-Message-ID: In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Stefan Monnier Cc: Bastien , Martin Pohlack , Toby Cubitt , 11774@debbugs.gnu.org On 7/3/12, Stefan Monnier wrote: > Indeed, self-insert-command used to be treated specially by the > read-eval-loop and the merging was performed there. Now this command is > handled like any other, and self-insert-command does the merging itself. > In most cases the result is the same, but the behavior is not quite > identical in the details. Here is the way I understand it: There are two problems with self-insert-command now, while before there was only one. The first is that it hardcodes the clustering by 20. As it happens, I strongly prefer clustering by 1. That is, I do not want undo to jump around or type more than necessary. I just want to autorepeat undo (C-/) until I get to where I need to be. Otherwise it is far too jerky and unpredictable and you have to type more either to delete (if you didn't undo far back enough) or add (if you undid too far). This was possible to work around before Emacs 24. You could advise self-insert-command or wrap it. This is why Org was able to control this with a variable to support clustering or not clustering. What is new in Emacs is that self-insert-command now destroys undo-boundary. If you wrap it, it destroys all of your effort on the next call to it. This causes subtle issues such as Org and undo-tree are dealing with. It is not reasonable to work around this because of the extra functionality you need to implement (especially if you want Org to do speed commands, table operations, and tag padding, which, who doesn't?). Unlike before, changing a hardcoded number or undo-boundary and then recompiling Emacs is necessary if you want to fix it. :( The loss of this ability to configure the cluster amount, and the subtle bug introduced, IMO merit a reversion or a fix to Emacs self-insert-command. Even just turning that magic 20 number into a variable would help. At least that's my understanding. I am just a user and I am not familiar with the internals. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com