Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

why "undo the undo" is not equivalent to redo

瀏覽次數:14 次
跳到第一則未讀訊息

Samuel Wales

未讀,
2009年11月20日 下午5:51:002009/11/20
收件者:help-gn...@gnu.org
I have had this around for a while. The usual advice from
undoers is that "undo the undo" is sufficient. This offers
a different take, one that you might not have seen. Now
seems a good time to post it.


There are several types of emacs users, including these:

1) (UNDOERS) those for whom "undo the undo" works well
2) (REDOERS) those who would prefer undo-redo

There are several types of undoers, including these:

1) those who want to understand what the redoers are
saying
2) those who understand what the redoers are saying, but
personally do not experience the problem
3) those who are confident that they understand what the
redoers are saying, but actually have no idea

The goal of this post is to turn type 1 into type 2. None
other.

Here is what you can do.

At each place in the history, I want you to copy something,
then paste into another buffer. In other words, your task
is to gather snippets from the undo history together into a
buffer.

Because undo is claimed to do everything that redo does, you
are not allowed to use an external package[1] or write
code to assist. You must use your customary undo settings.

Whenever I say a number below, assume that the true number
is unknown. Imagine a complicated set of edits. You are
simulating a real-life scenario in which you do not know how
many undos are necessary to get to the place you need. So
if I say "go back 50", you can't realistically do c-u 50
c-/. To simulate accurately, undo repeatedly to get to
where you need to go.

Ready?

Go back 50 edits, copy, go back 5 more edits in the original
history from that point, copy, go forward 10 from that
point, copy, go forward 15, copy, go back 15 more, copy, go
back 15 more, copy.

I recommend that you try it in the spirit of empiricism
instead of guessing what will happen.[2] You might find
that undo-the-undo is cognitively burdensome, error prone,
and slow. You might even find that redo could be useful,
even though it will not be useful for you.

Next, read [http://www.emacswiki.org/emacs/CategoryUndo#toc9]
and the intro to [http://www.emacswiki.org/emacs/RedoMode] .
Note that redo mode corrupts the buffer, so it is useless.

Sometimes a type 3 undoer will say things like the
following. I think they are trying to help. At least, I
hope so.

1) "640k[3], I mean undo, is all any Emacs user will
ever need"[4]
2) "why not just use [let me do M-x apropos-variable redo
RET on the assumption that suggesting something almost
at random to you will solve the problem]
undo-no-redo?".[5]
3) "just use redo.el[6]"
4) "you will lose undo history, and therefore, you need
undo-the-undo."[7]

However, I have only aimed at converting type 1 undoers to
type 2. So, although there will be criticism like this, I
think it's irrelevant. I would, of course, be happy to be
proved wrong by a type 1.

Maybe that will help turn type 1 into type 2.

Hope it helps.


Footnotes:

[1] This is similar to red herring #2.

[2] If you desire to respond before trying it, there is
a chance that you are type 3. If you tried it and found
undo-the-undo to be an ideal undo experience, tell me.

[3] I am aware that Gates might not have said that.

[4] Turing tar pit.

[5] Did you try it? It is a curious phenomenon that
people confidently suggest random things anyway. I wonder
what the psychology is. Is it something like "it's not a
problem for me, therefore not a problem for you, therefore
any random suggestion will work for you"? This extends far
beyond emacs and deserves study by experimental social
psychologists. It deserves a name, like the Confident
Random Suggestion Error.

[6] It corrupts the buffer.

[7] Contrary to popular misconception, a redo mechanism
does not have to mean that you lose undo history if you
branch. It is possible to have the entire tree of undos.
The concepts are orthogonal. In fact, undo-the-undo
conflates undo, redo, and branching, while redo does not (it
separates redo from undo). You simply have a command to
choose which branch to take. You can put the branch number
in the mode line. You can even draw a text diagram, much
like git's history diagrams. This is not implemented in the
(buffer-corrupting) redo.el -- but some prefer redo.el
despite that. I have run across detailed descriptions of
this, but it is not necessary to make the point.

