From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Rasmussen Newsgroups: gmane.emacs.help Subject: Re: search and replace Date: Sun, 04 Jul 2004 11:27:51 +0200 Organization: TDC Totalloesninger Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <40e7cdbf$0$170$edfadb0f@dtext02.news.tele.dk> References: <40e71dde$0$162$edfadb0f@dtext01.news.tele.dk> <40e73c45$0$170$edfadb0f@dtext01.news.tele.dk> <878ye0i16l.fsf@bach.composers> 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 1088933610 10873 80.91.224.253 (4 Jul 2004 09:33:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Jul 2004 09:33:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 04 11:33:22 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 1Bh3NB-0003hp-00 for ; Sun, 04 Jul 2004 11:33:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bh3P5-000860-GU for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Jul 2004 05:35:19 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!wanadoo.fr!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: <878ye0i16l.fsf@bach.composers> Original-Lines: 35 Original-NNTP-Posting-Host: 80.161.55.86 Original-X-Trace: 1088933311 dtext02.news.tele.dk 170 80.161.55.86:19733 Original-X-Complaints-To: abuse@post.tele.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:124114 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19445 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19445 Ole Laursen wrote: > > You were right in your thinking - it doesn't work on regexps. I tried > copying the > > \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm] > > into *scratch* and used M-% to query-replace it with \traverse. It > works fine here. Remember that if you place the cursor on top of the > above line, Emacs won't find it. You need to place the cursor before the > line for Emacs to find it. > Hmm. I had a file containing something like: \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm]{a}{b} \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm]{b}{c} \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm]{c}{d} \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm]{d}{e} \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm]{e}{f} \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm]{f}{g} And I did M-% to replace \ncline[linewidth=0.3mm,offset=-1.5mm,arrows=->,nodesep=4mm] with \traverse The cursor was before any of these line (and even if not, the search wraps around anyway, doesn't it?). It just said "0 occurences replaced". I don't understand why... I had to use another editor to perform the replace :( /David