[Top][All Lists]

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

RE: make undo operate as in (no flames please) vim

From: Drew Adams
Subject: RE: make undo operate as in (no flames please) vim
Date: Sun, 25 Jan 2009 11:29:02 -0800

> IMO (this whole post is IMO) the single most confusing aspect of emacs
> in practice for old and new users alike -- although some people are
> amazingly not at all confused by it -- is undo.
> More generally, many commands have no good provision for overshooting.
> This applies to mark cycling, global mark cycling, and many other
> things.  Most of them provide a ring instead of forward and backward
> commands.

You seem to open a different topic here: IIUC, you're proposing backward, as
well as forward commands for (at least some) places where Emacs currently uses
rings. How about starting a separate thread for that?

> But undo provides a mechanism that is simple in principle
> but impossible (for probably the vast majority of users) in practice.
> And that's the "just undo the undo" problem.

I have no idea whether that is true, but I would doubt it, based on Emacs users
I've known over the years (anecdotal evidence, admittedly). There are no doubt
some Emacs users for whom undo is " practice", but my guess would
be that it is a minority of users.

Still, there's no reason those unhappy undoers shouldn't have an undo behavior
more suited to them. Perhaps the right undo for them remains to be written, or
perhaps there is already something out there for them - dunno.

The approach with Emacs, when it's thought that things could be done better, is
typically to change its behavior via some personal code. Later, if there is a
strong push from others to change the default behavior to that experimental
behavior, Emacs developers would hopefully do that. But typically, if the two
behaviors are quite different, there would be some users who still prefer the
older default behavior, and typically there would be a way for them to continue
to use it.

IOW, Emacs generally allows multiple alternative behaviors - different strokes
for different folks.

In this case, it sounds like you haven't yet found the right undo behavior for
you (and perhaps others). If none satisfactory exists yet, then I think the only
recourse is to write one. Not necessarily you, but probably someone among the
"vast majority" of unhappy undoers. Users who are happy with vanilla undo are
less likely to write a better/different one.

> In other words, there are many commands that don't allow you to go
> forward if you overshoot going backward. In all cases, I believe
> that forward and backward commands would be easier for most users.

That's suitable for a different thread, IMO.

> (Drew, you're probably itching to mention Icicles here :), but I'm
> referring to vanilla emacs here, and want to talk about that only,
> since not everybody uses Icicles.  I still don't, for several reasons,
> despite its nice aspects.)


That would be for your thread replace-fwd-only-rings-by-fwd-+-backward-cmds, in
any case. Icicles doesn't try to enhance undo in any way.

> Consider the arrow keys.  To go forward, (or down), you just press the
> key.  You are *not* asked to press backward (or up) until it wraps
> around, as you are with the mark ring and the global mark ring.
> And you *not* asked to "just go backward on the backward" by pressing
> the key until you overshoot, then pressing another key, then pressing
> the key again a bunch of times until you undo the overshoot.
> You just press the key!

Other thread.

> redo.el corrupts the buffer.  It is not suitable to include in emacs
> until that bug is fixed.

I know nothing about `redo.el', but if you want to discuss its failings, please
be more specific. That description doesn't mean much, at least to me (but again,
I'm not familiar with `redo.el').

What I take away from that statement is that `redo.el' doesn't solve the undo
problem, as you see it.

Someone else suggested it might. Dunno if `redo.el' should be discussed here or
just dismissed. Maybe it DTRT for some people; maybe there is more than one camp
of those for whom Emacs undo is unsatisfactory. The different preferences might
be worth exploring (or not).

> But I think that emacs would be greatly improved if all current and
> future movement commands like mark ring, global mark ring, and undo
> list, had forward and backward. This, I think, would please old and
> new users alike.

Other thread.

> Except for the supermen who have no problem using undo the 
> way it is.  :)

Now we're back to undo. I don't expect that Emacs undo is for everyone, but my
experience is that users who find its behavior helpful and have no problem with
it are not necessarily supermen. I've seen many, many, many novice users and
non-supermen users get along fine with undo. YMMV, but if it doesn't suit you
it's not because you're not a superman. ;-)

reply via email to

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