unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, rms@gnu.org, storm@cua.dk
Subject: Re: AW: AW: New undo element (fun . args)
Date: Mon, 07 Feb 2005 12:37:57 -0500	[thread overview]
Message-ID: <877jlkl1p6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <A47B192B0358794C958615D788BF7FB7234383@mucmail1.sdm.de> (klaus berndl's message of "Mon, 7 Feb 2005 17:29:48 +0100")

> 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	other threads:[~2005-02-07 17:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07 16:29 AW: AW: New undo element (fun . args) klaus.berndl
2005-02-07 17:37 ` Stefan Monnier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-02-07 14:49 klaus.berndl
2005-02-07 15:15 ` Stefan Monnier
2005-02-07 16:13   ` Kim F. Storm
2005-02-07 17:26     ` 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=877jlkl1p6.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=storm@cua.dk \
    /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).