emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Toby Cubitt
Subject: [O] bug#11774: bug#11774: bug#11774: org-mode causes undo boundaries to be lost
Date: Wed, 4 Jul 2012 11:40:37 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jul 03, 2012 at 05:18:50PM -0700, Samuel Wales wrote:
> On 7/3/12, Stefan Monnier <address@hidden> wrote:
> >> self-insert-command.  Even just turning that magic 20 number into a
> >> variable would help.
> >
> > Providing it as a variable would be very easy, indeed.
>
> Therefore, IF we have that variable, then undo-boundary considerations
> should be simply to DTRT for undo-tree, org-self-insert-command,
> and other code, in such a way that subtle bugs are prevented.

Just to clarify the situation with undo-tree: it doesn't care how or when
undo boundaries are inserted, and never did. The problem was only that
undo boundaries that had nothing to do with self-insert-command were
being *deleted*, due to the subtle interaction between the new Emacs-24
self-insert-command and org-mode's org-self-insert-cluster-for-undo
feature.

I've already pushed a change to the git version of undo-tree to make it
work even if something else deletes undo boundaries that it shouldn't
have touched (e.g. org-mode + Emacs-24). Deleting boundaries that have
nothing to do with self-insert-command is still a bug, in my opinion, but
it's a bug that no longer has catastrophic consequences in
undo-tree-mode.

It sounds from the preceding discussion that the right solution is simply
to disable org-self-insert-cluster-for-undo in Emacs-24, since the
purpose of org-mode's clustering was to recover the normal clustering
behaviour and the standard self-insert-command clustering now works in
org-mode with Emacs-24.

The question of how to customize the clustering granularity seems to me
to be a separate question (which can presumably be solved by making the
hard-coded 20 into a variable).

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: address@hidden
web:   www.dr-qubit.org





reply via email to

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