Subject: bug#23453: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep

From: Kaushal Modi <[email-masked]>
Date: Wed, 04 May 2016 21:39:39 +0000

Here's an alternative patch which does the same thing:

>From 788e97faa859798b67ec7b0b7facd843fae85c5f Mon Sep 17 00:00:00 2001
From: Kaushal Modi <[email-masked]>
Date: Wed, 4 May 2016 17:37:42 -0400
Subject: [PATCH] Shell escape arguments for find cmd used by xref

* lisp/progmodes/xref.el (xref--rgrep-command): When the dir has
  characters like spaces (e.g. /tmp/some dir/), those need to be escaped
  before passing it as an argument to the shell command like `find'.
  The escaping is done using `shell-quote-argument' (bug#23453).
---
 lisp/progmodes/xref.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 62cef23..1764e88 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -921,8 +921,8 @@ xref--rgrep-command
             (concat " -o " find-name-arg " "))
            " "
            (shell-quote-argument ")"))
-   dir
-   (xref--find-ignores-arguments ignores dir)))
+   (shell-quote-argument dir)
+   (xref--find-ignores-arguments ignores (shell-quote-argument dir))))

 (defun xref--find-ignores-arguments (ignores dir)
   "Convert IGNORES and DIR to a list of arguments for 'find'.
-- 
2.6.0.rc0.24.gec371ff

-- 

-- 
Kaushal Modi