help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: search and replace


From: David Rasmussen
Subject: Re: search and replace
Date: Sun, 04 Jul 2004 11:27:51 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]