From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#56624: 28.1.50; dired-do-find-regexp fails when using ripgrep Date: Sat, 23 Jul 2022 16:14:48 +0300 Message-ID: <4007a633-f154-c379-0b7b-c08bc43de9d0@yandex.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36762"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 To: Michael Arndt , 56624@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 23 15:17:07 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFF0F-0009II-06 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jul 2022 15:17:07 +0200 Original-Received: from localhost ([::1]:59576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFF0D-00011g-UJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jul 2022 09:17:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFEzC-00010o-GL for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2022 09:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFEzC-0000VQ-6q for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2022 09:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFEzC-0000pD-2p for bug-gnu-emacs@gnu.org; Sat, 23 Jul 2022 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jul 2022 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56624 X-GNU-PR-Package: emacs Original-Received: via spool by 56624-submit@debbugs.gnu.org id=B56624.16585821043049 (code B ref 56624); Sat, 23 Jul 2022 13:16:02 +0000 Original-Received: (at 56624) by debbugs.gnu.org; 23 Jul 2022 13:15:04 +0000 Original-Received: from localhost ([127.0.0.1]:43786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFEyG-0000n7-Gn for submit@debbugs.gnu.org; Sat, 23 Jul 2022 09:15:04 -0400 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:45872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFEyC-0000mB-9W for 56624@debbugs.gnu.org; Sat, 23 Jul 2022 09:15:02 -0400 Original-Received: by mail-wm1-f44.google.com with SMTP id u14-20020a05600c00ce00b003a323062569so3853649wmm.4 for <56624@debbugs.gnu.org>; Sat, 23 Jul 2022 06:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=cr7Y5ymZu9fc+mOEVZxYJYuhUcE18UoduyCOKeSU55E=; b=UxO9BVOxtcZI8ytlWKCnceSOnON9PLUGu+xMegQb+oPmau5v/kbZ1qye75NB4dLH3K XXzLu5r+S6V4Ue7ia8Hsa7EigSFoGx4cJGjPAzNwoB2wwVm+/lbqQYYhYeISIg+BQACR bFZxGNuPMBE6IhtTlQ+IQJtNERnJdhmsQ7vVWc/jhIk1FBq8mCkeJ9dfIbvqBsHXIpMt 4Lf4hBDWu83zmLbM+63zteTmwLmm8hZKqZ0BjPwG9rBFnFuXf66Q8Wj8kGbbwvZkQh+A BQtTW5lTkMS/d/36HeUx11Vd3Y9yh+M6OjToFhTYE1T8HhqKJQpOIR8We27GU+WXY7I8 IbUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=cr7Y5ymZu9fc+mOEVZxYJYuhUcE18UoduyCOKeSU55E=; b=HjckvNW5IohAj7O1hjNpy6Zl9CPGt/Eh//37ii3RyxDOQ58rSSFu3JmmX2730s8Nfv wnfdc5AZ9mJ1PIBOLgpOKBffvIvCn0U3eweai+fSy4P+BRmRD5UbJVKpQYswL3vgxigw sVALOZrl8yW4ZQ465JjPVFdO3tDEfDYvOlvjD4RFgSwBlYIbCYQT5B/fCturLhwzueNv hU3MIrofo9JegyUU9te7if9N2Q3Tk46RnfsU0l8ynaDgILvhOqQ9te1NJm+fLGP/bSK5 3KCgOQ41hw3p8/iG/U9+Q4x2B1no69DEMRBkqeaDWoqMwXvm1RHKXUdlBfPEvxn3F4gS jMtA== X-Gm-Message-State: AJIora8om1zxxCMOgB5EUcNU4r5xu0j8xaMJYE4Ciyy1fc/atfEYTbtG EZecjwwTbCwQEi0qBING8TI= X-Google-Smtp-Source: AGRyM1uNgY6kJqNmGTUqUeqOlj3ZjwvUrfdraevXjfuN+kI/j8O+Z4zCkE5pq9WtpOQ+UW+8LovEKw== X-Received: by 2002:a7b:ce87:0:b0:3a3:19bf:35e0 with SMTP id q7-20020a7bce87000000b003a319bf35e0mr15586546wmj.120.1658582094320; Sat, 23 Jul 2022 06:14:54 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id d6-20020a5d6446000000b0021db2dcd0aasm8365301wrw.108.2022.07.23.06.14.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Jul 2022 06:14:51 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237739 Archived-At: 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.