> > Put the attached 3 files, `f1.cpp`, `f2.cpp` and `TAGS` into an empty > folder. > > Do: > > 1) find-file f1.cpp (C-x C-f) > > 2) tags-query-replace ITracks JTracks > > There are 4 occurrences that are changed > > 3) tags-query-replace JTracks ITracks > > There are 2 occurrences that are changed, and it reports “Replaced 0 > occurrences” > > It should have found the remaining 2 occurrences and the reported number > of 0 is wrong. > Thanks for your bug report. I can indeed reproduce this with Emacs 27.2, but not with the development version of Emacs, so this bug has apparently already been fixed. I did not find a workaround for Emacs 27.2 alas, even saving both buffers and manually re-running etags does not fix the bug.