* Re: REDO ?
@ 2007-04-23 9:44 A Soare
2007-04-23 15:38 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: A Soare @ 2007-04-23 9:44 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs Dev [emacs-devel]
>
> > What do you think about inserting a redo command for the next version ? (23)
> > For me it could be very useful.
>
> Yes, it's pretty much on my todo list. Note that we already have "redo",
> just not as a command. The current way to do "redo" is to use the command
> "undo". The only difference is that if the last modification was not an
> "undo" the undo command will not fail (as "redo" would) but will simply undo
> instead. Also if the last command was an "undo", the undo command will keep
> undoing instead of doing a "redo" (i.e. undoing the last undo).
>
Logically in this moment the redo should be done by a negative
argument. But:
a
b
c
C-/ => Undo!
a
b
Now it should be possible to apply a redo.
M-- M-1 C-/ => Undo!
But the text did not change to
a
b
c
.
> > Also, every time when we press undo or redo, to see (optionally) in the
> > minibuffer the current change in yank kill, and the previous, and
> > the next.
>
> I do not understand.
This would be good if it possible to implement it. I meant to see
in the minibuffer after applying an undo or a redo the text after
applying next an undo and the text after applying next a redo...
Alin Soare.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 9:44 REDO ? A Soare
@ 2007-04-23 15:38 ` Stefan Monnier
2007-04-23 23:08 ` Richard Stallman
2007-04-23 23:08 ` Richard Stallman
2 siblings, 0 replies; 20+ messages in thread
From: Stefan Monnier @ 2007-04-23 15:38 UTC (permalink / raw)
To: alinsoar; +Cc: Emacs Dev [emacs-devel]
> Logically in this moment the redo should be done by a negative
> argument. But:
> a
> b
> c
> C-/ => Undo!
> a
> b
> Now it should be possible to apply a redo.
> M-- M-1 C-/ => Undo!
That might be a good addition, indeed.
> This would be good if it possible to implement it. I meant to see in the
> minibuffer after applying an undo or a redo the text after applying next
> an undo and the text after applying next a redo...
Sounds very difficult. Maybe we could simply highlight the newly
modified text somehow.
And maybe we could additionally provide a "undo-slow" that would first
highlight the about-to-changed text, then wait a short little while, then
perform the undo and highlight the new text (and maybe even highlight the
"next text to be undone").
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 9:44 REDO ? A Soare
2007-04-23 15:38 ` Stefan Monnier
@ 2007-04-23 23:08 ` Richard Stallman
2007-04-23 23:54 ` Davis Herring
2007-04-23 23:08 ` Richard Stallman
2 siblings, 1 reply; 20+ messages in thread
From: Richard Stallman @ 2007-04-23 23:08 UTC (permalink / raw)
To: alinsoar; +Cc: monnier, emacs-devel
Now it should be possible to apply a redo.
M-- M-1 C-/ => Undo!
M-- M-1 C-/ is sufficiently inconvenient that I doubt
it is worth having.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 23:08 ` Richard Stallman
@ 2007-04-23 23:54 ` Davis Herring
0 siblings, 0 replies; 20+ messages in thread
From: Davis Herring @ 2007-04-23 23:54 UTC (permalink / raw)
To: rms; +Cc: alinsoar, monnier, emacs-devel
> Now it should be possible to apply a redo.
>
> M-- M-1 C-/ => Undo!
>
> M-- M-1 C-/ is sufficiently inconvenient that I doubt
> it is worth having.
Just as a comment on the key, C-- C-_ would have the same effect with a
somewhat less frustrating typing effort.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 9:44 REDO ? A Soare
2007-04-23 15:38 ` Stefan Monnier
2007-04-23 23:08 ` Richard Stallman
@ 2007-04-23 23:08 ` Richard Stallman
2 siblings, 0 replies; 20+ messages in thread
From: Richard Stallman @ 2007-04-23 23:08 UTC (permalink / raw)
To: alinsoar; +Cc: monnier, emacs-devel
This would be good if it possible to implement it. I meant to see
in the minibuffer after applying an undo or a redo the text after
applying next an undo and the text after applying next a redo...
That might be a nice feature. Please try it out and we'll see
what it's like to use.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
@ 2007-04-24 9:28 A Soare
2007-04-24 13:32 ` Drew Adams
0 siblings, 1 reply; 20+ messages in thread
From: A Soare @ 2007-04-24 9:28 UTC (permalink / raw)
To: rms; +Cc: Emacs Dev [emacs-devel]
> This would be good if it possible to implement it. I meant to see
> in the minibuffer after applying an undo or a redo the text after
> applying next an undo and the text after applying next a redo...
I will occupy myself of the problem to write a patch after the release so:
1 -> C-u as parameter to UNDO command will reverse the direction from undo to redo or from redo to undo.
2 -> The current undo/redo will be inserted in the buffer with WHITE.
3 -> The previous UNDO/REDO will be inserted with RED.
4 -> And the next UNDO/REDO will be inserted with BLUE.
5 -> When WHITE and BLUE text will be superposed it will be shown in BLUE CIEL, WHITE+RED in LIGHT RED , etcetera.
6 -> pressing another key than the key associated with UNDO will keep permanent the WHITE text and will take out the RED and BLUE text.
Alin Soare.
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: REDO ?
2007-04-24 9:28 A Soare
@ 2007-04-24 13:32 ` Drew Adams
0 siblings, 0 replies; 20+ messages in thread
From: Drew Adams @ 2007-04-24 13:32 UTC (permalink / raw)
To: Emacs Dev [emacs-devel]
> > This would be good if it possible to implement it. I meant to see
> > in the minibuffer after applying an undo or a redo the text after
> > applying next an undo and the text after applying next a redo...
>
> I will occupy myself of the problem to write a patch after the release so:
>
> 1 -> C-u as parameter to UNDO command will reverse the direction
> from undo to redo or from redo to undo.
> 2 -> The current undo/redo will be inserted in the buffer with WHITE.
> 3 -> The previous UNDO/REDO will be inserted with RED.
> 4 -> And the next UNDO/REDO will be inserted with BLUE.
> 5 -> When WHITE and BLUE text will be superposed it will be shown
> in BLUE CIEL, WHITE+RED in LIGHT RED , etcetera.
> 6 -> pressing another key than the key associated with UNDO will
> keep permanent the WHITE text and will take out the RED and BLUE text.
I imagine that this will be discussed before it is adopted, but if it does get adopted, please provide an option to avoid all of that and get back the "classical" Emacs undo.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
@ 2007-04-23 15:46 A Soare
2007-04-23 17:09 ` David Reitter
0 siblings, 1 reply; 20+ messages in thread
From: A Soare @ 2007-04-23 15:46 UTC (permalink / raw)
To: rms; +Cc: Emacs Dev [emacs-devel]
> I think it is a bad idea to have a separate redo command,
> simply because there is no room on the keyboard for a
> convenient one, and an inconvenient one won't do much good.
>
Not different. Just the same, but to be possible to reverse the direction of the yank (using a parameter for example), even from the beginning of the action, not to be obliged first to apply an undo, etcetera.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 15:46 A Soare
@ 2007-04-23 17:09 ` David Reitter
2007-04-23 18:01 ` Stefan Monnier
2007-04-24 16:03 ` Richard Stallman
0 siblings, 2 replies; 20+ messages in thread
From: David Reitter @ 2007-04-23 17:09 UTC (permalink / raw)
To: alinsoar; +Cc: rms, Emacs Dev [emacs-devel]
On 23 Apr 2007, at 16:46, A Soare wrote:
> Not different. Just the same, but to be possible to reverse the
> direction of the yank (using a parameter for example), even from
> the beginning of the action, not to be obliged first to apply an
> undo, etcetera.
A while agao, we integrated an undo/redo function into Aquamacs,
because that's what users generally get in programs running on that
specific OS.
A few of our users preferred the original `undo', so it makes sense
to leave C-_ as it is. (The idea to bind a prefix key combination to
the new `redo' makes sense.)
Additionally, our `undo' and `redo' restore the region.
The code (based on the `redo' package by Kyle E Jones) is available
below. If people are interested, I could rewrite it to fit into Emacs
after the release.
http://aquamacs.cvs.sourceforge.net/*checkout*/aquamacs/aquamacs/src/
site-lisp/aquamacs-redo.el
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 17:09 ` David Reitter
@ 2007-04-23 18:01 ` Stefan Monnier
2007-04-23 20:01 ` Ken Manheimer
2007-04-24 16:03 ` Richard Stallman
1 sibling, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2007-04-23 18:01 UTC (permalink / raw)
To: David Reitter; +Cc: alinsoar, rms, Emacs Dev [emacs-devel]
>> Not different. Just the same, but to be possible to reverse the
>> direction of the yank (using a parameter for example), even from the
>> beginning of the action, not to be obliged first to apply an
>> undo, etcetera.
> A while agao, we integrated an undo/redo function into Aquamacs, because
> that's what users generally get in programs running on that specific OS.
> A few of our users preferred the original `undo', so it makes sense to
> leave C-_ as it is. (The idea to bind a prefix key combination to the new
> redo' makes sense.)
> Additionally, our `undo' and `redo' restore the region.
> The code (based on the `redo' package by Kyle E Jones) is available below.
> If people are interested, I could rewrite it to fit into Emacs after
> the release.
We already have the "undo" half of your undo/redo, under the name
"undo-only".
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 18:01 ` Stefan Monnier
@ 2007-04-23 20:01 ` Ken Manheimer
2007-04-23 20:16 ` Davis Herring
0 siblings, 1 reply; 20+ messages in thread
From: Ken Manheimer @ 2007-04-23 20:01 UTC (permalink / raw)
To: Stefan Monnier; +Cc: David Reitter, Emacs Dev [emacs-devel], rms, alinsoar
i would like to chime in with a strong request integration of a rel
"redo", when the time is right.
i've used kyle jones' redo.el for a few years, and wouldn't go back to
the painful layering of undo-on-undo in order to redo. undoing feels
like a delicate, hazardous operation without redo, because of the
obstacle of geometrically mounting undo length in the case of
overshoot. i used to get lost in that labrynth much too commonly, and
expect that people unfamiliar with how well it is mitigated by redo
don't realize what they're missing - but may recognize the experience
of tension while undoing, needing to not overshoot...
(i've settled for using the usupported redo.el for years, but there
are some bugs that i'm sure would have been resolved if it were a
commonly used part of the main distribution.)
--
Ken Manheimer
http://myriadicity.net
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 20:01 ` Ken Manheimer
@ 2007-04-23 20:16 ` Davis Herring
0 siblings, 0 replies; 20+ messages in thread
From: Davis Herring @ 2007-04-23 20:16 UTC (permalink / raw)
To: Ken Manheimer
Cc: alinsoar, David Reitter, Stefan Monnier, rms,
Emacs Dev [emacs-devel]
> i've used kyle jones' redo.el for a few years, and wouldn't go back to
> the painful layering of undo-on-undo in order to redo. undoing feels
> like a delicate, hazardous operation without redo, because of the
> obstacle of geometrically mounting undo length in the case of
> overshoot. i used to get lost in that labrynth much too commonly, and
> expect that people unfamiliar with how well it is mitigated by redo
> don't realize what they're missing - but may recognize the experience
> of tension while undoing, needing to not overshoot...
My take on this is somewhat simpler. I use the following function (which,
though it works fine for me, could easily screw things up badly, so use at
your own risk):
;; In order to propertly handle "already performing undos", this must be
;; bound to a key (not run via M-x).
(defun undo-permanently ()
"Undo the most recent change and forget about it.
Selective undo is not supported, so no prefix argument is accepted, and
Transient Mark mode is ignored.
If already performing undos, undo one more change and then forget it and all
changes since."
(interactive "*")
(let (transient-mark-mode)
(when (and (eq last-command 'undo)
(not (eq pending-undo-list t)))
;; In Emacs 22, just test `undo-in-region' instead of all this:
(let ((pbul buffer-undo-list))
(while (not (eq pbul pending-undo-list))
(if pbul (setq pbul (cdr pbul))
(error "Can't `undo-permanently' during a selective undo")))))
(undo)
(message "Permanently undone!")
(setq buffer-undo-list (unless (eq pending-undo-list t)
pending-undo-list))))
I bind this to "C-+" (only available on a window system), which on US
keyboards is one key over from "C-_". Then I use it instead of "undo" for
all the trivial mistakes I make, and when I really want to back out of one
thing and do another, and to undo (ha) the growth of the undo-list if it
acquires too many "redundant" entries on the end. It doesn't precisely
address your problem, but I find that it simplifies things and so makes
undo less painful.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-23 17:09 ` David Reitter
2007-04-23 18:01 ` Stefan Monnier
@ 2007-04-24 16:03 ` Richard Stallman
2007-04-24 16:21 ` David Reitter
1 sibling, 1 reply; 20+ messages in thread
From: Richard Stallman @ 2007-04-24 16:03 UTC (permalink / raw)
To: David Reitter; +Cc: alinsoar, emacs-devel
A while agao, we integrated an undo/redo function into Aquamacs,
because that's what users generally get in programs running on that
specific OS.
What is the user interface?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-24 16:03 ` Richard Stallman
@ 2007-04-24 16:21 ` David Reitter
2007-04-25 2:04 ` Richard Stallman
0 siblings, 1 reply; 20+ messages in thread
From: David Reitter @ 2007-04-24 16:21 UTC (permalink / raw)
To: rms; +Cc: alinsoar, emacs-devel
On 24 Apr 2007, at 17:03, Richard Stallman wrote:
> A while agao, we integrated an undo/redo function into Aquamacs,
> because that's what users generally get in programs running on
> that
> specific OS.
>
> What is the user interface?
A-z `aquamacs-undo' (similar to `undo-only')
A-Z `aquamacs-redo'
C-_ `undo'
A-z and A-Z the standard keys on the Mac. Note that A- is bound to
the "command" key.
This is probably not something that can be done in GNU Emacs.
It would be nice if the region was restored by the revised `undo' (if
the mark was active) (as a customization option). NB, that would
interfere with selective `undo'.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-24 16:21 ` David Reitter
@ 2007-04-25 2:04 ` Richard Stallman
0 siblings, 0 replies; 20+ messages in thread
From: Richard Stallman @ 2007-04-25 2:04 UTC (permalink / raw)
To: David Reitter; +Cc: alinsoar, emacs-devel
A-z `aquamacs-undo' (similar to `undo-only')
A-Z `aquamacs-redo'
C-_ `undo'
A-z and A-Z the standard keys on the Mac. Note that A- is bound to
the "command" key.
This is probably not something that can be done in Emacs.
That is true.
By the way, since Aquamacs ias a modified version of GNU Emacs, it
does come out of GNU. Please do not constrast "GNU Emacs" and
"Aquamacs", because that would imply that only the former comes from
GNU, and would deny us credit. It is very unfriendly.
^ permalink raw reply [flat|nested] 20+ messages in thread
* REDO ?
@ 2007-04-21 19:54 A Soare
2007-04-23 1:57 ` Stefan Monnier
0 siblings, 1 reply; 20+ messages in thread
From: A Soare @ 2007-04-21 19:54 UTC (permalink / raw)
To: Emacs Dev [emacs-devel]
What do you think aboubt inserting a redo command for the next version ? (23)
For me it could be very useful.
Also, every time when we press undo or redo, to see (optionally) in the minibuffer the current change in yank kill, and the previous, and the next.
What do you think?
Alin Soare.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: REDO ?
2007-04-21 19:54 A Soare
@ 2007-04-23 1:57 ` Stefan Monnier
2007-04-23 14:21 ` Richard Stallman
0 siblings, 1 reply; 20+ messages in thread
From: Stefan Monnier @ 2007-04-23 1:57 UTC (permalink / raw)
To: alinsoar; +Cc: Emacs Dev [emacs-devel]
> What do you think about inserting a redo command for the next version ? (23)
> For me it could be very useful.
Yes, it's pretty much on my todo list. Note that we already have "redo",
just not as a command. The current way to do "redo" is to use the command
"undo". The only difference is that if the last modification was not an
"undo" the undo command will not fail (as "redo" would) but will simply undo
instead. Also if the last command was an "undo", the undo command will keep
undoing instead of doing a "redo" (i.e. undoing the last undo).
> Also, every time when we press undo or redo, to see (optionally) in the
> minibuffer the current change in yank kill, and the previous, and
> the next.
I do not understand.
Stefan
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2007-04-25 2:04 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-23 9:44 REDO ? A Soare
2007-04-23 15:38 ` Stefan Monnier
2007-04-23 23:08 ` Richard Stallman
2007-04-23 23:54 ` Davis Herring
2007-04-23 23:08 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2007-04-24 9:28 A Soare
2007-04-24 13:32 ` Drew Adams
2007-04-23 15:46 A Soare
2007-04-23 17:09 ` David Reitter
2007-04-23 18:01 ` Stefan Monnier
2007-04-23 20:01 ` Ken Manheimer
2007-04-23 20:16 ` Davis Herring
2007-04-24 16:03 ` Richard Stallman
2007-04-24 16:21 ` David Reitter
2007-04-25 2:04 ` Richard Stallman
2007-04-21 19:54 A Soare
2007-04-23 1:57 ` Stefan Monnier
2007-04-23 14:21 ` Richard Stallman
2007-04-23 14:30 ` David Kastrup
2007-04-24 16:03 ` Richard Stallman
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).