--
Q: How many CDC "scientists" does it take to change a lightbulb?
A: You only think it's dark. [CDC has denied ME/CFS for 25 years]
=================================================================
Retrovirus: http://www.wpinstitute.org/xmrv/xmrv_qa.html


David Kastrup

未讀,
2009年11月21日 上午10:11:252009/11/21
收件者:
Samuel Wales <samol...@gmail.com> writes:

> I have had this around for a while. The usual advice from
> undoers is that "undo the undo" is sufficient. This offers
> a different take, one that you might not have seen.

What makes you think that?

> Now seems a good time to post it.

Try undo-only. You might prefer it.

--
David Kastrup

rustom

未讀,
2009年11月21日 上午10:44:412009/11/21
收件者:
On Nov 21, 3:51 am, Samuel Wales <samolog...@gmail.com> wrote:
> I have had this around for a while.  The usual advice from
> undoers is that "undo the undo" is sufficient.  This offers
> a different take, one that you might not have seen.  Now
> seems a good time to post it.

+1

I am not sure I understand your sequence of actions
but I can confirm that after years of using emacs I still find the
undo behavior confusing

Colin S. Miller

未讀,
2009年11月21日 上午11:03:142009/11/21
收件者:
Samuel Wales wrote:
> I have had this around for a while. The usual advice from
> undoers is that "undo the undo" is sufficient. This offers
> a different take, one that you might not have seen. Now
> seems a good time to post it.
>
Samuel,

I use "redo.el". This separates undo and redo into two different functions.

HTH,
Colin S. Miller

Samuel Wales

未讀,
2009年11月21日 上午11:41:582009/11/21
收件者:David Kastrup、help-gn...@gnu.org
Hi David,

On 2009-11-21, David Kastrup <d...@gnu.org> wrote:
> Try undo-only. You might prefer it.

See red herring number 2 in the post that you just replied to :).

Samuel Wales

未讀,
2009年11月21日 上午11:46:382009/11/21
收件者:Colin S. Miller、help-gn...@gnu.org
Hi Colin,

On 2009-11-21, Colin S. Miller <no-spam-...@csmiller.demon.co.uk> wrote:
> I use "redo.el". This separates undo and redo into two different functions.

See red herring number 3 in the post you just replied to :) :) :).

stan

未讀,
2009年11月21日 晚上10:00:552009/11/21
收件者:
Samuel Wales wrote:
> I have had this around for a while. The usual advice from
> undoers is that "undo the undo" is sufficient. This offers
> a different take, one that you might not have seen. Now
> seems a good time to post it.
>
>
> There are several types of emacs users, including these:
>
> 1) (UNDOERS) those for whom "undo the undo" works well
> 2) (REDOERS) those who would prefer undo-redo
>
> There are several types of undoers, including these:
>
> 1) those who want to understand what the redoers are
> saying
> 2) those who understand what the redoers are saying, but
> personally do not experience the problem
> 3) those who are confident that they understand what the
> redoers are saying, but actually have no idea
>
> The goal of this post is to turn type 1 into type 2. None
> other.

I'm confused. Do you have a problem with the current undo? If so why
not fix it? Why the "education"?

Your post seems to be trying to convince versus educate.

If your purpose was to show me how you work and convince me you're not
happy with the status quo, I guess you made your point. As for
education I don't know anything I didn't before. I've seen many people
who wished emacs worked differently and I didn't really see anything
new here. Your demo doesn't reflect my use so it's hard to learn or
conclude much. If I worked like that I guess I'd set about fixing my
problem. I'm aware others use emacs differently and want changes so I
guess I didn't really learn much. As for undo I'm agnostic; I don't
have a problem but if it changed I'd have to see the change to decide
if it was OK with me or posed a problem.

Samuel Wales

未讀,
2009年11月23日 下午3:01:342009/11/23
收件者:stan、help-gn...@gnu.org
Hi Stan,

> Your post seems to be trying to convince versus educate.

Either way, type 1 undoers have an example to try to see what redoers
are on about. They can make up their own minds.

If you weren't educated or convinced, then the post was not for you.


0 則新訊息