unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Toby Cubitt <toby-undo-tree-dated-1342604439.652ef7@dr-qubit.org>
To: Samuel Wales <samologist@gmail.com>
Cc: Bastien <bzg@gnu.org>, Martin Pohlack <mp26@os.inf.tu-dresden.de>,
	11774@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	[thread overview]
Message-ID: <20120704094036.GA23683@c3po> (raw)
In-Reply-To: <CAJcAo8ujDHZU2xiPh8hnaXgO1m_-cf2tcA6B_LWj-3YczJRzAA@mail.gmail.com>

On Tue, Jul 03, 2012 at 05:18:50PM -0700, Samuel Wales wrote:
> On 7/3/12, Stefan Monnier <monnier@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@cantab.net
web:   www.dr-qubit.org





  parent reply	other threads:[~2012-07-04  9:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-24 21:27 bug#11774: org-mode causes undo boundaries to be lost Toby Cubitt
2012-06-24 21:39 ` Bastien
2012-06-24 21:52   ` Toby Cubitt
2012-06-25 11:35     ` Toby Cubitt
2012-07-02  6:51       ` bug#11774: [O] " Martin Pohlack
2012-07-03  9:57         ` Toby Cubitt
2012-07-03 15:18           ` Martin Pohlack
2012-07-03 17:29             ` Stefan Monnier
     [not found]             ` <jwvpq8coitq.fsf-monnier+emacs@gnu.org>
2012-07-03 18:13               ` bug#11774: [O] bug#11774: " Samuel Wales
2012-07-03 22:57                 ` Stefan Monnier
2012-07-04  0:18                   ` Samuel Wales
2012-07-04  0:24                     ` bug#11774: [O] bug#11774: " Samuel Wales
2012-07-04  9:40                     ` Toby Cubitt [this message]
2012-07-18 13:21                     ` bug#11774: [O] " Stefan Monnier
     [not found]                     ` <jwvpq7t1a4t.fsf-monnier+emacs@gnu.org>
2012-08-01 14:26                       ` bug#11774: " Bastien
     [not found]                       ` <CAJcAo8ux9Dw5Nu6x0jm59mWFaLWFG6SSeMs9dju-Jgy5nWkUcA@mail.gmail.com>
2014-11-03 14:35                         ` bug#11774: [O] " Stefan Monnier
2012-07-03 18:33       ` bug#11774: [O] " Martin Pohlack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120704094036.GA23683@c3po \
    --to=toby-undo-tree-dated-1342604439.652ef7@dr-qubit.org \
    --cc=11774@debbugs.gnu.org \
    --cc=bzg@gnu.org \
    --cc=mp26@os.inf.tu-dresden.de \
    --cc=samologist@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).