Hi,
I have the following problem when using dired-do-find-regexp. When I use
it in a
directory that contains a binary file the search will fail with the
following message:
xref-matches-in-files: Search failed with status 0: /tmp/test/hello_bin:
binary file matches (found "\0" byte around offset 5)
If there are matches in non binary files they won't be shown. This only
happens
when xref-search-program is set to 'ripgrep.
Steps the reproduce the issue with emacs -Q:
1. (customize-set-variable 'xref-search-program 'ripgrep)
2. Create the following files in a new directory (^@ is a null byte):
hello_bin:
hello^@world
hello.txt:
hello world
3. Open the directory in dired
4. Use dired-do-find-regexp on the current directory and search for "hello"
A bit of testing revealed that the issue seems to be related to the
ordering of
the files. Renaming hello_bin to ahello_bin makes the problem go away.