From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: How, in a QUERY-REPLACE-regexp, to match a RANGE of lines? Date: Fri, 19 Feb 2010 05:59:08 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1266561790 20384 80.91.229.12 (19 Feb 2010 06:43:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2010 06:43:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 19 07:43:08 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NiMZv-0006iR-43 for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Feb 2010 07:43:07 +0100 Original-Received: from localhost ([127.0.0.1]:60968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiMZu-00030B-HY for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Feb 2010 01:43:06 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader2.panix.com 1266559148 15662 166.84.1.1 (19 Feb 2010 05:59:08 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Fri, 19 Feb 2010 05:59:08 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: news.stanford.edu gnu.emacs.help:176880 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71948 Archived-At: In article , Peter Dyballa 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?