From: Barry OReilly <gundaetiapo@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: toby-undo-tree <toby-undo-tree@dr-qubit.org>, emacs-devel@gnu.org
Subject: Re: Integration of undo-tree in Emacs
Date: Fri, 30 May 2014 08:00:40 -0400 [thread overview]
Message-ID: <CAFM41H2QSKwP3r16wuE1AfLM6cgJBwrAgCA2ika1WpuF6G+YFw@mail.gmail.com> (raw)
In-Reply-To: <jwvlhtll5l4.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]
> 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.
Yes, makes sense. So the code wouldn't trim every undo/redo pair but
just those that don't lose information about the other branches that
exist. So if the user goes up and down a branch twice, we only trim
out one round trip.
> Note that the set of reachable nodes is reduced in the same order as
> in the case of undo-tree. The difference is in how these are mapped
> to a tree. To a large extent the difference is in "which node is
> taken to be the root". If you always take "the most recent state"
> as the root of the tree (instead of the oldest), then both
> techniques are "stable" and behave "identically".
You lost me at "the most recent state as the root". If you mean most
recently created, that is a leaf node. If you mean most recently
visited, that is the user's current node and is not necessarily the
root either.
> So A is first in line for truncation followed by E, B, C, D.
My mistake: that should have been A, D, C, B, E. (I think undo-tree's
right-to-left ordering of branches threw me off.)
[-- Attachment #2: Type: text/html, Size: 1422 bytes --]
next prev parent reply other threads:[~2014-05-30 12:00 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
2014-05-30 12:00 ` Barry OReilly [this message]
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=CAFM41H2QSKwP3r16wuE1AfLM6cgJBwrAgCA2ika1WpuF6G+YFw@mail.gmail.com \
--to=gundaetiapo@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=toby-undo-tree@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).