unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* AW: AW: New undo element (fun . args)
@ 2005-02-07 14:49 klaus.berndl
  2005-02-07 15:15 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: klaus.berndl @ 2005-02-07 14:49 UTC (permalink / raw)
  Cc: emacs-devel, rms, storm


[-- Attachment #1.1: Type: text/plain, Size: 1044 bytes --]

>Hmm... all the users I know sooner or later asked me about some unexpected
>behavior from `undo' and after I explained to them how it works, they all
>learned to like it.

>Even tho I did mention redo.el as an alternative, none of them ever switched
>to using redo.el, instead they started to complain about other programs not
>having a real undo like Emacs's.

Then these are your experiences with "your" users... but for me an undo is
annoying (and even quite unuseable) which doesn't protect me against
accidentally "undoing some undos" (i.e. with current Emacs-undo i get no
information from Emacs that my undo-action is not really an undo but a redo
of a previous undo - if you understand what i try to say ;-)
And when undoing some steps i often reach a point where i do not know exactly
where i'm in the undo-chain - whereas with redo.el i exactly know when i have
undone all and when there is nothing more to undo - IMHO much more intuitive...
but maybe it#s a matter of taste...

Ciao,
Klaus


        Stefan


[-- Attachment #1.2: Type: text/html, Size: 1593 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AW: AW: New undo element (fun . args)
  2005-02-07 14:49 AW: AW: New undo element (fun . args) klaus.berndl
@ 2005-02-07 15:15 ` Stefan Monnier
  2005-02-07 16:13   ` Kim F. Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2005-02-07 15:15 UTC (permalink / raw)
  Cc: emacs-devel, rms, storm

> Then these are your experiences with "your" users... but for me an undo is
> annoying (and even quite unuseable) which doesn't protect me against
> accidentally "undoing some undos" (i.e. with current Emacs-undo i get no
> information from Emacs that my undo-action is not really an undo but a redo
> of a previous undo - if you understand what i try to say ;-)

Of course I understand what you say.  I worked on this specific part of the
behavior to implement undo-only.  And your remark is not quite true:
the echo area tells you either "Undo!" or "Redo!" depending on whether
you're undoing an undo or not.

Actually my own local Emacs has a further hack such that when `undo' notices
it's actually undoing an undo it asks me whether I want to "redo" or not (if
not, it does what `undo-only' would have done, skipping the redo-undo pair).
This is an experiment and I'm not satisfied with it as it is (it's too
annoying).

> And when undoing some steps i often reach a point where i do not know
> exactly where i'm in the undo-chain - whereas with redo.el i exactly know
> when i have undone all and when there is nothing more to undo -

Yes, redo.el is much more limited and has a much simpler linear model,
whereas Emacs's undo keeps track of a tree of buffer modifications, which is
more difficult to model in your head.

> IMHO much more intuitive...  but maybe it#s a matter of taste...

I wouldn't call it more intuitive, but simpler.


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AW: AW: New undo element (fun . args)
  2005-02-07 15:15 ` Stefan Monnier
@ 2005-02-07 16:13   ` Kim F. Storm
  2005-02-07 17:26     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Kim F. Storm @ 2005-02-07 16:13 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Actually my own local Emacs has a further hack such that when `undo' notices
> it's actually undoing an undo it asks me whether I want to "redo" or not (if
> not, it does what `undo-only' would have done, skipping the redo-undo pair).
> This is an experiment and I'm not satisfied with it as it is (it's too
> annoying).

Ah, that explains this comment in simple.el:

    ;; Check to see whether we're hitting a redo record, and if
    ;; so, ask the user whether she wants to skip the redo/undo pair.


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: AW: AW: New undo element (fun . args)
@ 2005-02-07 16:29 klaus.berndl
  2005-02-07 17:37 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: klaus.berndl @ 2005-02-07 16:29 UTC (permalink / raw)
  Cc: emacs-devel, rms, storm

Stefan Monnier wrote:
>> Then these are your experiences with "your" users... but for me an
>> undo is annoying (and even quite unuseable) which doesn't protect me
>> against accidentally "undoing some undos" (i.e. with current
>> Emacs-undo i get no information from Emacs that my undo-action is
>> not really an undo but a redo of a previous undo - if you understand
>> what i try to say ;-) 
> 
> Of course I understand what you say.  I worked on this specific part
> of the behavior to implement undo-only.  And your remark is not quite
> true: 
> the echo area tells you either "Undo!" or "Redo!" depending on whether
> you're undoing an undo or not.

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 elso ;-) enough,
to protect me really against this - when i want to undo soem 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.

> Actually my own local Emacs has a further hack such that when `undo'
> notices it's actually undoing an undo it asks me whether I want to
> "redo" or not (if not, it does what `undo-only' would have done,
> skipping the redo-undo pair). This is an experiment and I'm not
> satisfied with it as it is (it's too annoying).

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...

> 
>> And when undoing some steps i often reach a point where i do not know
>> exactly where i'm in the undo-chain - whereas with redo.el i exactly
>> know when i have undone all and when there is nothing more to undo -
> 
> Yes, redo.el is much more limited and has a much simpler linear model,
> whereas Emacs's undo keeps track of a tree of buffer modifications,
> which is more difficult to model in your head.

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 found for example this in the manual of 21.3.1:

"... Consecutive repetitions of `C-_' or `C-x u' undo earlier and earlier
changes, back to the limit of the undo information available.  If all
recorded changes have already been undone, the undo command displays an
error message and does nothing."

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" ;-)

and i found 

"... Any command other than an undo command breaks the sequence of undo
commands.  Starting from that moment, the previous undo commands become
ordinary changes that you can undo.  Thus, to redo changes you have
undone, type `C-f' or any other command that will harmlessly break the
sequence of undoing, then type more undo commands...."

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....

Sorry, maybe i'm too stupid but IMHO this is really not intuitive.., and i
found nothing in this description what would lead me to a undo-tree as you
wrote...

> I wouldn't call it more intuitive, but simpler.

Often simpler is better ... ;-)

Ciao,
Klaus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AW: AW: New undo element (fun . args)
  2005-02-07 16:13   ` Kim F. Storm
@ 2005-02-07 17:26     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2005-02-07 17:26 UTC (permalink / raw)
  Cc: emacs-devel

> Ah, that explains this comment in simple.el:

>     ;; Check to see whether we're hitting a redo record, and if
>     ;; so, ask the user whether she wants to skip the redo/undo pair.

Oops!


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AW: AW: New undo element (fun . args)
  2005-02-07 16:29 klaus.berndl
@ 2005-02-07 17:37 ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2005-02-07 17:37 UTC (permalink / raw)
  Cc: emacs-devel, rms, storm

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-02-07 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-07 14:49 AW: AW: New undo element (fun . args) klaus.berndl
2005-02-07 15:15 ` Stefan Monnier
2005-02-07 16:13   ` Kim F. Storm
2005-02-07 17:26     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2005-02-07 16:29 klaus.berndl
2005-02-07 17:37 ` Stefan Monnier

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).