bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56624: 28.1.50; dired-do-find-regexp fails when using ripgrep


From: Dmitry Gutov
Subject: bug#56624: 28.1.50; dired-do-find-regexp fails when using ripgrep
Date: Sat, 23 Jul 2022 16:14:48 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Hi!

Thanks for the report.

On 17.07.2022 22:05, Michael Arndt wrote:
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.

This is due to a change in Ripgrep 13, which made it incompatible with GNU Grep in that respect: https://github.com/BurntSushi/ripgrep/releases/tag/13.0.0

I've pushed as fix to master in commit 38d5e346df. Please test it out.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]