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

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

Re: regexp/emacs selective replace


From: Barry Margolin
Subject: Re: regexp/emacs selective replace
Date: Tue, 24 Nov 2009 20:30:25 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 m121212 <address@hidden> wrote:

> Hi, 
> 
> I have a tricky problem that I'm not sure how to solve.  I have a latex
> document with several figure environments that look like this:
> 
> \begin{figure}
>  \includegraphics{blah.ps}
> \end{figure}
> 
> but need to look like this:
> 
> \begin{figure}
>   \begin{center} \includegraphics{blah.ps} \end{center}
> \end{figure}
> 
> Some of the figure environments already have this however, and I don't want
> to end up with something like this:
> 
> \begin{figure}
>   \begin{center}\begin{center} \includegraphics{blah.ps}
> \end{center}\end{center}
> \end{figure}
> 
> Any ideas?

Does query-replace-regexp do what you want?  It will prompt you before 
each possible replacement, and you can say whether to replace that 
instance.

-- 
Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

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