From: Toby Cubitt <tsc25@cantab.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Barry OReilly <gundaetiapo@gmail.com>, emacs-devel@gnu.org
Subject: Re: Integration of undo-tree in Emacs
Date: Thu, 29 May 2014 18:42:10 +0100 [thread overview]
Message-ID: <20140529174210.GA19232@c3po.maths.private.cam.ac.uk> (raw)
In-Reply-To: <jwvlhtll5l4.fsf-monnier+emacs@gnu.org>
On Wed, May 28, 2014 at 10:08:08PM -0400, Stefan Monnier wrote:
> > Toby, are there other reasons undo-tree needs to transfer undo
> > elements from the buffer-undo-list to its own data model?
>
> Toby's position is that the undo data should be kept as a tree, not as
> a list. That makes a lot of sense: For every branch in a tree, the
> undo-list keeps 2 bundles (one going forward and the other going back),
> but one of the two is always redundant, so the representation
> is inefficient. Of course, this inefficiency only applies to the
> *branches*, i.e. only for those elements generated by `undo', so this is
> irrelevant as long as most of the changes are not undos.
Just to be clear, I'm not strongly advocating changing Emacs' undo data
structures. I'm just pointing out that *if* you're going to make
substantial changes to the undo system for other reasons, you might as
well consider whether changing the data structures would be useful too.
I can see a number of arguments against changing Emacs' undo model, not
least that `buffer-undo-list' is documented in the Elisp manual so is
part of the Elisp API that packages may rely on. (I very occasionally get
reports that undo-tree is incompatible with some package, for this
reason.)
Toby
--
Dr T. S. Cubitt
Royal Society University Research Fellow
Fellow of Churchill College, Cambridge
Centre for Quantum Information
DAMTP, University of Cambridge
email: tsc25@cantab.net
web: www.dr-qubit.org
next prev parent reply other threads:[~2014-05-29 17:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 19:38 Integration of undo-tree in Emacs Barry OReilly
2014-05-28 22:14 ` Toby Cubitt
2014-05-29 2:57 ` Barry OReilly
[not found] ` <20140529180441.GA12623@c3po.maths.private.cam.ac.uk>
2014-05-30 14:40 ` Barry OReilly
2014-06-02 10:57 ` Toby Cubitt
2014-06-02 16:24 ` Barry OReilly
2014-06-02 21:23 ` Toby Cubitt
2014-05-29 2:08 ` Stefan Monnier
2014-05-29 17:42 ` Toby Cubitt [this message]
2014-05-30 12:00 ` Barry OReilly
2014-05-30 16:01 ` Stefan Monnier
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=20140529174210.GA19232@c3po.maths.private.cam.ac.uk \
--to=tsc25@cantab.net \
--cc=emacs-devel@gnu.org \
--cc=gundaetiapo@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=toby-dated-1402594936.a1521f@dr-qubit.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).