help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] query-replace takes highlighted section as first arg?


From: Daniel Hegyi
Subject: Re: [h-e-w] query-replace takes highlighted section as first arg?
Date: Tue, 09 Apr 2002 05:00:44 +0000

I've done this copying and yanking myself, but I thought that maybe query-replace could be redefined with a wrapper function that does this. Don't know, I'm not an elisper. anyway, that would be a lot more user friendly than having to manually copy and yank every time when doing a replace.

Daniel


From: David Vanderschel <address@hidden>
To: address@hidden
Subject: Re: [h-e-w] query-replace takes highlighted section as first arg?
Date: 08 Apr 2002 19:45:05 -0500

On Monday, April 08, "Daniel Hegyi" <address@hidden> wrote:
>Does anybody know how to have M-x query-replace take
>automatically the highlighted (marked) section to be
>the first argument, i.e., the string to be replaced?

I do this often myself, but I never thought that
simply yanking the search text into the echo area was
that unsatisfactory a solution:

    M-w M-% C-y RET ...

The M-w is unnecessary if you selected the text by
dragging mouse-1.  (I must admit that I have defined a
more easily typed key sequence for query-replace than
M-%.)


I also do this (yank) with incremental search strings,
and I found the default key binding of C-y in that
mode (entering the search string) to be so
counter-intuitive that I 'fixed' it.  (If I recall
correctly, it is M-y that does what you would expect
C-y to do.)

Regards,
  David V.




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




reply via email to

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