From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Moira Newsgroups: gmane.emacs.help Subject: Possible bug in replace-regexp? Date: Wed, 21 Nov 2007 00:59:52 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195603239 9720 80.91.229.12 (21 Nov 2007 00:00:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2007 00:00:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 21 01:00:45 2007 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 1Iud1I-0001kf-Oy for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Nov 2007 01:00:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iud15-0006H3-1t for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Nov 2007 19:00:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iud0Y-0005np-Hr for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 18:59:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iud0W-0005kn-Cc for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 18:59:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iud0W-0005kb-8u for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 18:59:56 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.179]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iud0V-0003hF-N5 for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 18:59:55 -0500 Original-Received: from [10.10.10.4] (pD9E637C3.dip.t-dialin.net [217.230.55.195]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1Iud0U214O-0001mH; Wed, 21 Nov 2007 00:59:54 +0100 X-Mailer: Apple Mail (2.752.3) X-Provags-ID: V01U2FsdGVkX197diIkDlb12Fs3gy/fJerPITi+WxORHlCxbQY GG9xWOdrg3CxflhD6/wEpAOfn2/UTDcqP1WbJUDI1vxILl2LIG U0cYfyHVP4TU9iWXzfgzshyoE5a348V X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:49380 Archived-At: Hi. I've just attempted some regular expression search/replace in emacs - a thing I like to do in editors - and noticed some strange behaviour. I thought I'd rather ask here before posting a bug-report to early. If my search contains a grouped quantor like this "myString\(.*?\)" a C-q,C-j newline in the replacement is added *before* the groups backreference, even if it's placed behind it. Like in this replace: "myString\1[emacs C-q,C-j comes here]". This should yield: >>> ... some-stuff myString more-stuff-in-the-myString-line the-rest ... <<< Instead it causes this: >>> ... some-stuff myString more-stuff-in-the-myString-line the-rest ... <<< I should add that this is Aquaemacs, a native GUI Emacs port for OS X. I haven't tried it the CLI version yet and I'm not 100% sure C-q,C- j is the way of putting a newline into the replacement. Is this a bug (read: can you guys reproduce it?) and/or are there other ways to approach this problem? Thanks for any advice and input on the subject. Phillip