]> git.eshelyaron.com Git - emacs.git/commitdiff
Support new "binary file matches" format in Ripgrep 13
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 23 Jul 2022 12:23:56 +0000 (15:23 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 23 Jul 2022 12:23:56 +0000 (15:23 +0300)
* lisp/progmodes/xref.el (xref-matches-in-files):
Support new "binary file matches" format in Ripgrep 13
(bug#56624).

lisp/progmodes/xref.el

index 0213ab3cc58171c274106b453b883730fb68d40d..edfb62ea7a4ec1e6351cbc949f2990cde408b61b 100644 (file)
@@ -1821,7 +1821,8 @@ to control which program to use when looking for matches."
       (when (and (/= (point-min) (point-max))
                  (not (looking-at grep-re))
                  ;; TODO: Show these matches as well somehow?
-                 (not (looking-at "Binary file .* matches")))
+                 ;; Matching both Grep's and Ripgrep 13's messages.
+                 (not (looking-at ".*[bB]inary file.* matches")))
         (user-error "Search failed with status %d: %s" status
                     (buffer-substring (point-min) (line-end-position))))
       (while (re-search-forward grep-re nil t)