>> I tried to use project-find-regexp more often than rgrep, >> but unfortunately xref still has a fundamental flaw: >> 0. emacs -Q >> 1. M-x project-find-regexp RET regexp RET >> 2. The output buffer *xref* contains duplicate lines >> when regexp is found on the same line several times, >> each duplicate output line has separate highlighting >> for every regexp occurrence. > > I don't know how "fundamental" it is, but indeed, it's somewhat of > a drawback. Suggestions for improving it (API change and/or implementation > change) are welcome. Here is the patch that makes the broken project-find-regexp usable: