GNU bug report logs - #11774
org-mode causes undo boundaries to be lost

Previous Next

Packages: org-mode, emacs;

Reported by: Toby Cubitt <tsc25-dated-1341782875.1f08d8 <at> cantab.net>

Date: Sun, 24 Jun 2012 21:32:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Toby Cubitt <toby-undo-tree-dated-1342604439.652ef7 <at> dr-qubit.org>
To: Samuel Wales <samologist <at> gmail.com>
Cc: Bastien <bzg <at> gnu.org>, Martin Pohlack <mp26 <at> os.inf.tu-dresden.de>, Stefan Monnier <monnier <at> iro.umontreal.ca>, 11774 <at> debbugs.gnu.org
Subject: bug#11774: [O] bug#11774: bug#11774: org-mode causes undo boundaries to be lost
Date: Wed, 4 Jul 2012 11:40:37 +0200
On Tue, Jul 03, 2012 at 05:18:50PM -0700, Samuel Wales wrote:
> On 7/3/12, Stefan Monnier <monnier <at> iro.umontreal.ca> 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: tsc25 <at> cantab.net
web:   www.dr-qubit.org




This bug report was last modified 10 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.