[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiple search strings in query-replace-regexp
From: |
Florian Kaufmann |
Subject: |
Re: multiple search strings in query-replace-regexp |
Date: |
6 Oct 2006 07:14:38 -0700 |
User-agent: |
G2/1.0 |
> Write a little function in *scratch* buffer with n replace-regexp,
> then load and apply it!
Yes, that's true. But I have to be careful that I take the nearest
match. Something like
saved_point = point
next_match_pos = INFINIT
for all regexes in regexlist {
match_pos = search( current regex )
if ( match_pos < next_match_pos ) {
next_match_pos = match_pos
regex_to_apply = current regex
}
goto saved_point
}
searc_replace( regex_to_apply )
Mhh, no, that doesn't work either. Now how should I implement the thing
that I can press all that query-replace keys like y n . etc? Of course
pressing y should advance to the nearest next match of any of the regex
from the regexlist.
- Re: multiple search strings in query-replace-regexp, (continued)
- Re: multiple search strings in query-replace-regexp, Stefan Monnier, 2006/10/09
- Re: multiple search strings in query-replace-regexp, Ilya Zakharevich, 2006/10/09
- Re: multiple search strings in query-replace-regexp, David Kastrup, 2006/10/09
- Re: multiple search strings in query-replace-regexp, Ilya Zakharevich, 2006/10/09
- Re: multiple search strings in query-replace-regexp, Malte Spiess, 2006/10/07
- Re: multiple search strings in query-replace-regexp, David Kastrup, 2006/10/07
Re: multiple search strings in query-replace-regexp, Peter Dyballa, 2006/10/06
Message not available
- Re: multiple search strings in query-replace-regexp,
Florian Kaufmann <=