unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Undo: restore the region?
@ 2006-01-18 16:00 David Reitter
  0 siblings, 0 replies; 5+ messages in thread
From: David Reitter @ 2006-01-18 16:00 UTC (permalink / raw)


> > How can I get undo to restore the region along with the last  
> changes?
> > I need this rather often in my workflow, and undo always removes the
> > mark, which is very annoying.
>
> C-x C-x should reactivate it.

Thanks, that's a good start. It works in some situations, but only  
for one step of Undo.

Consider the following case:

In the above sentence, select "good" as your region and enter "x".  
Then select "some" and press x again. Now do undo twice and press C-x  
C-x. I would expect "good" to be selected.

I was going to bind my undo key to something like (lambda nil  
(interactive) (undo) (exchange-point-and-mark)) but obviously undo  
would have to work in several steps without selecting wrong text.

- D

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Undo: restore the region?
@ 2006-01-19 17:51 David Reitter
  0 siblings, 0 replies; 5+ messages in thread
From: David Reitter @ 2006-01-19 17:51 UTC (permalink / raw)



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

> In Transient Mark mode when the mark is active, only undo changes  
> within
> the current region.  Similarly, when not in Transient Mark mode,  
> just C-u
> as an argument limits undo to changes within the current region.

Yes, that makes sense.
I was briefly considering hacking this to produce an Undo function  
which ignores any region setting even in transient mark mode. The  
secondary selection could, in that case, serve to mark a region to  
apply Undo to.

But all of this only makes sense if I can get Undo to always restore  
the region.

- D


[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2400 bytes --]

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <mailman.1615.1137600200.26925.help-gnu-emacs@gnu.org>]
[parent not found: <mailman.1453.1137511569.26925.help-gnu-emacs@gnu.org>]
* Undo: restore the region?
@ 2006-01-17 15:03 David Reitter
  0 siblings, 0 replies; 5+ messages in thread
From: David Reitter @ 2006-01-17 15:03 UTC (permalink / raw)


How can I get undo to restore the region along with the last changes?
I need this rather often in my workflow, and undo always removes the  
mark, which is very annoying.

Thanks in advance for your help!

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

end of thread, other threads:[~2006-01-19 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-18 16:00 Undo: restore the region? David Reitter
  -- strict thread matches above, loose matches on Subject: below --
2006-01-19 17:51 David Reitter
     [not found] <mailman.1615.1137600200.26925.help-gnu-emacs@gnu.org>
2006-01-18 16:46 ` David Kastrup
     [not found] <mailman.1453.1137511569.26925.help-gnu-emacs@gnu.org>
2006-01-17 15:53 ` David Kastrup
2006-01-17 15:03 David Reitter

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