From: Toby Cubitt <toby-dated-1341784362.70a4d9@dr-qubit.org>
To: Bastien <bzg@gnu.org>
Cc: 11774@debbugs.gnu.org
Subject: bug#11774: org-mode causes undo boundaries to be lost
Date: Sun, 24 Jun 2012 23:52:41 +0200 [thread overview]
Message-ID: <20120624215241.GA6205@c3po.home> (raw)
In-Reply-To: <87395kcrur.fsf@gnu.org>
On Sun, Jun 24, 2012 at 11:39:08PM +0200, Bastien wrote:
> Hi Toby,
>
> Toby Cubitt <tsc25@cantab.net> writes:
>
> > For some unknown reason, org-mode is causing the undo boundary between
> > the (2 . 4) and (1 . 2) entries to be removed from `buffer-undo-list'.
>
> Can you try again with
>
> (setq org-self-insert-cluster-for-undo nil)
>
> and report?
Yup, that fixes the problem.
I don't fully understand the purpose of
`org-self-insert-cluster-for-undo', given that the Emacs command loop
already groups consecutive undo entries together, but presumably it
enables a more aggressive form of clustering.
If the behaviour I reported is the intended behaviour with this option
set, perhaps the clustering heuristic can be improved to avoid triggering
history discarding in undo-tree-mode?
undo-tree-mode puts a "canary" at the end of buffer-undo-list, to detect
when Emacs discards undo history behind undo-tree-mode's
back. I.e. before any undo entries have been added, buffer-undo-list
contains:
(nil undo-tree-canary)
org-mode's undo clustering deletes the undo boundary before the
undo-tree-canary entry, causing undo-tree-mode to think that Emacs has
discarded undo history behind its back.
I could try to work around this in undo-tree-mode, but it seems to me
that org-mode shouldn't be throwing away an undo boundary that comes
before an entry which definitely shouldn't be clustered with anything
(namely the undo-tree-canary symbol, which is meaningless to org-mode).
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
next prev parent reply other threads:[~2012-06-24 21:52 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 [this message]
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 ` bug#11774: [O] " Toby Cubitt
2012-07-18 13:21 ` 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=20120624215241.GA6205@c3po.home \
--to=toby-dated-1341784362.70a4d9@dr-qubit.org \
--cc=11774@debbugs.gnu.org \
--cc=bzg@gnu.org \
/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).