[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How, in a QUERY-REPLACE-regexp, to match a RANGE of lines?
From: |
David Combs |
Subject: |
Re: How, in a QUERY-REPLACE-regexp, to match a RANGE of lines? |
Date: |
Fri, 19 Feb 2010 05:59:08 +0000 (UTC) |
In article <mailman.1412.1266448375.14305.help-gnu-emacs@gnu.org>,
Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
>Am 17.02.2010 um 21:22 schrieb David Combs:
>
>> subj: How, in a QUERY-REPLACE-regexp, to match a RANGE of lines?
>
>Activate Active Region Highlight, mark the region, perform regexp.
I'm not sure I really understand that.
>From one interpretation, it means find the first line, save it's
>start-location in
register x, say, then search down for the end line, go to its end, C-x space,
go to register x, C-x C-x, C-w, and it's gone.
>From another interpretation, well, I don't understand any of it.
Your "commands" are:
Activate
Active region
Highlite it somehow
then "mark" the region it somehow (as above in first interpretation?),
and THEN and ONLY then do some regexp stuff.
Peter, I haven't a clue what you're talking about.
Thanks for the work, but sorry, I understand not one piece of it.
David
PS: oh, I haven't a clue how this would interact with query-replace. What,
turn the first arg (regexp) into a function which goes out and DOES some
stuff (side-effects?), then RETURNS a regexp, which is what Q-R will
finally receive as its first arg?