From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#23453: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep Date: Wed, 04 May 2016 21:39:39 +0000 Message-ID: References: <834madioy0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0441f49dd79705320b1003 X-Trace: ger.gmane.org 1462398165 14429 80.91.229.3 (4 May 2016 21:42:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 May 2016 21:42:45 +0000 (UTC) Cc: 23453@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 04 23:42:33 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ay4Yx-00031B-Pf for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 May 2016 23:42:32 +0200 Original-Received: from localhost ([::1]:50470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4Yt-0005eh-Ox for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 May 2016 17:42:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4Yk-0005RU-GZ for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:42:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay4YY-000106-Nx for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:42:13 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4YX-0000xQ-IC for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:42:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ay4YU-0000HR-3I for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 May 2016 21:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23453 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru Original-Received: via spool by submit@debbugs.gnu.org id=B.14623980941045 (code B ref -1); Wed, 04 May 2016 21:42:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 May 2016 21:41:34 +0000 Original-Received: from localhost ([127.0.0.1]:38391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay4Y2-0000Gm-7L for submit@debbugs.gnu.org; Wed, 04 May 2016 17:41:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay4Y0-0000GX-NX for submit@debbugs.gnu.org; Wed, 04 May 2016 17:41:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay4Xm-0000W7-1F for submit@debbugs.gnu.org; Wed, 04 May 2016 17:41:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4Xk-0000U6-Rj for submit@debbugs.gnu.org; Wed, 04 May 2016 17:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4XQ-0003cE-2A for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:41:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay4XC-0000Jc-3F for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:40:48 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:36272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay4Wq-0008IO-63; Wed, 04 May 2016 17:40:21 -0400 Original-Received: by mail-oi0-x231.google.com with SMTP id x201so81967844oif.3; Wed, 04 May 2016 14:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vn71fWWXXb53QDyBKgu63YOXX51NrvtWe+evqf8Hn1M=; b=sPZ0i0WXvUY2wBnxdTHoAA8yhXBoDXsc+lUzN/V/3bQSCPBFFvpzuNqFyMwOD3lP+E BI32wEDHtDFG4TYh73hK4ApY8pEW3vOCY/IjA2uay5iRSDTVh1L0SGnTPCYVbxhGsBJP W0LBOgbX31FtMKpWzwE+1KMX6O2KPicVf5rijUvy37lZcjXfe34Iw/zDaKOCVKVKR9os 9Z8Eb5+BrOcyKYdQprDTC+Z/RIo3erTteDas+aMoKHvEJ3XQH+V5CA+rF+keAMSyhXnk g1CWP9euIGMBrffKIcTe2vRn/qeKupjJTsichx2UUk1ACYz5w7jQIlBTMVj0E4xrJbXc Z6Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vn71fWWXXb53QDyBKgu63YOXX51NrvtWe+evqf8Hn1M=; b=bJ75sQXKKBHJ6Xznv8pI7u6VJ/q7j5BaRoPQhriONX81NrVl8PiuYTOrytF1sy9iwV wnHyfN1k6kVH6MxqMzVn9xDqO2KtcZvfq0p04o/GfrLduH3gltwCQ2NnRdCgLGTsxwXc 3Oj1fgg9abdQbLWthPu4ITEypl92/yI9bMjSz3qnqeC73+45hm+bMZS8S6LsoaGTfnL7 AF7jg1UnibDrvZX9ZUyDi5autAxkxBV02k/eoNa0G69GR6EMRuVBULNuASdxVXIoRlKL epagjQLlt97b1a9BiYR7Wc7hpvsAA82vltjjRUgiEhloOKm4Csi4/Woo8Uokab5qfzuh Mo4A== X-Gm-Message-State: AOPr4FXkYf/GAlF//u32nVJtF+yR9AQ5KDIFvPNVZre0RLYigquM0WPJEDE6xscq5D7edsqVL/BLrIuZMSiZEg== X-Received: by 10.157.0.68 with SMTP id 62mr5592515ota.189.1462397988359; Wed, 04 May 2016 14:39:48 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117807 Archived-At: --94eb2c0441f49dd79705320b1003 Content-Type: text/plain; charset=UTF-8 Here's an alternative patch which does the same thing: >From 788e97faa859798b67ec7b0b7facd843fae85c5f Mon Sep 17 00:00:00 2001 From: Kaushal Modi 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 --94eb2c0441f49dd79705320b1003 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here's an alternative patch which does the same thing:=

From 788e97faa859798b67ec7b0b7facd843fae85c5f Mon = Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Wed, 4 = May 2016 17:37:42 -0400
Subject: [PATCH] Shell escape arguments f= or find cmd used by xref

* lisp/progmodes/xref.el = (xref--rgrep-command): When the dir has
=C2=A0 characters like sp= aces (e.g. /tmp/some dir/), those need to be escaped
=C2=A0 befor= e passing it as an argument to the shell command like `find'.
=C2=A0 The escaping is done using `shell-quote-argument' (bug#23453).<= /div>
---
=C2=A0lisp/progmodes/xref.el | 4 ++--
=C2= =A01 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
ind= ex 62cef23..1764e88 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -921,8 +921,8 @@ xref--rgrep-com= mand
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(concat &quo= t; -o " find-name-arg " "))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 " "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (shell-quote-argument ")"))
- =C2=A0 dir<= /div>
- =C2=A0 (xref--find-ignores-arguments ignores dir)))
+= =C2=A0 (shell-quote-argument dir)
+ =C2=A0 (xref--find-ignores-a= rguments ignores (shell-quote-argument dir))))
=C2=A0
= =C2=A0(defun xref--find-ignores-arguments (ignores dir)
=C2=A0 = =C2=A0"Convert IGNORES and DIR to a list of arguments for 'find= 9;.
--=C2=A0
2.6.0.rc0.24.gec371ff

=
--

--
Kaushal Modi

--94eb2c0441f49dd79705320b1003--