bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11774: [O] bug#11774: bug#11774: org-mode causes undo boundaries to


From: Samuel Wales
Subject: bug#11774: [O] bug#11774: bug#11774: org-mode causes undo boundaries to be lost
Date: Tue, 3 Jul 2012 11:13:07 -0700

On 7/3/12, Stefan Monnier <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]