branch: externals/urgrep
commit c15be33112948d75711f015c0e6bc4cf6d9b0d79
Author: Jim Porter <jporterb...@gmail.com>
Commit: Jim Porter <jporterb...@gmail.com>

    Wrap shell argument quoting with `with-connection-local-variables`
    
    This ensures that we use the correct style of quoting for the system in
    question, whether remote or local.
---
 urgrep.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/urgrep.el b/urgrep.el
index 69dc75546f..79449de4de 100644
--- a/urgrep.el
+++ b/urgrep.el
@@ -488,10 +488,12 @@ COLOR: non-nil (the default) if the output should use 
color."
           (let* ((prop (intern (concat (symbol-name k) "-arguments")))
                  (args (urgrep--get-prop-pcase prop tool v)))
             (setq arguments (cl-substitute args k arguments))))
-        ;; FIXME: Inside compile and dired buffers, `shell-quote-argument'
-        ;; doesn't handle TRAMP right...
         (setq arguments (flatten-list arguments))
-        (mapconcat #'urgrep--maybe-shell-quote-argument arguments " ")))))
+        ;; XXX: Should we wrap more code with 
`with-connection-local-variables'?
+        ;; There might be some other variables we use that would benefit from
+        ;; being connection-local aware...
+        (with-connection-local-variables
+         (mapconcat #'urgrep--maybe-shell-quote-argument arguments " "))))))
 
 
 ;; urgrep-mode

Reply via email to