From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: multiple search strings in query-replace-regexp Date: Sat, 07 Oct 2006 09:41:43 +0200 Organization: Arcor Message-ID: <85iriwy3m0.fsf@lola.goethe.zz> References: <1160133442.016714.5230@m7g2000cwm.googlegroups.com> <85y7rt1x2k.fsf@lola.goethe.zz> <85ejtlyuhv.fsf@lola.goethe.zz> <200610070345.k973jLj2011358@powdermilk.math.berkeley.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160210456 10766 80.91.229.2 (7 Oct 2006 08:40:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Oct 2006 08:40:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 07 10:40:56 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GW7jr-0000k6-9x for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Oct 2006 10:40:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GW7jq-0002m0-PR for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Oct 2006 04:40:54 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <200610070345.k973jLj2011358@powdermilk.math.berkeley.edu> (Ilya Zakharevich's message of "Fri\, 6 Oct 2006 20\:45\:21 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:Nksm8uelS6jnQpjJxXJkHGBhJpw= Original-Lines: 41 Original-NNTP-Posting-Date: 07 Oct 2006 09:42:11 CEST Original-NNTP-Posting-Host: 05a8abb4.newsspool3.arcor-online.net Original-X-Trace: DXC=m]90Y9h1>ViPXlQ; h]GTMdMcF=Q^Z^V3h4Fo<]lROoRaFl8W>\BH3Yb01bEl8o1iMjCV`H8_`hhQd^9QSCVg3dOflR6Na 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:37869 Archived-At: Ilya Zakharevich writes: > [A complimentary Cc of this posting was sent to > David Kastrup > ], I already told you to leave off "complimentary copies" to group articles: they are a breach of netiquette since they add no valuable information at all and tend to confuse the recipient into having to reply multiple times: once in mail, and later, when the mistake has been noticed, on the group again. Please stop this nuisance. You can expect that people writing on Usenet groups are also reading there. > who wrote in article <85ejtlyuhv.fsf@lola.goethe.zz>: >> >> C-M-% \(foo\)\|\(rock\)\|metal RET >> >> \,(cond (\1 "bar") (\2 "house") ("goa")) RET >> > >> > To make it useful, one needs a function to count the number of >> > parentheses in a given regular expression. Is there? > >> Uh WHAT? You just type the above stuff. Why would that not be >> useful? > > How many people do you know who would type something like this? :-( Well, enough for the idiom to be useful. That's why it was invented and documented. > And to have a "generally usable" wrapper, one needs a way to > identify how many paren groups are inside your "foo" and "rock" > regular expressions. I can't actually think of a user interface for such a wrapper that would not really complicate things. In particular if you want to refer to matched groups in the replacements, it is pretty hard to come up with anything close to a useful interface. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum