From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jadamson@partners.org (Joel J. Adamson) Newsgroups: gmane.emacs.help Subject: Re: Emacs regexp problem Date: Tue, 29 Jan 2008 14:20:24 -0500 Organization: I need to put my ORGANIZATION here. Message-ID: <87prvkh1z9.fsf@W0053328.mgh.harvard.edu> References: <79627687-f8b7-42f7-a6c4-230d6f525a53@e6g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201635685 4990 80.91.229.12 (29 Jan 2008 19:41:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2008 19:41:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 29 20:41:45 2008 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.50) id 1JJwKw-0001YP-OZ for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jan 2008 20:41:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJwKV-0006Vb-MJ for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jan 2008 14:41:11 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeeds.sol.net!newspeer1.asbnva01.us.to.verio.net!news.harvard.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: w0053328.mgh.harvard.edu Original-X-Trace: plato.harvard.edu 1201634490 27934 132.183.29.121 (29 Jan 2008 19:21:30 GMT) Original-X-Complaints-To: news@plato.harvard.edu Original-NNTP-Posting-Date: Tue, 29 Jan 2008 19:21:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:gZr8x2OmFSIfUUP474uJpM67kqM= Original-Xref: shelby.stanford.edu gnu.emacs.help:155683 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:51063 Archived-At: "mailpitches@email.com" writes: [...] > func(param) should be converted to func('param') > > I use the following command: > M-x replace-regexp [enter] get\((.*)\) [enter] get('\1')) [enter] > > and the result is func(param) is converted to func('(param)') > > Why are those extra parentheses appearing in there They're your parentheses: in emacs \(...\) makes groups, rather than (...), so your second un-escaped set of parentheses is getting matched and ending up in the replacement ('\1'). > ; is this an error on emacs' part? Not really ;) Joel -- Joel J. Adamson Biostatistician Pediatric Psychopharmacology Research Unit Massachusetts General Hospital Boston, MA 02114 (617) 643-1432 (303) 880-3109