[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] query-replace in math mode
From: |
Uwe Siart |
Subject: |
Re: [AUCTeX] query-replace in math mode |
Date: |
Tue, 18 Dec 2007 13:45:36 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (windows-nt) |
Uwe Siart <address@hidden> writes:
> Plamen Tanovski <address@hidden> writes:
>
>> (defun LaTeX-math-query-replace (from-string to-string)
>> "math query replace"
>> (interactive "sFrom: \nsTo: ")
>> (while
>> (search-forward from-string)
>> (if (texmathp)
>> (query-replace from-string to-string nil
>> (point) (1+ (match-end 0))))))
>
> After a few first trials it looks fine and seems to work as expected.
Aaargh, I found a problem with it now. When typing "M-x
LaTeX-math-query-replace RET N RET M" at the beginning of the following
document
\documentclass{article}
\begin{document}
\begin{equation}
N
\end{equation}
\end{document}
it matches the "N". However, after typing SPC to have it replaced, the
function gets trapped in an infinite loop, continuously signalling
"Replaced 0 occurences". Are there any ideas how to fix this?
--
Uwe
- [AUCTeX] query-replace in math mode, Uwe Siart, 2007/12/17
- [AUCTeX] Re: query-replace in math mode, Plamen Tanovski, 2007/12/17
- Re: [AUCTeX] Re: query-replace in math mode, David Kastrup, 2007/12/17
- Re: [AUCTeX] Re: query-replace in math mode, Uwe Siart, 2007/12/17
- [AUCTeX] Re: query-replace in math mode, Plamen Tanovski, 2007/12/17
- Re: [AUCTeX] query-replace in math mode, Uwe Siart, 2007/12/17
- Re: [AUCTeX] query-replace in math mode,
Uwe Siart <=
- [AUCTeX] Re: query-replace in math mode, Plamen Tanovski, 2007/12/18
- Re: [AUCTeX] Re: query-replace in math mode, Uwe Siart, 2007/12/18
- [AUCTeX] Re: query-replace in math mode, Plamen Tanovski, 2007/12/18
- Re: [AUCTeX] Re: query-replace in math mode, Uwe Siart, 2007/12/18
- [AUCTeX] Re: query-replace in math mode, Plamen Tanovski, 2007/12/18