From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Infinite Multiline replacement problem Date: Mon, 28 Jun 2004 14:04:57 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <40E079E9.2070503@yahoo.com> References: <87smchzczq.fsf@dinglei.ipanel.com.cn> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1088453126 19202 80.91.224.253 (28 Jun 2004 20:05:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Jun 2004 20:05:26 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 28 22:05:21 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bf2NU-0008EO-00 for ; Mon, 28 Jun 2004 22:05:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bf2P7-0006WK-Kw for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Jun 2004 16:07:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Bf2Oz-0006UU-0E for help-gnu-emacs@gnu.org; Mon, 28 Jun 2004 16:06:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Bf2Ox-0006UH-9x for help-gnu-emacs@gnu.org; Mon, 28 Jun 2004 16:06:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bf2Ox-0006UE-4o for help-gnu-emacs@gnu.org; Mon, 28 Jun 2004 16:06:51 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bf2NA-0003Ut-3q for help-gnu-emacs@gnu.org; Mon, 28 Jun 2004 16:05:00 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Bf2N8-0005em-00 for ; Mon, 28 Jun 2004 22:04:58 +0200 Original-Received: from 170.207.1.200 ([170.207.1.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Jun 2004 22:04:58 +0200 Original-Received: from ihs_4664 by 170.207.1.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Jun 2004 22:04:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 17 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 170.207.1.200 User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19046 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19046 Ding Lei wrote: > I tried to use regexp replace to do a multiline replacement, but > Emacs replaces one occurrence again and again (infinite) ... > Here's the regexp I use, > Replace: \*/[Ctrl-q][Ctrl-j]public void final > With: *@ejb.persistence[Ctrl-q][Ctrl-j]*/[Ctrl-q][Ctrl-j]public void final > > As you could see, what I want to do is insert an additional > "@ejb.persistence" string before the line "*/". But emacs always > replaces the first occurrence, and the result is that numerous > "*@ejb.persistence" string is inserted until *deadlock*. It works for me in Emacs 21.3. What version are you using? -- Kevin Rodgers