emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: AW: New undo element (fun . args)


From: Stefan Monnier
Subject: Re: AW: AW: New undo element (fun . args)
Date: Mon, 07 Feb 2005 12:37:57 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> Yes, that's right, so my statement was i simplification, i admit:
> IMHO a message in the echo-area is not eye-catching (or something else ;-)
> enough, to protect me really against this - when i want to undo some
> things i often hit the undo-keybinding very fast in sequence so i have
> really no chance to see when the echo-reports what you say and then stop
> my undoing - no chance.

It's indeed very discrete.

> Hmm, maybe there is no undo-behavior available which satisfies all people
> of the world and maybe this is really often a matter of taste or habit but
> for your experiment sounds very interesting - interesting enough so
> i would ask for an option where i can switch on this behavior (it would be
> very ok for me, if then default value would switch off this behavior - all
> what i want - and a lot of other Emacser i know ;-) - is the possibility
> to get an undoing which can be intuitively (or lets call it simpler - i'm
> up for it) being used than the current one...

That's my plan, but post-Emacs-NN.MM.

> a tree? really? That's indeed new for me - does the Emacs-manual explain me
> this tree in an understandable way?...let's have a look...

I doubt it does.  The root of the tree is the file as it was when you opened
it.  Every modification grows the tree downward.  An undo backtracks up the
tree towards the root and subsequent modifications grow another branch.
A redo goes back down some branch.

Emacs's undo-list doesn't keep the tree "as a tree" but as a list of steps
that walk around in the tree, up and down branches, sometimes repetitively.
To implement undo-only I had to supplement this data with some extra info
that recovers some of the info about the tree structure.

> I have tried this and have to say that this simply not true. I have deleted
> some regions from a buffer an d inserted some text and then i called undo
> in a infinite sequence and never Emacs stops undoing - i could do this until
> i get black-colored (a german phrase, i could also write "...until i die" ;-)

A bug was recently introduced in this regard.  I'm not sure if it's been
fixed yet.  Try it in Emacs-21.3 to see that the manual isn't lying.

> IMO i found this mechanism very clumsy that i have to call some "harmless"
> command (which i don't need in this moment) to "break" the undoing and
> can redoing now my undos....

It usually works fine, but yes, sometimes it is annoying.  In most cases you
just have to use one of those harmless commands to break the sequence, which
is just that bad.  But when you involuntarily break the undo sequence with
a "harmless" command, you can't pickup your undo where you left it: you have
to first undo you undos, then redo them.
This is another part of the interface to `undo' which I intend to refine.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]