GNU bug report logs -
#34525
replace-regexp missing some matches
Previous Next
Full log
View this message in rfc822 format
> From: Daniel Lopez <daniel.lopez999 <at> gmail.com>
> Date: Mon, 18 Feb 2019 08:28:35 +0000
>
> - Start "emacs -Q" and open the file BitmapFontFace.h
> - Evaluate the expression (replace-regexp "\\<Bitmap\\>" "SharedBitmap")
> - The text "Replaced 8 occurrences" appears in the echo area.
>
> Problem:
>
> There were actually 12 occurrences (ie. of the word "Bitmap" surrounded
> by word boundaries) in the file that should have been replaced. If I now
> move point back to the start of the buffer and evaluate the expression
> again, it says "Replaced 4 occurrences".
>
> The exact number of incorrect replacements perhaps varies over time.
> That is, I can test it five times in a row and get 8 initial replacments
> each time, but after trying some other search terms, messing with the
> file, restarting Emacs etc, I try my initial test again and then maybe
> it consistently replaces 10 the first time, for a while. So your exact
> numbers may vary.
C++ Mode plays some funky games with the syntax of '<', so maybe this
is the consequence. CC'ing Alan, in the hope that he might have
something interesting to say about this.
Thanks.
This bug report was last modified 6 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.