From unknown Thu Jun 19 14:00:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23453 <23453@debbugs.gnu.org> To: bug#23453 <23453@debbugs.gnu.org> Subject: Status: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep Reply-To: bug#23453 <23453@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:00:54 +0000 retitle 23453 25.0.93; dired-do-find-regexp does not work on Windows even a= fter installing GNU find and grep reassign 23453 emacs submitter 23453 Kaushal Modi severity 23453 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 15:41:32 2016 Received: (at submit) by debbugs.gnu.org; 4 May 2016 19:41:32 +0000 Received: from localhost ([127.0.0.1]:38260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay2fr-0005kH-Gi for submit@debbugs.gnu.org; Wed, 04 May 2016 15:41:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay2fo-0005k2-VW for submit@debbugs.gnu.org; Wed, 04 May 2016 15:41:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay2fY-0007fZ-Gx for submit@debbugs.gnu.org; Wed, 04 May 2016 15:41:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2fX-0007ej-Ax for submit@debbugs.gnu.org; Wed, 04 May 2016 15:41:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2fJ-0000Su-Pc for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 15:41:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay2f4-0007YA-81 for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 15:40:50 -0400 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:33481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2eq-0007Hs-07; Wed, 04 May 2016 15:40:29 -0400 Received: by mail-oi0-x235.google.com with SMTP id v145so78117963oie.0; Wed, 04 May 2016 12:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=j3iXeC7ncvz5fOBmhnbID0Xw/RlHEfY+alArgb+79Sk=; b=PAVONgVBISjW2Q8eGQ5Nz/bQ8zHOH/1AqswQ2+6iKXGSoX4/ZKAhQIchawf0xCMOC0 jCrJA8ZBtIvrSZtXjVGTgKH/bTalM79yXGQ6U/fstC9WRKjdtR1waGfAK5y+hRGh44KB FapWKX8UGLCgXeU82Tt8aEk7IpjzGLrSE2BCnxlvh76GwNHlrp7cdHW1K4dy4DVbEJYy zgHRALn0S8OJqg/urnbT9stfVVlFCaKTMNoEgj3SN5G/wgcEC8LQRnVLfjsb5i7t5zC8 kF5xvm0nkY6rmznxWiiGuE/H75h7q/xFHprk8/iPFtMDVMBjD9cmUzYogtMxno+p9ERK EPvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=j3iXeC7ncvz5fOBmhnbID0Xw/RlHEfY+alArgb+79Sk=; b=ViXQDxOsEPm9gujJ/gVFho9j7Xo/qdcDawLq5qvW9xQi0rKuuRfrNT8ot/D2hOjvY6 AefjWqsPcDV5I4b6PD90RQUqiu41Z0U3GkubDdIuSX+fa5Mm+jfq0l81y9iAd3pCYtzB tsIWq9ELF+kIrkrdr1qnObQ7x/C40BX5n/LWcB7twcVgMpSB6idEbGpCoD7ab/8QxWOK qtsrjfbNkuSJQg563L8qQAzxPZcLezZTVIhdtHELuyE1cHC0DcG4fkTuRW8Yv2Ophxu5 uZDoAzDVaf4QDp2bP7uQ+8kpUXbL/CiyXtOs08ek3II4KblIdRseuannjbEr+60Zvn5+ TN9Q== X-Gm-Message-State: AOPr4FWi2wIzZCYcam5sD5+wTqN/86Coji/oEtF0Aeq5TfYDIjEIpj6qHrIvXVo5haWT0HuA+HbxYxFa3GHqAg== X-Received: by 10.157.0.68 with SMTP id 62mr5338400ota.189.1462390796084; Wed, 04 May 2016 12:39:56 -0700 (PDT) MIME-Version: 1.0 From: Kaushal Modi Date: Wed, 04 May 2016 19:39:45 +0000 Message-ID: Subject: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: "bug-gnu-emacs@gnu.org" , Dmitry Gutov , Eli Zaretskii Content-Type: multipart/alternative; boundary=94eb2c0441f4ec6fca0532096355 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c0441f4ec6fca0532096355 Content-Type: text/plain; charset=UTF-8 --text follows this line-- Hi, This is on 64-bit Windows 7 Enterprise version. It did not have the GNU find and grep by default. So I downloaded the following ports: (1) https://sourceforge.net/projects/ezwinports/files/findutils-4.2.30-5-w32-bin.zip/download (2) https://sourceforge.net/projects/ezwinports/files/grep-2.10-w32-bin.zip/download extracted them and added the resultant bin directory ( C:\Users\kmodi\Dropbox\Portable Software\ezwinports\bin ) to the user PATH environment variable. The problem is that the user PATH env var comes at a lower order of precendence than the system value of the PATH env var. So first the admin controlled directories come in PATH and then the user added directories come. So the newly added "C:\Users\kmodi\Dropbox\Portable Software\ezwinports\bin" comes at the very end when I do C-h v exec-path and (getenv "PATH"). So the find.exe found by emacs is the one in C:\Windows\System32\find.exe By I used the brute-force method below just so that the correct find.exe and grep.exe are found by emacs: (setq exec-path '("C:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin" "c:/ProgramData/Oracle/Java/javapath" "C:/Program Files (x86)/NVIDIA Corporation/PhysX/Common" "C:/Windows/system32" "C:/Windows" "C:/Windows/System32/Wbem" "C:/Windows/System32/WindowsPowerShell/v1.0/" "C:/Program Files/WIDCOMM/Bluetooth Software/" "C:/Program Files/WIDCOMM/Bluetooth Software/syswow64" "C:/Program Files/Intel/WiFi/bin/" "C:/Program Files/Common Files/Intel/WirelessCommon/" "C:/Program Files (x86)/QuickTime/QTSystem/" "C:/Program Files (x86)/Common Files/Roxio Shared/DLLShared/" "C:/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared/" "C:/Program Files (x86)/Common Files/Roxio Shared/OEM/DLLShared/" "C:/Program Files (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared/" "C:/Program Files (x86)/Roxio/OEM/AudioCore/" "C:/Users/kmodi/.yari/bin" "C:/Python27" "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/" "C:/Program Files/MATLAB/R2013a/runtime/win64" "C:/Program Files/MATLAB/R2013a/bin" "C:/Program Files (x86)/Intel/OpenCL SDK/2.0/bin/x86" "C:/Program Files (x86)/Intel/OpenCL SDK/2.0/bin/x64" "C:/Users/k" "C:/Program Files/Git/cmd" "C:/Users/kmodi/.yari/bin" "C:/Users/kmodi/.yari/ruby-1.9.3-p194-i386-mingw32/bin" "C:/Users/kmodi/AppData/Local/bin" "." "c:/Users/kmodi/Dropbox/Portable Software/emacs/libexec/emacs/25.0.93/x86_64-w64-mingw32")) (setenv "PATH" "C:\\Users\\kmodi\\Dropbox\\Portable Software\\ezwinports\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\syswow64;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\12.0\\DLLShared\\;C:\\Program Files (x86)\\Roxio\\OEM\\AudioCore\\;C:\\Users\\kmodi\\.yari\\bin;C:\\Python27;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files\\MATLAB\\R2013a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2013a\\bin;C:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x64;C:\\Users\\k;C:\\Program Files\\Git\\cmd;C:\\Users\\kmodi\\.yari\\bin;C:\\Users\\kmodi\\.yari\\ruby-1.9.3-p194-i386-mingw32\\bin;C:\\Users\\kmodi\\AppData\\Local\\bin;.;") Now I get "c:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin/find.exe" when I do (executable-find "find"), and "c:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin/grep.exe" when I do (executable-find "grep"). But even now, the A command (dired-do-find-regexp) in dired does not work. Here's how I verified it to not work: (1) I downloaded http://git.savannah.gnu.org/cgit/emacs.git/plain/etc/NEWS as NEWS.txt to a folder in Windows. (2) In emacs -Q with the above fixes to exec-path and PATH env var, with find.exe and grep.exe being the correct one, I use C-x d to open dired in the folder containing NEWS.exe (3) I mark NEWS.txt using `m' key (4) Then I do `A' and search for "Emacs" All I get is "No matches for: Emacs" (whereas the same steps to search "Emacs" in NEWS.txt work as expected in RHEL) - So, what could have gone wrong in this? - What debug info can I provide? The find.exe and grep.exe look correct. Do I need to install anything else from ezwinports? (Also I shouldn't have needed to shuffle the exec-path and PATH as above to point to the correct find and grep executables.) In GNU Emacs 25.0.93.2 (x86_64-w64-mingw32) of 2016-04-23 built on .. Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Configured using: 'configure --prefix=/tmp/emacs --without-imagemagick --enable-checking=yes,glyphs --enable-check-lisp-object-type 'CFLAGS=-Og -gdwarf-4 -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Messages Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: user-error: Minibuffer window is not active Mark set [5 times] "C:\\Users\\kmodi\\Dropbox\\Portable Software\\ezwinports\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\syswow64;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\12.0\\DLLShared\\;C:\\Program Files (x86)\\Roxio\\OEM\\AudioCore\\;C:\\Users\\kmodi\\.yari\\bin;C:\\Python27;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files\\MATLAB\\R2013a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2013a\\bin;C:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x64;C:\\Users\\k;C:\\Program Files\\Git\\cmd;C:\\Users\\kmodi\\.yari\\bin;C:\\Users\\kmodi\\.yari\\ruby-1.9.3-p194-i386-mingw32\\bin;C:\\Users\\kmodi\\AppData\\Local\\bin;.;" [2 times] user-error: No matches for: icons Quit user-error: No matches for: Emacs user-error: Beginning of history; no preceding item "c:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin/find.exe" GNU Emacs 25.0.93.2 (x86_64-w64-mingw32) of 2016-04-23 Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils thingatpt help-fns find-dired semantic/fw mode-local find-func xref cl-seq project eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv cl-extra help-mode easymenu grep compile comint ansi-color ring misearch multi-isearch dired-aux dired edmacro kmacro cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify dbusbind w32 multi-tty make-network-process emacs) Memory information: ((conses 16 115954 17326) (symbols 56 22177 0) (miscs 48 87 139) (strings 32 22933 5432) (string-bytes 1 705086) (vectors 16 15394) (vector-slots 8 475031 4303) (floats 8 230 198) (intervals 56 1290 331) (buffers 976 15)) -- -- Kaushal Modi --94eb2c0441f4ec6fca0532096355 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
--text follows this l= ine--

