emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/consult 4e7f8c6e18: consult-grep: Fix detection of rege


From: ELPA Syncer
Subject: [elpa] externals/consult 4e7f8c6e18: consult-grep: Fix detection of regexp type on remote hosts (Fix #811)
Date: Fri, 9 Jun 2023 12:57:32 -0400 (EDT)

branch: externals/consult
commit 4e7f8c6e1840dbacdaa25c67d23a6bbd451ba2c5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    consult-grep: Fix detection of regexp type on remote hosts (Fix #811)
---
 consult.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/consult.el b/consult.el
index e26979398c..d84c821dca 100644
--- a/consult.el
+++ b/consult.el
@@ -4756,10 +4756,9 @@ input."
 
 (defun consult--grep-lookahead-p (&rest cmd)
   "Return t if grep CMD supports look-ahead."
-  (with-temp-buffer
-    (insert "xaxbx")
-    (eq 0 (apply #'call-process-region (point-min) (point-max)
-                 (car cmd) nil nil nil `(,@(cdr cmd) "^(?=.*b)(?=.*a)")))))
+  (eq 0 (process-file-shell-command
+         (concat "echo xaxbx | "
+                 (mapconcat #'shell-quote-argument `(,@cmd "^(?=.*b)(?=.*a)") 
" ")))))
 
 (defun consult--grep-make-builder (paths)
   "Build grep command line and grep across PATHS."
@@ -4916,7 +4915,7 @@ INITIAL is initial input."
   (let* ((cmd (seq-mapcat (lambda (x)
                             (if (equal x ".") paths (list x)))
                           (consult--build-args consult-find-args)))
-         (type (if (eq 0 (call-process-shell-command
+         (type (if (eq 0 (process-file-shell-command
                           (concat (car cmd) " -regextype emacs -version")))
                    'emacs 'basic)))
     (lambda (input)



reply via email to

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