From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kin Cho Newsgroups: gmane.emacs.help Subject: Re: Infinite Multiline replacement problem Date: 29 Jun 2004 13:15:20 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <7ifz8ep1d3.fsf@neoscale.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088543120 8549 80.91.224.253 (29 Jun 2004 21:05:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 21:05:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 29 23:05:03 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 1BfPmo-0008AP-00 for ; Tue, 29 Jun 2004 23:05:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfPoU-00079d-Cg for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jun 2004 17:06:46 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-X-Trace: news.uni-berlin.de mn7UxIgiFl9AnGlKZQg/XwEJAH6bw4bQHAF/CW9QBUqLCWO7xk User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:124027 Original-To: help-gnu-emacs@gnu.org 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:19360 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19360 Trying using a keyboard macro instead. Do M-: (info " (elisp) Keyboard Macros") to see. -kin Ding Lei writes: > Hello list, > 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*. > > Thank you. > > > > > -- > Yours, > > <<<::::: D i n g L e i ::::::>> > || || > || Ext: 8106 || > || Email: || > || Dept. Of Technology/Engineering || > || Embedded Internet Solutions Inc. || > || || > <(((((( ===================== )))))>>> >