Hi,

This= is on 64-bit Windows 7 Enterprise version.

It did= not have the GNU find and grep by default. So I downloaded the following p= orts:


extracted them and added the resultant bin directory (=C2=A0C:\User= s\kmodi\Dropbox\Portable Software\ezwinports\bin ) to the user PATH environ= ment variable.

The problem is that the user PATH e= nv var comes at a lower order of precendence than the system value of the P= ATH env var. So first the admin controlled directories come in PATH and the= n the user added directories come.

So the newly ad= ded "C:\Users\kmodi\Dropbox\Portable Software\ezwinports\bin" com= es at the very end when I do C-h v exec-path and (getenv "PATH").=

So the find.exe found by emacs is the one in C:\W= indows\System32\find.exe

By I used the brute-force= method below just so that the correct find.exe and grep.exe are found by e= macs:

(setq exec-path '("C:/Users/km= odi/Dropbox/Portable Software/ezwinports/bin"
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "c:/ProgramData/Oracl= e/Java/javapath"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 "C:/Program Files (x86)/NVIDIA Corporation/PhysX/= Common"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 "C:/Windows/system32"
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Windows"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Win= dows/System32/Wbem"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 "C:/Windows/System32/WindowsPowerShell/v1.0/&= quot;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 "C:/Program Files/WIDCOMM/Bluetooth Software/"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Progra= m Files/WIDCOMM/Bluetooth Software/syswow64"
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Files/Int= el/WiFi/bin/"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "C:/Program Files/Common Files/Intel/WirelessCommon/= "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 "C:/Program Files (x86)/QuickTime/QTSystem/"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Progra= m Files (x86)/Common Files/Roxio Shared/DLLShared/"
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Fi= les (x86)/Common Files/Roxio Shared/OEM/DLLShared/"
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Fi= les (x86)/Common Files/Roxio Shared/OEM/DLLShared/"
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Fi= les (x86)/Common Files/Roxio Shared/OEM/12.0/DLLShared/"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Progra= m Files (x86)/Roxio/OEM/AudioCore/"
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Users/kmodi/.yari/bin"=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &= quot;C:/Python27"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 "C:/Program Files/MiKTeX 2.9/miktex/bin/x64/"= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = "C:/Program Files/MATLAB/R2013a/runtime/win64"
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Fi= les/MATLAB/R2013a/bin"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Files (x86)/Intel/OpenCL SDK/2= .0/bin/x86"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 "C:/Program Files (x86)/Intel/OpenCL SDK/2.0/bin/x64&qu= ot;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 "C:/Users/k"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 "C:/Program Files/Git/cmd"
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "C:/Users/= kmodi/.yari/bin"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 "C:/Users/kmodi/.yari/ruby-1.9.3-p194-i386-mingw3= 2/bin"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 "C:/Users/kmodi/AppData/Local/bin"=C2=A0
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &qu= ot;c:/Users/kmodi/Dropbox/Portable Software/emacs/libexec/emacs/25.0.93/x86= _64-w64-mingw32"))

(setenv "PATH" &= quot;C:\\Users\\kmodi\\Dropbox\\Portable Software\\ezwinports\\bin;C:\\Prog= ramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\NVIDIA Corporation= \\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wb= em;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\WIDC= OMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\s= yswow64;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Fil= es\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;= C:\\Program Files (x86)\\Common Files\\Roxio Shared\\DLLShared\\;C:\\Progra= m Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;C:\\Program Fil= es (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;C:\\Program Files (x= 86)\\Common Files\\Roxio Shared\\OEM\\12.0\\DLLShared\\;C:\\Program Files (= x86)\\Roxio\\OEM\\AudioCore\\;C:\\Users\\kmodi\\.yari\\bin;C:\\Python27;C:\= \Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files\\MATLAB\\R= 2013a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2013a\\bin;C:\\Program Fi= les (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C:\\Program Files (x86)\\Intel\= \OpenCL SDK\\2.0\\bin\\x64;C:\\Users\\k;C:\\Program Files\\Git\\cmd;C:\\Use= rs\\kmodi\\.yari\\bin;C:\\Users\\kmodi\\.yari\\ruby-1.9.3-p194-i386-mingw32= \\bin;C:\\Users\\kmodi\\AppData\\Local\\bin;.;")

<= /div>
Now I get=C2=A0

"c:/Users/kmod= i/Dropbox/Portable Software/ezwinports/bin/find.exe"

when I do (executable-find "find"), and=C2=A0
<= br>
"c:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin= /grep.exe"

when I do (executable-find &= quot;grep").

But even now, the A command (dir= ed-do-find-regexp) in dired does not work.

Here= 9;s how I verified it to not work:

(1) I downloade= d=C2=A0http://git.savannah.gnu.org/cgit/emacs.git/plain/etc/NEWS=C2=A0as NEW= S.txt to a folder in Windows.
(2) In emacs -Q with the above fixe= s to exec-path and PATH env var, with find.exe and grep.exe being the corre= ct one, I use C-x d to open dired in the folder containing NEWS.exe
(3) I mark NEWS.txt using `m' key
(4) Then I do `A' an= d search for "Emacs"

All I get is "= No matches for: Emacs"
(whereas the same steps to search &qu= ot;Emacs" in NEWS.txt work as expected in RHEL)

- So, what could have gone wrong in this?
- What debug info ca= n I provide? The find.exe and grep.exe look correct. Do I need to install a= nything else from ezwinports?

(Also I shouldn'= t have needed to shuffle the exec-path and PATH as above to point to the co= rrect find and grep executables.)

In GNU Emacs 25.= 0.93.2 (x86_64-w64-mingw32)
=C2=A0of 2016-04-23 built on ..
=
Windowing system distributor 'Microsoft Corp.', version 6.1.76= 01
Configured using:
=C2=A0'configure --prefix=3D/t= mp/emacs --without-imagemagick
=C2=A0--enable-checking=3Dyes,glyp= hs --enable-check-lisp-object-type
=C2=A0'CFLAGS=3D-Og -gdwar= f-4 -g3''

Configured features:
X= PM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system: cp1252=

Major mode: Messages

Min= or modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 globa= l-eldoc-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 m= ouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-= bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 glob= al-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 bl= ink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2= =A0 auto-encryption-mode: t
=C2=A0 auto-compression-mode: t
=
=C2=A0 buffer-read-only: t
=C2=A0 line-number-mode: t
<= div>=C2=A0 transient-mark-mode: t

Recent messages:=
user-error: Minibuffer window is not active
Mark set [= 5 times]
"C:\\Users\\kmodi\\Dropbox\\Portable Software\\ezwi= nports\\bin;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)= \\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\system32;C:\\Windows;C:\\W= indows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\= \Program Files\\WIDCOMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\B= luetooth Software\\syswow64;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Progr= am Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\Qu= ickTime\\QTSystem\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\DL= LShared\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShar= ed\\;C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\DLLShared\\;= C:\\Program Files (x86)\\Common Files\\Roxio Shared\\OEM\\12.0\\DLLShared\\= ;C:\\Program Files (x86)\\Roxio\\OEM\\AudioCore\\;C:\\Users\\kmodi\\.yari\\= bin;C:\\Python27;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Prog= ram Files\\MATLAB\\R2013a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2013a= \\bin;C:\\Program Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x86;C:\\Program= Files (x86)\\Intel\\OpenCL SDK\\2.0\\bin\\x64;C:\\Users\\k;C:\\Program Fil= es\\Git\\cmd;C:\\Users\\kmodi\\.yari\\bin;C:\\Users\\kmodi\\.yari\\ruby-1.9= .3-p194-i386-mingw32\\bin;C:\\Users\\kmodi\\AppData\\Local\\bin;.;" [2= times]
user-error: No matches for: icons
Quit
user-error: No matches for: Emacs
user-error: Beginning of hist= ory; no preceding item
"c:/Users/kmodi/Dropbox/Portable Soft= ware/ezwinports/bin/find.exe"
GNU Emacs 25.0.93.2 (x86_64-w6= 4-mingw32) of 2016-04-23
Making completion list...

=
Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec r= fc822 mml mml-sec
password-cache epg epg-config gnus-util mm-deco= de mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils ma= ilheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr m= ail-utils thingatpt help-fns
find-dired semantic/fw mode-local fi= nd-func xref cl-seq project eieio
byte-opt bytecomp byte-compile = cconv eieio-core cl-macs gv cl-extra
help-mode easymenu grep comp= ile comint ansi-color ring misearch
multi-isearch dired-aux dired= edmacro kmacro cl-loaddefs pcase cl-lib
time-date mule-util tool= tip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type m= wheel dos-w32 ls-lisp disp-table w32-win w32-vars
term/common-win= tool-bar dnd fontset image regexp-opt fringe
tabulated-list newc= omment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-= eshadow timer select scroll-bar mouse jit-lock font-lock
syntax f= acemenu font-core frame cl-generic cham georgian utf-8-lang
misc-= lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian=
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces<= /div>
cus-face macroexp files text-properties overlay sha1 md5 base64 f= ormat
env code-pages mule custom widget hashtable-print-readable = backquote
w32notify dbusbind w32 multi-tty make-network-process e= macs)

Memory information:
((conses 16 11= 5954 17326)
=C2=A0(symbols 56 22177 0)
=C2=A0(miscs 48 = 87 139)
=C2=A0(strings 32 22933 5432)
=C2=A0(string-byt= es 1 705086)
=C2=A0(vectors 16 15394)
=C2=A0(vector-slo= ts 8 475031 4303)
=C2=A0(floats 8 230 198)
=C2=A0(inter= vals 56 1290 331)
=C2=A0(buffers 976 15))

--

--
Kaushal Modi

--94eb2c0441f4ec6fca0532096355-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 15:50:04 2016 Received: (at submit) by debbugs.gnu.org; 4 May 2016 19:50:04 +0000 Received: from localhost ([127.0.0.1]:38265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay2o7-0005xf-Su for submit@debbugs.gnu.org; Wed, 04 May 2016 15:50:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay2o6-0005x6-NF for submit@debbugs.gnu.org; Wed, 04 May 2016 15:50:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay2ns-0001Sl-49 for submit@debbugs.gnu.org; Wed, 04 May 2016 15:49:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2ns-0001S3-1Z for submit@debbugs.gnu.org; Wed, 04 May 2016 15:49:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2ng-0002tJ-DU for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 15:49:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay2nS-0001NV-Lf for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 15:49:28 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2nG-0001Ji-Ht; Wed, 04 May 2016 15:49:10 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2682 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ay2nA-0001f8-4s; Wed, 04 May 2016 15:49:04 -0400 Date: Wed, 04 May 2016 22:49:11 +0300 Message-Id: <834madioy0.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Wed, 04 May 2016 19:39:45 +0000) Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep References: 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.1 (-------) > From: Kaushal Modi > Date: Wed, 04 May 2016 19:39:45 +0000 > > The problem is that the user PATH env var comes at a lower order of precendence than the system value of > the PATH env var. So first the admin controlled directories come in PATH and then the user added directories > come. You need to change the system Path, not the user Path. Alternatively, rename the MS find.exe to something else. > By I used the brute-force method below just so that the correct find.exe and grep.exe are found by emacs: > > (setq exec-path '("C:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin" > "c:/ProgramData/Oracle/Java/javapath" No, don't do that, it won't work (as you have found out). Emacs sometimes invokes commands through the shell, which doesn't know about exec-path. This way lies madness. You should have your PATH and the corresponding Emacs variables in sync. (This is all basic Windows setup, nothing related to Emacs, btw.) From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 15:57:42 2016 Received: (at submit) by debbugs.gnu.org; 4 May 2016 19:57:43 +0000 Received: from localhost ([127.0.0.1]:38270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay2vW-00068X-MB for submit@debbugs.gnu.org; Wed, 04 May 2016 15:57:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay2vV-00068L-F7 for submit@debbugs.gnu.org; Wed, 04 May 2016 15:57:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay2vG-0003Xj-NU for submit@debbugs.gnu.org; Wed, 04 May 2016 15:57:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2vF-0003Vg-Hn for submit@debbugs.gnu.org; Wed, 04 May 2016 15:57:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2v2-0003t6-68 for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 15:57:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay2um-0003Dj-2p for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 15:57:04 -0400 Received: from mail-ob0-x22c.google.com ([2607:f8b0:4003:c01::22c]:35166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay2uZ-0002rB-Km; Wed, 04 May 2016 15:56:44 -0400 Received: by mail-ob0-x22c.google.com with SMTP id n10so26493543obb.2; Wed, 04 May 2016 12:56:15 -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=9GIgrrb0D/EUigDH+xkJlQ2DMc+2WEmMdYWviB62yd8=; b=xNIDHQGd10N93QaYQBDPnL0lnTOd2EG+7adcA/CjijymZoFyea8bzuE3bcwo+nx/PM HVd94Pd4sRXy9AfL+/pNolh0TRZyvI9xEOb/ymyks25fvCW7xHiuDQ77a14yVvp7Yaz5 SRK393lJZztWw4JjDdzW0OEngthuFWAGTQleNYpTxX8Xu84XiwJW/B9w1mjemPTX5T88 i59DXSUgNrDU5clZMoxVpkz95D89MPhaF+4IcOge2u/+1ont0/jsEaUaAK/skplRkv5Y +tk0dPLdPGvbFIu0Jdehc3lmsTllXAXEhQXrAQ7atwnrkp1Apb6EfytDLeQWMr6oTlXu odbA== 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=9GIgrrb0D/EUigDH+xkJlQ2DMc+2WEmMdYWviB62yd8=; b=VBOxK/I+Sr+MqInsC2LvV70+sl8+J3/TGu7kcAjMBq0OMmYwlPivuutPvd9QI/p/zx Ds43WGpFv/ExI9GNQ/meloRQnuQZfJerNDkaH1R3fNc++ggBe6cfyZaZrpv1/Em6+cU5 O54mitn5ihotqhPGQwibxZY64ync+8LP6BMd35fOjMZNMwxHcJddeB1w5Co1CuJwt3d5 W2DbbkVoAeCZpgefsdgPt25D1XrEvilqf69AyM+fzFFOv2SUt873pP7fmQ33r5uzgGYp dCCvJVVOWEBCLIOWPxen3WF3ZtZ1nhK64IjXhtvhCeuMTQ91SXsEbLAVKmOGz7cJ4NsQ oIVQ== X-Gm-Message-State: AOPr4FWuqevgCm0+r0kPBK7hChZ4i79FUvUTDgiYJkNprRHM0ymyQwcWWUDywGFMlcHhfXlxvLtvMWlv75h1qw== X-Received: by 10.60.97.40 with SMTP id dx8mr3104646oeb.30.1462391771809; Wed, 04 May 2016 12:56:11 -0700 (PDT) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> In-Reply-To: <834madioy0.fsf@gnu.org> From: Kaushal Modi Date: Wed, 04 May 2016 19:56:02 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Eli Zaretskii Content-Type: multipart/alternative; boundary=089e011611b414ceb50532099e75 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e011611b414ceb50532099e75 Content-Type: text/plain; charset=UTF-8 > > You need to change the system Path, not the user Path. > > Alternatively, rename the MS find.exe to something else. > I do not have admin access (work computer). Wouldn't (setenv "PATH" "..") be the same? If I rename the MS find.exe (which I cannot without admin aceess), will it not affect any other program using it? > > By I used the brute-force method below just so that the correct find.exe > and grep.exe are found by emacs: > > > > (setq exec-path '("C:/Users/kmodi/Dropbox/Portable > Software/ezwinports/bin" > > "c:/ProgramData/Oracle/Java/javapath" > > No, don't do that, it won't work (as you have found out). Emacs > sometimes invokes commands through the shell, which doesn't know about > exec-path. This way lies madness. You should have your PATH and the > corresponding Emacs variables in sync. > > (This is all basic Windows setup, nothing related to Emacs, btw.) > As I mentioned, I also set the PATH using (setenv "PATH "..."). Isn't executable-find returning the correct find.exe and grep.exe a proof that the right executable is being found. I have had this in my config and it works fine (for a different executable chrome.exe): (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Application/")) (setq exec-path (append exec-path `(,chrome-path))) (setq browse-url-generic-program (executable-find "chrome"))) -- -- Kaushal Modi --089e011611b414ceb50532099e75 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
= You need to change the system Path, not the user Path.

Alternatively, rename the MS find.exe to something else.

I do not have admin access (work computer). Wouldn't = (setenv "PATH" "..") be the same?

<= div>If I rename the MS find.exe (which I cannot without admin aceess), will= it not affect any other program using it?
=C2=A0
> By I used the brute-force method below just so that the correct find.e= xe and grep.exe are found by emacs:
>
> (setq exec-path '("C:/Users/kmodi/Dropbox/Portable Software/e= zwinports/bin"
> "c:/ProgramData/Oracle/Java/javapath"

No, don't do that, it won't work (as you have found out).=C2=A0 Ema= cs
sometimes invokes commands through the shell, which doesn't know about<= br> exec-path.=C2=A0 This way lies madness.=C2=A0 You should have your PATH and= the
corresponding Emacs variables in sync.

(This is all basic Windows setup, nothing related to Emacs, btw.)

As I mentioned, I also set the PATH using (seten= v "PATH "..."). Isn't executable-find returning the corr= ect find.exe and grep.exe a proof that the right executable is being found.=

I have had this in my config and it works fine (f= or a different executable chrome.exe):

=C2=A0= =C2=A0 (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Appli= cation/"))
=C2=A0 =C2=A0 =C2=A0 (setq exec-path (append exec= -path `(,chrome-path)))
=C2=A0 =C2=A0 =C2=A0 (setq browse-url-gen= eric-program (executable-find "chrome")))


=C2=A0
--

--
Kaushal Modi

--089e011611b414ceb50532099e75-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 16:26:09 2016 Received: (at submit) by debbugs.gnu.org; 4 May 2016 20:26:09 +0000 Received: from localhost ([127.0.0.1]:38312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay3N2-0006rn-P9 for submit@debbugs.gnu.org; Wed, 04 May 2016 16:26:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay3N1-0006rS-36 for submit@debbugs.gnu.org; Wed, 04 May 2016 16:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay3Ml-0001PF-R4 for submit@debbugs.gnu.org; Wed, 04 May 2016 16:25:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay3Mk-0001N5-Fg for submit@debbugs.gnu.org; Wed, 04 May 2016 16:25:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay3MY-0007D1-G6 for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 16:25:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay3MK-0001EM-FS for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 16:25:30 -0400 Received: from mail-ob0-x235.google.com ([2607:f8b0:4003:c01::235]:36484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay3M7-0000jS-O9; Wed, 04 May 2016 16:25:12 -0400 Received: by mail-ob0-x235.google.com with SMTP id aq1so21226211obc.3; Wed, 04 May 2016 13:24:43 -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=IBiSgUA4fNGcpYiqduxIH4+wVDfrH9WIB6BUfmRO86o=; b=oVoIu318M2DH8YrOmpdzqiWGlIHZ8VGYLdKqGuSZwBnNOWYNWrR6KdSDzis+a4VPEO Y0yg93ie9yUkuehkkjUWqs5dbcBAp3Bt3SLVL/Ej5M+UggKSNfQPEvoqopxtxk/N8iix U0XjPtAlMR38wpozmb1oDLYUEeA7MjJ7XE/vSKbdyI/kWjIILr9DvP/eOn7FLiJ14OgI N9xAfbnMpB9By+4BWNbBJcvKp0VgnQRo+UoC2xZCfAE5hSv6Ikn6J+1FizdI1nUZBX6h ZZR03ENlABM8MPK5WfuJ/cq3fD6h16fMJa7mz+yk1zNF3eyKSTuNjbhl9NaCwOPhp/Nc W8/g== 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=IBiSgUA4fNGcpYiqduxIH4+wVDfrH9WIB6BUfmRO86o=; b=VcC1prHcJuoPPeAButp5bNY/wZly/n4U5Kkx9rdIK9GBy1ZYiPuat8XcOwpVv06Lb1 uqecQSaKWKmyrIz3eJInHUK9Jo47UcRqrsuB4cijQiP1iQUmNiQOm5Y838PCS/l6eK5E 8WeFYEV7R28lCLXMG0s35PudTMyOpKSbgVLWS1qdc9Gut2eDIsn6B1X6JJ6Gs16v7Fpd aEt8O8w6MEzGuXKerrw+EwWjtoSzsQiLHisjqXzs81hDayJB6lIaTXIiS8koPP8u3bOQ w8ulV8JX1AXVYQa0oOv18w/fL6GcsfiSkquB+WZCzdy44O+Jt8AYN7b7J0s7H3WI9VmG 55Sw== X-Gm-Message-State: AOPr4FVxzw9tmqDqMUTxbG/LocCRHGSsRQSuQum5xEwaqChMZzLPVwW38uF8WxJUkifSIYgnEk8Pp6YOqlECOA== X-Received: by 10.60.38.225 with SMTP id j1mr3163000oek.24.1462393479718; Wed, 04 May 2016 13:24:39 -0700 (PDT) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Wed, 04 May 2016 20:24:30 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Eli Zaretskii Content-Type: multipart/alternative; boundary=089e013d08f0e1749305320a0339 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e013d08f0e1749305320a0339 Content-Type: text/plain; charset=UTF-8 Oh, as it turns out, the bug is there but not related to not finding find/grep. It IS actually finding the find.exe and grep.exe correctly using the exec-path and/or (setenv "PATH" ..) hacks. The problem was that the file was in a path with spaces in it: C:\Users\kmodi\Desktop\_keep this folder empty\NEWS.txt When I try using `A' in dired with above file marked and search for "Emacs", I get "No matches for: Emacs". Note the spaces in the directory name: "_keep this folder empty" But when I copied NEWS.txt to C:\Users\kmodi\Desktop\NEWS.txt and then did the same "Emacs" search using `A' in dired, it worked! I can recreate this bug in RHEL too! (1) mkdir -p /tmp/some\ dir (2) Download http://git.savannah.gnu.org/cgit/emacs.git/plain/etc/NEWS as /tmp/some\ dir/NEWS.txt (3) In emacs -Q, use C-x d to open dired in /tmp/some\ dir/ (4) Mark NEWS.txt using `m' key (5) Then I do `A' and search for "Emacs" (or probably anything else too) (6) You should get "No matches for: Emacs" Can you please rename the bug title to "25.0.93; dired-do-find-regexp does not work when path contains spaces"? Blocking bug? -- -- Kaushal Modi --089e013d08f0e1749305320a0339 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Oh, as it turns out, the bug is there but not related to n= ot finding find/grep.

It IS actually finding the find.ex= e and grep.exe correctly using the exec-path and/or (setenv "PATH"= ; ..) hacks.

The problem was that the file was in = a path with spaces in it:

C:\Users\kmodi\Desktop\_= keep this folder empty\NEWS.txt

When I try usi= ng `A' in dired with above file marked and search for "Emacs"= , I get "No matches for: Emacs". Note the spaces in the directory= name: "_keep this folder empty"<= /span>

But when I copied NEWS.txt to=C2=A0C:\Users\kmodi\Desktop\NEWS.txt=C2=A0and then did the same "Emacs" search usi= ng `A' in dired, it worked!

I can recreate = this bug in RHEL too!

=
(1) mkdir -p /tmp/some\ d= ir
(2) D= ownload=C2=A0http://git.savannah.gnu.org/cgit/emacs.git/plain/= etc/NEWS=C2=A0as /tmp/some\ dir/NEWS.txt
(3) In emacs -Q, use C-x d to open dired in=C2=A0<= span style=3D"line-height:1.5">/tmp/some\ dir/
(4) Mark = NEWS.txt using `m' key
(5) Then I do `A' and search for "Emacs" (or pr= obably anything else too)
(6) You should get "No matches for: Emacs"
=
Can you please rename the bu= g title to "25.0.93;=C2=A0dired= -do-find-regexp does not work when path contains spaces"?
=

Blocking bug?
--
=

--
Kaushal Modi

--089e013d08f0e1749305320a0339-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 17:16:18 2016 Received: (at submit) by debbugs.gnu.org; 4 May 2016 21:16:18 +0000 Received: from localhost ([127.0.0.1]:38356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay49a-00085K-9y for submit@debbugs.gnu.org; Wed, 04 May 2016 17:16:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay49X-00084s-Lx for submit@debbugs.gnu.org; Wed, 04 May 2016 17:16:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay49I-0003D8-B3 for submit@debbugs.gnu.org; Wed, 04 May 2016 17:16:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay49H-0003C8-30 for submit@debbugs.gnu.org; Wed, 04 May 2016 17:16:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay494-0000yd-8P for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay48p-00035k-VZ for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 17:15:38 -0400 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:33419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay48c-0002e0-PA; Wed, 04 May 2016 17:15:20 -0400 Received: by mail-oi0-x22f.google.com with SMTP id v145so81069973oie.0; Wed, 04 May 2016 14:14:50 -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=+VA+z4TlK4czOegsITDL/py7QH4lZjRFTL6SszA/B2A=; b=SLGaeKU0DzUJO0JbP9DuF3Te9DAkGQ+2LFFEuga7Y5IgHtlH7ghgTjtJD/7zNdlmu/ dLqsYYO6WUZBTTY1CSlxquCg20zDVL/uvJWQ34/rXmkxDx6zcxcGkxU5kMo1ROavFsqY 8lkmknEnVKJW6FsYy9wulz+r00L+/ZryzQomOnQAbajnRwy6gCIFs/OnBks3XJbLDCk3 efLWUQqkcFXEvDb/h1XB8o+ZdF5CCvLdmmSzasZfjy2bP/iSuexpjs50+HsmyvoLVMeI q34bQ+jtSJ7mkrPJRouC1NZnuho9NdudSghkScNGD2MYHFixsPJxw/qtluGyMgtTTtDq 5m1g== 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=+VA+z4TlK4czOegsITDL/py7QH4lZjRFTL6SszA/B2A=; b=hsV1m5aI9nOzDvBgoUMDcFFp7f7PZv8Pnz/5/yqNBazw8dFUhHMLeoJwRKbYt0oN6t 4bU/rIXjxCf8R+gUDxVHwVLfUoU9CO2YTmC9odPROhW/PT2ke5aBFG7nLYS5qG8HdFAF t0OYn7fNAg68C93a4pq3f3pJVFy4ew2Qo32oFrXXF312Pq/mid5wtMm9EvJ4bhJJPZF+ hbgk7ZXrGg4cY4twgEGOXSH7RB7l2/tqN4+bN8mJMeMee7iDOHiQgPXH7PLWHnKCOyIA iHFykPlHFk7tcKGImJcB63qR5sEWXpTetqq093Fj6VurnhWaaLiNf6PspvznEEJY5NEt xdZw== X-Gm-Message-State: AOPr4FX6qqu1onNiIEJuWPI2oeSnGCHpws/3V2Dj97NXjCmOtzoCmtoAtDVrF+FNpN6i/ktX0wmYoZghTTtSGw== X-Received: by 10.202.60.194 with SMTP id j185mr4715348oia.197.1462396486302; Wed, 04 May 2016 14:14:46 -0700 (PDT) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Wed, 04 May 2016 21:14:35 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a113ce01c1643eb05320ab75b 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a113ce01c1643eb05320ab75b Content-Type: text/plain; charset=UTF-8 I have verified the below patch to solve this issue: Can you please review/fix/commit as needed? >From a20c0f42dbbecb356b286875b684f01fd25c6ebb Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Wed, 4 May 2016 17:06:44 -0400 Subject: [PATCH] Shell escape arguments for find cmd used by xref * lisp/progmodes/xref.el (xref-collect-matches): 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 62cef23..ff87bc3 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -890,7 +890,7 @@ xref-collect-matches (grep-highlight-matches nil) (command (xref--rgrep-command (xref--regexp-to-extended regexp) files - (expand-file-name dir) + (shell-quote-argument (expand-file-name dir)) ignores)) (buf (get-buffer-create " *xref-grep*")) (grep-re (caar grep-regexp-alist)) -- 2.6.0.rc0.24.gec371ff On Wed, May 4, 2016 at 4:24 PM Kaushal Modi wrote: > Oh, as it turns out, the bug is there but not related to not finding > find/grep. > > It IS actually finding the find.exe and grep.exe correctly using the > exec-path and/or (setenv "PATH" ..) hacks. > > The problem was that the file was in a path with spaces in it: > > C:\Users\kmodi\Desktop\_keep this folder empty\NEWS.txt > > When I try using `A' in dired with above file marked and search for > "Emacs", I get "No matches for: Emacs". Note the spaces in the directory > name: "_keep this folder empty" > > But when I copied NEWS.txt to C:\Users\kmodi\Desktop\NEWS.txt and then > did the same "Emacs" search using `A' in dired, it worked! > > I can recreate this bug in RHEL too! > > (1) mkdir -p /tmp/some\ dir > (2) Download http://git.savannah.gnu.org/cgit/emacs.git/plain/etc/NEWS as > /tmp/some\ dir/NEWS.txt > (3) In emacs -Q, use C-x d to open dired in /tmp/some\ dir/ > (4) Mark NEWS.txt using `m' key > (5) Then I do `A' and search for "Emacs" (or probably anything else too) > (6) You should get "No matches for: Emacs" > > Can you please rename the bug title to "25.0.93; dired-do-find-regexp > does not work when path contains spaces"? > > Blocking bug? > -- > > -- > Kaushal Modi > -- -- Kaushal Modi --001a113ce01c1643eb05320ab75b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have verified the below patch to solve this issue:
C= an you please review/fix/commit as needed?

Fr= om a20c0f42dbbecb356b286875b684f01fd25c6ebb Mon Sep 17 00:00:00 2001
<= div>From: Kaushal Modi <kausha= l.modi@gmail.com>
Date: Wed, 4 May 2016 17:06:44 -0400
Subject: [PATCH] Shell escape arguments for find cmd used by xref

* lisp/progmodes/xref.el (xref-collect-matches): Whe= n the dir has
=C2=A0 characters like spaces (e.g. /tmp/some dir/)= , those need to be escaped
=C2=A0 before passing it as an argumen= t to the shell command like `find'.
=C2=A0 The escaping is do= ne using `shell-quote-argument' (bug#23453).
---
= =C2=A0lisp/progmodes/xref.el | 2 +-
=C2=A01 file changed, 1 inser= tion(+), 1 deletion(-)

diff --git a/lisp/progmodes= /xref.el b/lisp/progmodes/xref.el
index 62cef23..ff87bc3 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.e= l
@@ -890,7 +890,7 @@ xref-collect-matches
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (grep-highlight-matches nil)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (command (xref--rgrep-command (xref--regexp-to-ext= ended regexp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 files
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (expand-file-name dir)
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =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 (expand-fil= e-name dir))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ignores))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (buf (= get-buffer-create " *xref-grep*"))
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (grep-re (caar grep-regexp-alist))
--=C2=A0
<= div>2.6.0.rc0.24.gec371ff




On Wed, May 4, 2016 at 4:2= 4 PM Kaushal Modi <kaushal.mod= i@gmail.com> wrote:
Oh, as it turns out, the bug is there but not related to not findi= ng find/grep.

It IS actually finding the find.exe and gr= ep.exe correctly using the exec-path and/or (setenv "PATH" ..) ha= cks.

The problem was that the file was in a path w= ith spaces in it:

C:\Users\kmodi\Desktop\_keep thi= s folder empty\NEWS.txt

When I try using `A= 9; in dired with above file marked and search for "Emacs", I get = "No matches for: Emacs". Note the spaces in the directory name: &= quot;_keep this folder empty"

But when I copied NEWS.txt to=C2=A0C:\Users\kmodi\Desktop\NEWS.txt=C2=A0and then did the same "Emacs" search using `A= 9; in dired, it worked!
I can recreate this bug= in RHEL too!

<= /div>
(1) mkdir -p /tmp/some\ dir
(2) Download= =C2=A0http://git.savannah.gnu.org/cgit/emacs.git/plain/etc/NEW= S=C2=A0as /tmp/some\ dir/NEWS.txt
(3) In emacs -Q, use C-x d to open dired in=C2=A0/tmp/some\ dir/
(4) Mark NEWS.tx= t using `m' key
(5) Then I do `A' and search for "Emacs" (or probably = anything else too)
(6) You should get "No matches for: Emacs"

Can you please rename the bug title= to "25.0.93;=C2=A0dired-do-fin= d-regexp does not work when path contains spaces"?
Blocking bug?
--

--
Kaushal Modi

--

--
Kaushal Modi

--001a113ce01c1643eb05320ab75b-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 17:41:34 2016 Received: (at submit) by debbugs.gnu.org; 4 May 2016 21:41:34 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 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 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 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 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 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) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> In-Reply-To: From: Kaushal Modi Date: Wed, 04 May 2016 21:39:39 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Eli Zaretskii Content-Type: multipart/alternative; boundary=94eb2c0441f49dd79705320b1003 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --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-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 18:15:47 2016 Received: (at 23453) by debbugs.gnu.org; 4 May 2016 22:15:47 +0000 Received: from localhost ([127.0.0.1]:38438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay559-00018j-94 for submit@debbugs.gnu.org; Wed, 04 May 2016 18:15:47 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay557-00018T-66 for 23453@debbugs.gnu.org; Wed, 04 May 2016 18:15:45 -0400 Received: by mail-wm0-f68.google.com with SMTP id n129so13399546wmn.1 for <23453@debbugs.gnu.org>; Wed, 04 May 2016 15:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=AwQ7E2bR73K6Q4BEuWD/lFzc9mmL9c0Mr/CpbOsL3YQ=; b=Qb/FndKcVYQkdZ2AkZwvG4zh/XPVGDGGS96PXKZ/YcrEHnCoVuFq+mNkunIyRoJ0qh ZNrZp4/4CVK3tvAM2glR5+c7Uwel/CCuvpgjA//5RBg5w34bXADeUJGTKpZoLvHpSb9V R4JAzwy62wJuZ5oHPio9GWy2E03tmRx+4+WSnAcETh9AMRSYC47UwfdsLqvdCXeyG1Yo 81lhAGjXbjPho51mL2+HlHUHkNKIUFwurc/sLe86geeZJFqYDACbdqSyEQVOcyZwov5N +bhvpo6d9pYGkL2iul2zupA32BghHrG6Lo6HFHpyWXA1TUKMVO6dxQWxcKdgWbLSXT70 mzmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=AwQ7E2bR73K6Q4BEuWD/lFzc9mmL9c0Mr/CpbOsL3YQ=; b=JDbbk5IhwdDzJm28oEgGdo6fPl7kNdj0kV0mcP0JIGmZ+FQdCZW0M6j/wowu+P2lgx 40nXVtSfoysFS/EOYg1P5QzyMAMKpbY1UDACjeZinUCT4+Nffcc8YV3O2iYcgn/O7oZX jlFHd8x3I8E6QPumRtg3eOpdgJUduwH5vm2YmUfSWCQkLPCRkVn+rvYdNtIBUsSPy7/h LnKMJIzdSgP7lKS63HUd9tvnlqkvUihT9XVbkMLftYwYUAWPcLBTR78TAM4Z2C5AFgiq cUtzLzXRQUrfTmT0t7848rAfrQItYhH6DWEpfeUMFeRRe69naXUezka3B5tr65KXzSIE mssA== X-Gm-Message-State: AOPr4FVrH8fsPS9CJBowyuAltMtES3wgfOghDVIUySGbgbTuEzINJ/eSUqU+8dvvcSc2kQ== X-Received: by 10.28.47.206 with SMTP id v197mr11685505wmv.87.1462400139492; Wed, 04 May 2016 15:15:39 -0700 (PDT) Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id o4sm6435237wjx.45.2016.05.04.15.15.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 May 2016 15:15:38 -0700 (PDT) Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Kaushal Modi , Eli Zaretskii References: <834madioy0.fsf@gnu.org> From: Dmitry Gutov Message-ID: <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> Date: Thu, 5 May 2016 01:15:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 23453 Cc: 23453@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Oops, thanks for catching this. On 05/05/2016 12:39 AM, Kaushal Modi wrote: > + (shell-quote-argument dir) This looks good. > + (xref--find-ignores-arguments ignores (shell-quote-argument dir)))) I'm not sure about this line, on the other hand. Is it actually required? If yes, this quoting should be performed inside xref--find-ignores-arguments, I think. P.S. The last few messages were addressed to bug-gnu-emacs@gnu.org instead of this bug's address. Sending this to the right address now. From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 18:30:28 2016 Received: (at 23453) by debbugs.gnu.org; 4 May 2016 22:30:28 +0000 Received: from localhost ([127.0.0.1]:38453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay5JM-0001XF-2o for submit@debbugs.gnu.org; Wed, 04 May 2016 18:30:28 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:33178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay5JK-0001X0-SK for 23453@debbugs.gnu.org; Wed, 04 May 2016 18:30:27 -0400 Received: by mail-ob0-f173.google.com with SMTP id x1so28197698obt.0 for <23453@debbugs.gnu.org>; Wed, 04 May 2016 15:30:26 -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=rVEVH2sQpxaGujrtYrPRGT+nTYE20GHsjAKaiz0odMU=; b=cqdK7Lc0KvXoiGS0UccbHY5cf4m8O5sifGHkm0TrnEbAMY4Oo0fxPYMtcrAeZHJWvK UIe9RUoNilISslHqGbWSkYYKGO06ul0nztxGxvAcg2MLhCyc2J3nRwGFiWHLUbjhBXTk T/2auM7bA12Jb538Q3Odc9YTxAjYBVzeDezd7niJ93TmBUE46u1VTQKFhhQ2ZD51QE7g Qw3+q5tmUO8eMgKwYdDFv1msPkVPeC99tN9+Pti2hKlZgz6owEGXflvtqMFAGQgJoS8u p/poa2SPJ9o9AmyrN3XU55OuPMaRh1l7cLj150DEBYYZcb7vMWy/TKYDqFEJK/qYNNuG sHJQ== 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=rVEVH2sQpxaGujrtYrPRGT+nTYE20GHsjAKaiz0odMU=; b=HqaBnVAUNtlR8JzGIbKdgKQLgCqhetMMEZqkTYvPNTem7MJR/g0FUviP3d3oETt9IP 9vOeO47sbUNlp2DOBcTJeUW/P1wgnwnPVxI9fgH6P6WwxmIgRmVYtO1eb4m/LRr4wJmt Lln3eMbE16wKxiCfSoR1khEgTkJHAgNuzGjAc4qkc3IXlgxY8wj9jWAW5X+Uxf6Z+89f 7cw0zAzCIhpfUdSnWOF/7Odack+dcsplnccgyKDPv0YckFg9hfMAf96DI20ayVc3T9t2 G/UPiw6yxanC7PqeXHuNEtKzxJs8HlnPnGJc603ZMhA7wCK+mTJFxs3MgsUbPtqY+TS/ 4BqQ== X-Gm-Message-State: AOPr4FXiaroZcjKfgsi86NoZ9FujXhusYNbtAnR4345F6pi4wIaxGRU/NZ+zYELZye5710yeeRDkaNXrtZORzQ== X-Received: by 10.60.38.225 with SMTP id j1mr3400964oek.24.1462401021007; Wed, 04 May 2016 15:30:21 -0700 (PDT) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> In-Reply-To: <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> From: Kaushal Modi Date: Wed, 04 May 2016 22:30:11 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Dmitry Gutov , Eli Zaretskii Content-Type: multipart/alternative; boundary=089e013d08f0605fb605320bc5c4 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23453 Cc: 23453@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e013d08f0605fb605320bc5c4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > > + (shell-quote-argument dir) > > This looks good. > Thanks. > > + (xref--find-ignores-arguments ignores (shell-quote-argument dir)))) > > I'm not sure about this line, on the other hand. Is it actually > required? My guess would be yes based on just C-h f xref--find-ignores-arguments. Convert IGNORES and DIR to a list of arguments for =E2=80=99find=E2=80=99. IGNORES is a list of glob patterns. DIR is an absolute directory, used as the root of the ignore globs. If DIR is going to be an argument to `find', it should be shell quoted too, right? For the example in this bug report though, it does not matter with or without shell quoting dir there (in arg to xref--find-ignores-arguments). The second version of patch simply has the shell-quote-argument propagated into the xref--rgrep-command. > If yes, this quoting should be performed inside > xref--find-ignores-arguments, I think. Or how about this 3rd version of the patch: >From 1f114a74de1d28e06edd9c074774a087c1d19bd5 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Wed, 4 May 2016 18:25:50 -0400 Subject: [PATCH] Shell escape arguments for find/grep 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 62cef23..ccf20c1 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -910,6 +910,7 @@ xref--rgrep-command (require 'find-dired) ; for `find-name-arg' (defvar grep-find-template) (defvar find-name-arg) + (setq dir (shell-quote-argument dir)) ; /some dir/ =E2=86=92 /some\ dir/ (grep-expand-template grep-find-template regexp --=20 2.6.0.rc0.24.gec371ff It feels untidy to shell-quote dir separately; once in the grep-expand-template form and second time inside xref--find-ignores-arguments. Also it could get confusing keeping track of if dir was already shell-quoted by the time it entered xref--find-ignores-arguments or not. A comment in that last function also says: ;; `shell-quote-argument' quotes the tilde as well. (cl-assert (not (string-match-p "\\`~" dir))) So looks like dir is expected to be shell-quoted before it entered that function. --=20 --=20 Kaushal Modi --089e013d08f0605fb605320bc5c4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
= > +=C2=A0 =C2=A0(shell-quote-argument dir)

This looks good.

Thanks.
=C2= =A0
> +=C2=A0 =C2=A0(xref--find-ignores-arguments ignores (shell-quote-argum= ent dir))))

I'm not sure about this line, on the other hand. Is it actually
required?

My guess would be yes based on j= ust C-h f xref--find-ignores-arguments.

Convert IG= NORES and DIR to a list of arguments for =E2=80=99find=E2=80=99.
= IGNORES is a list of glob patterns.=C2=A0 DIR is an absolute
dire= ctory, used as the root of the ignore globs.

If DI= R is going to be an argument to `find', it should be shell quoted too, = right? For the example in this bug report though, it does not matter with o= r without shell quoting dir there (in arg to xref--find-ignores-arguments).= The second version of patch simply has the shell-quote-argument propagated= into the xref--rgrep-command.
=C2=A0
If yes, this quoting should be performed inside
xref--find-ignores-arguments, I think.

Or h= ow about this 3rd version of the patch:

From 1f114= a74de1d28e06edd9c074774a087c1d19bd5 Mon Sep 17 00:00:00 2001
From= : Kaushal Modi <kaushal.modi@g= mail.com>
Date: Wed, 4 May 2016 18:25:50 -0400
S= ubject: [PATCH] Shell escape arguments for find/grep used by xref

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

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/= xref.el
index 62cef23..ccf20c1 100644
--- a/lisp/progmo= des/xref.el
+++ b/lisp/progmodes/xref.el
@@ -910,6 +910= ,7 @@ xref--rgrep-command
=C2=A0 =C2=A0(require 'find-dired) = =C2=A0 =C2=A0 =C2=A0; for `find-name-arg'
=C2=A0 =C2=A0(defva= r grep-find-template)
=C2=A0 =C2=A0(defvar find-name-arg)
+ =C2=A0(setq dir (shell-quote-argument dir)) ; /some dir/ =E2=86=92 /so= me\ dir/
=C2=A0 =C2=A0(grep-expand-template
=C2=A0 =C2= =A0 grep-find-template
=C2=A0 =C2=A0 regexp
--=C2=A0
2.6.0.rc0.24.gec371ff

It feels untidy to s= hell-quote dir separately; once in the grep-expand-template form and second= time inside xref--find-ignores-arguments. Also it could get confusing keep= ing track of if dir was already shell-quoted by the time it entered xref--f= ind-ignores-arguments or not.

A comment in that la= st function also says:

=C2=A0 =C2=A0 ;; `shel= l-quote-argument' quotes the tilde as well.
=C2=A0 =C2=A0 (cl= -assert (not (string-match-p "\\`~" dir)))

So looks like dir is expected to be shell-quoted before it entered= that function.
=C2=A0
= =C2=A0
--

--
Kaushal Modi

--089e013d08f0605fb605320bc5c4-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 21:18:37 2016 Received: (at 23453) by debbugs.gnu.org; 5 May 2016 01:18:37 +0000 Received: from localhost ([127.0.0.1]:38569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay7w5-0007AL-KM for submit@debbugs.gnu.org; Wed, 04 May 2016 21:18:37 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay7w4-0007A9-7t for 23453@debbugs.gnu.org; Wed, 04 May 2016 21:18:36 -0400 Received: by mail-wm0-f66.google.com with SMTP id w143so641221wmw.3 for <23453@debbugs.gnu.org>; Wed, 04 May 2016 18:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=gw7dc0Cj542O+eeIPLJ03Kj6X82n9l6oKPrPcTPg4IA=; b=CINZA7m1gJMAgSAsSdsa8gJUNnPKgAEYZ/pmAEgxAZ2CeGWtT6DZhnLhqrxTkLot5H WgY1ihjqcxSLUBF+HFFI6hUpogw6y/ZPIXD38WhtyYJtsdm+jZw7D2dIoeMeeLCuX9ZV Mx+3d/EeVpUcDY1yQzC6SxKraC+ebEw7mdAmskKBoQA73r6SfoyuD3Im0CLgPP16+zUP d9kSWZxtjCE8URscKCCMTFvGql0xRRPhdXX+ApNmtTxdH3fU8nt9mrZY55tS4iHkcrsw B3lju2NXHAYAHD1ZtsSLMQjrJa7/uEbVEFaSTGYbeU67ZZ+8kAA7wYCyscUd84lWlYop +HSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=gw7dc0Cj542O+eeIPLJ03Kj6X82n9l6oKPrPcTPg4IA=; b=T+eWFyZkShBHYmBb3c/Y/2SdEsE0P/W4NNn5x8eZoAW1//bK4YsZjHtr7YjiK7FGYL T0T4gjuOVXjNUImZIgrqpj1dauVBP8vSrVpS6yleGmXm6hE9z2AF/znjXiHyldcwdE9J OVgU2nVRyHMyqf9Y+4UYbJmmZDPLMUBZzN4u97iE+a9Cw1Lz+CnfmbiHtLAfFRpB9tYg 3xXWGCkCvT68NJ+2LYCAquZ7+xJAObjw5X7qiHeKAz0V9husP5LoM6/ncdAQ9G0WSaaD 7um3AZp3uLGS2fBGfS4/5uRG+CwQDhBVz9XE1wbvTlhWGpDSWEsOMO3L+ayPKccuhFEU nVvA== X-Gm-Message-State: AOPr4FWjVSXMku0QgKj4OaIkpxVb4bIXzjRieiskzOlO5DVVa5eHmi/J2xkviUBkyvFvbg== X-Received: by 10.28.45.216 with SMTP id t207mr421522wmt.40.1462411110512; Wed, 04 May 2016 18:18:30 -0700 (PDT) Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id a200sm466051wme.8.2016.05.04.18.18.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 May 2016 18:18:29 -0700 (PDT) Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Kaushal Modi , Eli Zaretskii References: <834madioy0.fsf@gnu.org> <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> From: Dmitry Gutov Message-ID: <2d5fca36-dee6-9c4b-6c7b-7ea50501ea62@yandex.ru> Date: Thu, 5 May 2016 04:18:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 23453 Cc: 23453@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 05/05/2016 01:30 AM, Kaushal Modi wrote: > Convert IGNORES and DIR to a list of arguments for ’find’. > IGNORES is a list of glob patterns. DIR is an absolute > directory, used as the root of the ignore globs. > > If DIR is going to be an argument to `find', it should be shell quoted > too, right? That doesn't mean that it isn't being quoted now, in the function in question. > Or how about this 3rd version of the patch: It's functionally equivalent to the second one, I believe. > It feels untidy to shell-quote dir separately; once in the > grep-expand-template form and second time inside > xref--find-ignores-arguments. Also it could get confusing keeping track > of if dir was already shell-quoted by the time it entered > xref--find-ignores-arguments or not. shell-quoting is the last thing you do to an argument. Quoting an then transforming it rarely makes sense. > A comment in that last function also says: > > ;; `shell-quote-argument' quotes the tilde as well. > (cl-assert (not (string-match-p "\\`~" dir))) > > So looks like dir is expected to be shell-quoted before it entered that > function. Actually, this comment means the opposite: we would want ~ in the command line unquoted, but that won't happen because DIR is quoted later. So we require DIR to be non-abbreviated. Anyway, let's leave that off until you find a definite case where it's a problem. I've pushed the other change now in ab3ba91. Please see if it fixes the problem, and if so, close the bug. From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 22:38:38 2016 Received: (at submit) by debbugs.gnu.org; 5 May 2016 02:38:38 +0000 Received: from localhost ([127.0.0.1]:38590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay9BW-0000bT-5s for submit@debbugs.gnu.org; Wed, 04 May 2016 22:38:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay9BU-0000bF-RO for submit@debbugs.gnu.org; Wed, 04 May 2016 22:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay9BG-0001WA-3U for submit@debbugs.gnu.org; Wed, 04 May 2016 22:38:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay9BG-0001VN-13 for submit@debbugs.gnu.org; Wed, 04 May 2016 22:38:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay9B4-0007iy-8X for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 22:38:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay9Aq-0001Py-Er for bug-gnu-emacs@gnu.org; Wed, 04 May 2016 22:38:02 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay9Ad-0001KV-5H; Wed, 04 May 2016 22:37:43 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2979 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ay9AX-0001j5-16; Wed, 04 May 2016 22:37:37 -0400 Date: Thu, 05 May 2016 05:37:46 +0300 Message-Id: <8337pxi611.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Wed, 04 May 2016 19:56:02 +0000) Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep References: <834madioy0.fsf@gnu.org> 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.1 (-------) > From: Kaushal Modi > Date: Wed, 04 May 2016 19:56:02 +0000 > Cc: bug-gnu-emacs@gnu.org, dgutov@yandex.ru > > You need to change the system Path, not the user Path. > > Alternatively, rename the MS find.exe to something else. > > I do not have admin access (work computer). Wouldn't (setenv "PATH" "..") be the same? No. > If I rename the MS find.exe (which I cannot without admin aceess), will it not affect any other program using it? Nothing uses it. > As I mentioned, I also set the PATH using (setenv "PATH "..."). Isn't executable-find returning the correct > find.exe and grep.exe a proof that the right executable is being found. No. See the source of executable-find. > I have had this in my config and it works fine (for a different executable chrome.exe): > > (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Application/")) > (setq exec-path (append exec-path `(,chrome-path))) > (setq browse-url-generic-program (executable-find "chrome"))) Bad idea, as I explained in my earlier message. You need to change PATH _outside_ of Emacs. From debbugs-submit-bounces@debbugs.gnu.org Wed May 04 22:44:53 2016 Received: (at 23453) by debbugs.gnu.org; 5 May 2016 02:44:53 +0000 Received: from localhost ([127.0.0.1]:38594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay9HY-0000nW-SJ for submit@debbugs.gnu.org; Wed, 04 May 2016 22:44:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay9HX-0000nB-31 for 23453@debbugs.gnu.org; Wed, 04 May 2016 22:44:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay9HI-0003Wn-Ih for 23453@debbugs.gnu.org; Wed, 04 May 2016 22:44:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay9HI-0003Vt-FG; Wed, 04 May 2016 22:44:36 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2985 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ay9HC-0002K2-BE; Wed, 04 May 2016 22:44:30 -0400 Date: Thu, 05 May 2016 05:44:39 +0300 Message-Id: <831t5hi5pk.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> (message from Dmitry Gutov on Thu, 5 May 2016 01:15:37 +0300) Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep References: <834madioy0.fsf@gnu.org> <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 23453 Cc: 23453@debbugs.gnu.org, kaushal.modi@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.1 (-------) > Cc: 23453@debbugs.gnu.org > From: Dmitry Gutov > Date: Thu, 5 May 2016 01:15:37 +0300 > > Oops, thanks for catching this. > > On 05/05/2016 12:39 AM, Kaushal Modi wrote: > > > + (shell-quote-argument dir) > > This looks good. > > > + (xref--find-ignores-arguments ignores (shell-quote-argument dir)))) > > I'm not sure about this line, on the other hand. Is it actually > required? If yes, this quoting should be performed inside > xref--find-ignores-arguments, I think. Indeed, it is IMO wrong to use shell-quote-argument anywhere except immediately before invoking the shell command. If this is what is needed to fix the bug, the bug is elsewhere. From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 12:23:24 2016 Received: (at 23453-done) by debbugs.gnu.org; 5 May 2016 16:23:24 +0000 Received: from localhost ([127.0.0.1]:40463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayM3g-0007Dw-Eu for submit@debbugs.gnu.org; Thu, 05 May 2016 12:23:24 -0400 Received: from mail-ob0-f171.google.com ([209.85.214.171]:33378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayM3e-0007Dj-E5 for 23453-done@debbugs.gnu.org; Thu, 05 May 2016 12:23:22 -0400 Received: by mail-ob0-f171.google.com with SMTP id x1so38687696obt.0 for <23453-done@debbugs.gnu.org>; Thu, 05 May 2016 09:23:22 -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=7b8OXyPgOYeyVnaks9s/AGmyuONmc2ZaX6B+cqLvWv4=; b=dMdyKVpTLfJceUWOIw/uaV4UuMeJ2Vh5gigEYmqa1PSIx7ixyNDcOYem1vzCSABTq7 5UjCYu0A+F/vVS4hbcOo+mCukacwQsZMZQdCdxY80tnYQ3INCuvNa0c3QZPCZP3QlaLl FgqG9V3mHK3cEJKYkp18iG27ixAQJwHL2dwDWV2kKYVbw6Y/OaUswAMsghoctDgFqjZi wB/GUu77tVjMi3wLslMEbYxQd09QILo8jp3MVjUQiBEnrLqSPq2EHybhl3cxvbkVl9RV 4PhmzcpXVSn6oZqojqfcl/lChwS7vWoDzQbhZNeT8MjgobJm01OLApBLaj92gGvRoysh AceQ== 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=7b8OXyPgOYeyVnaks9s/AGmyuONmc2ZaX6B+cqLvWv4=; b=fntLBmkf7Qy0PRTa/3j+b3Rc+T4XmDcCXHYHTGYq/k5qgvhW0xQLczBWF+9SsGrUEW BZiQVW4pblDPMw2L2QPZ/qDzkHUwlMvacT9jG70BK1Rb4Y+O5sxoeGRB8DTuzwJPJjcS j01o70L3+pFnXpDmAFWcFe6OpgHHvFhuK6fLv60G1aqfB5leDNdwQsodVlwhj5/QyeCj vU044Smv1MH2tKpPqibJdZ97mYKCPQSuRV4U4xIgX7b9xnsSCwElUzVxNyGfQOGtmGha emYblOKl6M5JVE6WURx3xAEKNEV/cq6TcxLPFKldKkxBEDyna2ezkjcRYwxwIajZeKSz CfOw== X-Gm-Message-State: AOPr4FXDgu67U+UkcdpiMMAOJydF0ICR0etBEYvF0ucFaA/7tPz/po0t3zJy/dtVTZZPf0O19RISwCTpqLVZDA== X-Received: by 10.182.224.137 with SMTP id rc9mr7354368obc.39.1462465396671; Thu, 05 May 2016 09:23:16 -0700 (PDT) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> <48af9fd9-2b0a-7c67-9141-c2236c62e318@yandex.ru> <2d5fca36-dee6-9c4b-6c7b-7ea50501ea62@yandex.ru> In-Reply-To: <2d5fca36-dee6-9c4b-6c7b-7ea50501ea62@yandex.ru> From: Kaushal Modi Date: Thu, 05 May 2016 16:23:07 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Dmitry Gutov , Eli Zaretskii Content-Type: multipart/alternative; boundary=089e0149bff6770dbd05321ac259 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23453-done Cc: 23453-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e0149bff6770dbd05321ac259 Content-Type: text/plain; charset=UTF-8 On Wed, May 4, 2016 at 9:18 PM Dmitry Gutov wrote: > That doesn't mean that it isn't being quoted now, in the function in > question. > OK > It's functionally equivalent to the second one, I believe. > It is! I just rearranged the position for shell-quote-argument. Actually all 3 patches were the same, functionally. > Actually, this comment means the opposite: we would want ~ in the > command line unquoted, but that won't happen because DIR is quoted > later. So we require DIR to be non-abbreviated. > > Anyway, let's leave that off until you find a definite case where it's a > problem. OK > I've pushed the other change now in ab3ba91. > > Please see if it fixes the problem, and if so, close the bug. > It does fix the bug, thanks! -- -- Kaushal Modi --089e0149bff6770dbd05321ac259 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Wed, May 4,= 2016 at 9:18 PM Dmitry Gutov <dguto= v@yandex.ru> wrote:
That doesn't mean that it isn't being quoted now, in the function i= n
question.

OK
=C2=A0
It's functionally equivalent to the second one, I believe.

It is! I just rearranged the position for shell-quo= te-argument. Actually all 3 patches were the same, functionally.
= =C2=A0
Actually, this comment means the opposite: we would want ~ in the
command line unquoted, but that won't happen because DIR is quoted
later. So we require DIR to be non-abbreviated.

Anyway, let's leave that off until you find a definite case where it= 9;s a
problem.

OK
=C2=A0
I've pushed the other change now in ab3ba91.

Please see if it fixes the problem, and if so, close the bug.

It does fix the bug, thanks!=C2=A0
=
--

--
Kaushal Modi

--089e0149bff6770dbd05321ac259-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 12:36:18 2016 Received: (at 23453) by debbugs.gnu.org; 5 May 2016 16:36:18 +0000 Received: from localhost ([127.0.0.1]:40488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayMG9-0007YZ-UB for submit@debbugs.gnu.org; Thu, 05 May 2016 12:36:18 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:36416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayMG7-0007YH-I0 for 23453@debbugs.gnu.org; Thu, 05 May 2016 12:36:15 -0400 Received: by mail-oi0-f42.google.com with SMTP id x201so108864340oif.3 for <23453@debbugs.gnu.org>; Thu, 05 May 2016 09:36:15 -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=UDyQsUTPrMm11F9RMCUN0eJ1Y8ov66WqqxNDwHLgInw=; b=0/C8d8oD94wNEqMl/dgEPDdpB1iVvv0BCX2/IJpblFw7xuodnxn3sUFZK1d6t9h1Gx W3d0JgaVHzpx9W12mpYsrV4Wk9hf6CVynMMnnjw0elqrQ0rdwHR0E1QZLDYBdtD6u+TT EHOxmkQGwQmtOKYiuJllWpOHhA9f8cOEO7+ZfzIj8nXJO/OV0NfluU7TZaNmgZOTbVlE ZqjAbj8zq54nm3cUv1+H7t/54Z9HhX49APhA3KZOigh1gZOumpSQ85A9HnIeqo4V0MvJ 5Ylm4SXDWVR7ZUAlNv0wRUDUfJ46CVq1eQ5JMhCN7OMx0YpkZKLqfXgZAuUzuZtrTIDx 1tRQ== 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=UDyQsUTPrMm11F9RMCUN0eJ1Y8ov66WqqxNDwHLgInw=; b=XxqMfxpmgSio2rbwoHiWOILilDjnRxR37p6VnqGlWCyv7rlaRn8GUURnfK0+qgLGYD NW4/rqA8aDrB2ZSdYlqMGlJMwZeq7QSUOARl2Y+iLoshTAWLoUe4DmLIW9Dbwmi6vDTm r/IhY2Ev53SowTwAnNFtW73voyeGE1BiRh8O3hgwvIil/hVH7JiJHhmnZHUIdJD3328N kFIDnsckeleswVlocNEmCl0GSJTQ5yf8WGzRNyTH+NafTtq6PjgfC9A4dzHw2EaROD+e xEqXlv/4Tsj6RetqbawLE7h7rTmoxJYx10uU9ZopCCV0nGsEgQLDCqU/JOB6+w+RkYq1 Gckg== X-Gm-Message-State: AOPr4FXVLgpRgT6CYcwmK+3OPXCmZmVFOJlwQehxOr2w9z77/JjH42KTKiqZk/MFzqip88gFfxTon4wsK3lDeg== X-Received: by 10.202.179.8 with SMTP id c8mr7505636oif.50.1462466169861; Thu, 05 May 2016 09:36:09 -0700 (PDT) MIME-Version: 1.0 References: <834madioy0.fsf@gnu.org> <8337pxi611.fsf@gnu.org> In-Reply-To: <8337pxi611.fsf@gnu.org> From: Kaushal Modi Date: Thu, 05 May 2016 16:36:00 +0000 Message-ID: Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep To: Eli Zaretskii Content-Type: multipart/alternative; boundary=001a113ce3c68cfbe105321af09d X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23453 Cc: "23453@debbugs.gnu.org" <23453@debbugs.gnu.org>, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a113ce3c68cfbe105321af09d Content-Type: text/plain; charset=UTF-8 > > > I do not have admin access (work computer). Wouldn't (setenv "PATH" > "..") be the same? > > No. > But the fact that I am able to do so says otherwise. I removed the path customization from both user and system PATH values (I had got temp admin rights to update the system PATH in Windows), added the below to my config and now find/grep work beautifully. (let ((ezwinports-path "C:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin")) (setq exec-path (add-to-list 'exec-path ezwinports-path)) (setenv "PATH" (concat (replace-regexp-in-string "/" "\\\\" ezwinports-path) ";" (getenv "PATH")))) > If I rename the MS find.exe (which I cannot without admin aceess), will > it not affect any other program using it? > > Nothing uses it. > I wasn't aware of that, thanks. > As I mentioned, I also set the PATH using (setenv "PATH "..."). Isn't > executable-find returning the correct > > find.exe and grep.exe a proof that the right executable is being found. > > No. See the source of executable-find. > OK, but I am able to reference to the chrome, find, grep binaryies correctly using only the tweaks to exeec-path and PATH from within emacs. I do not need to change it in Windows settings. As executable-find uses exec-path, I think that manipulating just that suffices for applications like chrome and firefox that are not executed from shell (unlike find and grep). I am saying this from what I practically see on my Windows machine. > > I have had this in my config and it works fine (for a different > executable chrome.exe): > > > > (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Application/")) > > (setq exec-path (append exec-path `(,chrome-path))) > > (setq browse-url-generic-program (executable-find "chrome"))) > > Bad idea, as I explained in my earlier message. You need to change > PATH _outside_ of Emacs. > Well, as mentioned earlier, changing the exec-path and doing setenv PATH from within emacs works just fine. In summary I have this in my Windows emacs config and it works great without needing external PATH manipulation. ===== (let ((firefox-path "C:/Users/kmodi/AppData/Local/Mozilla Firefox/")) (setq exec-path (append exec-path `(,firefox-path)))) (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Application/")) (setq exec-path (append exec-path `(,chrome-path))) (setq browse-url-generic-program (executable-find "chrome"))) (let ((ezwinports-path "C:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin")) (setq exec-path (add-to-list 'exec-path ezwinports-path)) (setenv "PATH" (concat (replace-regexp-in-string "/" "\\\\" ezwinports-path) ";" (getenv "PATH")))) ===== -- -- Kaushal Modi --001a113ce3c68cfbe105321af09d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
= > I do not have admin access (work computer). Wouldn't (setenv "= ;PATH" "..") be the same?

No.

But the fact that I am able to do s= o says otherwise. I removed the path customization from both user and syste= m PATH values (I had got temp admin rights to update the system PATH in Win= dows), added the below to my config and now find/grep work beautifully.

=C2=A0 (let ((ezwinports-path "C:/Users/kmo= di/Dropbox/Portable Software/ezwinports/bin"))
=C2=A0 =C2=A0= =C2=A0 (setq exec-path (add-to-list 'exec-path ezwinports-path))
=
=C2=A0 =C2=A0 =C2=A0 (setenv "PATH" (concat (replace-regexp-= in-string
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "/" "\\\\&= quot; ezwinports-path) ";"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (getenv "PATH"))))

> If I rename the MS find.exe (which I cannot without adm= in aceess), will it not affect any other program using it?

Nothing uses it.

I wasn't aware of = that, thanks.

> As I mentioned, I also set the PATH using (setenv "PATH "...= "). Isn't executable-find returning the correct
> find.exe and grep.exe a proof that the right executable is being found= .

No.=C2=A0 See the source of executable-find.

OK, but I am able to reference to the chrome, find, grep binaryies co= rrectly using only the tweaks to exeec-path and PATH from within emacs. I d= o not need to change it in Windows settings.=C2=A0

As executable-find uses exec-path, I think that manipulating just that suf= fices for applications like chrome and firefox that are not executed from s= hell (unlike find and grep). I am saying this from what I practically see o= n my Windows machine.
=C2=A0
> I have had this in my config and it works fine (for a different execut= able chrome.exe):
>
> (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Applicat= ion/"))
> (setq exec-path (append exec-path `(,chrome-path)))
> (setq browse-url-generic-program (executable-find "chrome"))= )

Bad idea, as I explained in my earlier message.=C2=A0 You need to change PATH _outside_ of Emacs.

Well, as menti= oned earlier, changing the exec-path and doing setenv PATH from within emac= s works just fine.

In summary I have this in my Wi= ndows emacs config and it works great without needing external PATH manipul= ation.

=3D=3D=3D=3D=3D
(let ((firefox-pa= th "C:/Users/kmodi/AppData/Local/Mozilla Firefox/"))
= =C2=A0 =C2=A0 =C2=A0 (setq exec-path (append exec-path `(,firefox-path))))<= /div>

=C2=A0 =C2=A0 (let ((chrome-path "C:/Program = Files (x86)/Google/Chrome/Application/"))
=C2=A0 =C2=A0 =C2= =A0 (setq exec-path (append exec-path `(,chrome-path)))
=C2=A0 = =C2=A0 =C2=A0 (setq browse-url-generic-program (executable-find "chrom= e")))

=C2=A0 =C2=A0 (let ((ezwinports-path &q= uot;C:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin"))
=C2=A0 =C2=A0 =C2=A0 (setq exec-path (add-to-list 'exec-path ezwinpo= rts-path))
=C2=A0 =C2=A0 =C2=A0 (setenv "PATH" (concat = (replace-regexp-in-string "/" "\\\\" ezwinports-path)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0";" (getenv "PATH"= ;))))
=3D=3D=3D=3D=3D=C2=A0
-- =

--
Kaushal Modi

--001a113ce3c68cfbe105321af09d-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 12:52:33 2016 Received: (at 23453) by debbugs.gnu.org; 5 May 2016 16:52:33 +0000 Received: from localhost ([127.0.0.1]:40502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayMVt-0007wd-1D for submit@debbugs.gnu.org; Thu, 05 May 2016 12:52:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayMVr-0007wS-Ku for 23453@debbugs.gnu.org; Thu, 05 May 2016 12:52:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayMVc-000217-S1 for 23453@debbugs.gnu.org; Thu, 05 May 2016 12:52:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayMVc-0001yn-P2; Thu, 05 May 2016 12:52:16 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3655 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ayMVW-00034Z-Gm; Thu, 05 May 2016 12:52:11 -0400 Date: Thu, 05 May 2016 19:52:21 +0300 Message-Id: <83shxwh2gq.fsf@gnu.org> From: Eli Zaretskii To: Kaushal Modi In-reply-to: (message from Kaushal Modi on Thu, 05 May 2016 16:36:00 +0000) Subject: Re: 25.0.93; dired-do-find-regexp does not work on Windows even after installing GNU find and grep References: <834madioy0.fsf@gnu.org> <8337pxi611.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 23453 Cc: 23453@debbugs.gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -7.1 (-------) > From: Kaushal Modi > Date: Thu, 05 May 2016 16:36:00 +0000 > Cc: dgutov@yandex.ru, "23453@debbugs.gnu.org" <23453@debbugs.gnu.org> > > > I have had this in my config and it works fine (for a different executable chrome.exe): > > > > (let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Application/")) > > (setq exec-path (append exec-path `(,chrome-path))) > > (setq browse-url-generic-program (executable-find "chrome"))) > > Bad idea, as I explained in my earlier message. You need to change > PATH _outside_ of Emacs. > > Well, as mentioned earlier, changing the exec-path and doing setenv PATH from within emacs works just > fine. Suit yourself, but my grey hair says this has subtle problems. You are welcome to wait for them to happen, of course ;-) A lesson learned from your own experience is much more vivid that if you learn from that of others. From unknown Thu Jun 19 14:00:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 03 Jun 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator