[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A query-replace question
From: |
David Kastrup |
Subject: |
Re: A query-replace question |
Date: |
Wed, 08 Dec 2010 15:24:56 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Rodolfo Medina <rodolfo.medina@gmail.com> writes:
> Hi to all Emacs users.
>
> In a large .tex file, I wish to replace all `x' with `a', but only those
> occurrences of x that lay between two dollars symbols: e.g., $x = y$. Could
> that be ever possible with Emacs, and how?
M-: (require 'texmathp) RET
C-M-% x RET \,(if (texmathp) "a" \&) RET
Note that this includes \max and similar, so you might want to use
something like
\_<x\_>
as your search expression for doing the matching.
--
David Kastrup