all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sam Steingold <sds@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org
Subject: bug#7785: rgrep is broken on woe32
Date: Thu, 6 Jan 2011 10:17:17 -0500	[thread overview]
Message-ID: <AANLkTi=XZS6a=Ai19L6eKVKHZdXUKzhWFCWDq67bTcY-@mail.gmail.com> (raw)
In-Reply-To: <E1Pan1b-0000ps-Fm@fencepost.gnu.org>

On Thu, Jan 6, 2011 at 5:24 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Wed, 5 Jan 2011 18:49:54 -0500
>> From: Sam Steingold <sds@gnu.org>
>> Cc: ofv@wanadoo.es, 7785@debbugs.gnu.org
>>
>> so I have to modify process-environment too:
>> after fixing exec-path:
>
> I suggest to fix PATH outside Emacs instead.  I wrote in bug#7793 why.

is it safe to prepend gnuwin path before the system windows paths
globally for all programs?
my toolchain is not limited to the gnu world, I am afraid of breaking,
e.g., ms visual studio...

>> \( -iname \*.el \) -print0 | xargs -0 -e grep -i -nH gnu.org
>> find: paths must precede expression
>> Usage: find [-H] [-L] [-P] [path...] [expression]
>>
>> Grep finished (matches found) at Wed Jan 05 18:44:10
>> ==========================================================
>>
>> the error message is obviously from gnu find, but I don't see what is
>> wrong with the command line.
>
> Which find/xargs/grep are these -- Cygwin's or GnuWin32's?

it should be gnuwin.

> Also, you said just a couple of messages ago, that rgrep did work for
> you in "emacs -q".  So is the only difference between that and this
> whatever you have on your .emacs?  Or am I missing something else?

1. "emacs -Q" started from bash shell:

(getenv "PATH")
"C:\\gnu\\cygwin\\usr\\local\\bin;C:\\gnu\\cygwin\\bin;C:\\gnu\\cygwin\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\gnu\\clisp-2.49;C:\\Program
Files\\TortoiseSVN\\bin;C:\\gnu\\gnuwin32\\bin;C:\\gnu\\cygwin\\bin;D:\\bin;C:\\Program
Files (x86)\\TortoiseHg\\;C:\\Program Files
(x86)\\Bazaar;C:\\gnu\\GnuTLS-2.10.1\\bin"

find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS" -o -path
"*/MCVS" -o -path "*/.svn" -o -path "*/.git" -o -path "*/.hg" .....
-exec grep -i -nH "asdf" {} NUL ";"

grep: NUL: No such file or directory
grep: NUL: No such file or directory
grep: NUL: No such file or directory
grep: NUL: No such file or directory
grep: NUL: No such file or directory

i.e., cygwin tools are used, which sucks because of NULs but at least
things sort of work.

2. emacs started from cygwin bash shell, the only thing in .emacs:
  (let ((gw "c:/gnu/gnuwin32/bin"))
    (setq exec-path (cons gw (delete gw exec-path))))
  (setenv "PATH"
          (mapconcat (lambda (s) (subst-char-in-string ?/ ?\\ s))
                     exec-path ";"))

(getenv "PATH")
"c:\\gnu\\gnuwin32\\bin;c:\\gnu\\cygwin\\usr\\local\\bin;C:\\gnu\\cygwin\\bin;C:\\gnu\\cygwin\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\gnu\\clisp-2.49;C:\\Program
Files\\TortoiseSVN\\bin;C:\\gnu\\gnuwin32\\bin;C:\\gnu\\cygwin\\bin;D:\\bin;C:\\Program
Files (x86)\\TortoiseHg\\;C:\\Program Files
(x86)\\Bazaar;C:\\gnu\\GnuTLS-2.10.1\\bin;c:\\sds\\src\\emacs\\trunk\\bin"


find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS"
-o.....-name "*.kys" -o -name "*.pgs" -o -name "*.tps" -o -name
"*.vrs" -o -name "*.pyc" -o -name "*.pyo" ")" -prune -o  -type f "("
-iname "*" -o -iname ".*" ")" -print0 | xargs -0 -e grep -i -nH "sfdg"
xargs: grep: No such file or directory
grep: ./src/clisp/current/src/config: No such file or directory
find: write error: Invalid argument

i.e., apparently, gnuwin tools are used, but nothing works.

3. emacs started with the above .emacs from the desktop shortcut

(getenv "PATH")
"c:\\gnu\\gnuwin32\\bin;c:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\gnu\\clisp-2.49;C:\\Program
Files\\TortoiseSVN\\bin;c:\\gnu\\cygwin\\bin;d:\\bin;C:\\Program Files
(x86)\\TortoiseHg\\;C:\\Program Files
(x86)\\Bazaar;C:\\gnu\\GnuTLS-2.10.1\\bin;c:\\sds\\src\\emacs\\trunk\\bin"


find . "(" -path "*/SCCS" -o -path "*/RCS" -o -path "*/CVS" ..... -o
-name "*.pyo" ")" -prune -o  -type f "(" -iname "*" -o -iname ".*" ")"
-print0 | xargs -0 -e grep -i -nH "adsf"
xargs: grep: No such file or directory
grep: ./src/clisp/curr: No such file or directory
find: write error: Invalid argument

i.e., same problems as before.

4. emacs started from desktop with my full huge .emacs but without PATH tweaking

(getenv "PATH")
"C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\gnu\\clisp-2.49;C:\\Program
Files\\TortoiseSVN\\bin;c:\\gnu\\gnuwin32\\bin;c:\\gnu\\cygwin\\bin;d:\\bin;C:\\Program
Files (x86)\\TortoiseHg\\;C:\\Program Files
(x86)\\Bazaar;C:\\gnu\\GnuTLS-2.10.1\\bin"

c:/gnu/gnuwin32/bin/find . \( -path  -o -path \*/attic ..... -o -iname
Makefile\* -o -iname \*.xml \) -print0 | c:/gnu/gnuwin32/bin/xargs -0
-e c:/gnu/gnuwin32/bin/grep -i -nH sadf
'c:' is not recognized as an internal or external command,
operable program or batch file.

5. same as 4 but without setting find-program et al
FIND: Parameter format not correct

6. emacs started from desktop with my full huge .emacs with PATH
tweaking without setting find-program et al:

(getenv "PATH")
"c:\\gnu\\gnuwin32\\bin;c:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\gnu\\clisp-2.49;C:\\Program
Files\\TortoiseSVN\\bin;c:\\gnu\\cygwin\\bin;d:\\bin;C:\\Program Files
(x86)\\TortoiseHg\\;C:\\Program Files
(x86)\\Bazaar;C:\\gnu\\GnuTLS-2.10.1\\bin;c:\\sds\\src\\emacs\\trunk\\bin"

find . \( -path  -o -path \*/attic -o -path .....-iname \*.in -o
-iname Makefile\* -o -iname \*.xml \) -print0 | xargs -0 -e grep -i
-nH asdf
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]

7. emacs -Q started from desktop:

(getenv "PATH")
"C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\gnu\\clisp-2.49;C:\\Program
Files\\TortoiseSVN\\bin;c:\\gnu\\gnuwin32\\bin;c:\\gnu\\cygwin\\bin;d:\\bin;C:\\Program
Files (x86)\\TortoiseHg\\;C:\\Program Files
(x86)\\Bazaar;C:\\gnu\\GnuTLS-2.10.1\\bin"

find . "(" -path "*/SCCS" ... -name "*.pyc" -o -name "*.pyo" ")"
-prune -o  -type f "(" -iname "*" -o -iname ".*" ")" -exec grep -i -nH
"rg	" {} NUL ";"
FIND: Parameter format not correct


-- 
Sam Steingold <http://sds.podval.org>





  reply	other threads:[~2011-01-06 15:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 23:47 bug#7785: rgrep is broken on woe32 Sam Steingold
2011-01-05  1:05 ` Óscar Fuentes
2011-01-05 11:32   ` Eli Zaretskii
2011-01-05 20:25     ` Sam Steingold
2011-01-05 20:28       ` Sam Steingold
2011-01-05 20:50         ` Óscar Fuentes
2011-01-05 21:20           ` Sam Steingold
2011-01-05 21:26             ` Eli Zaretskii
2011-01-05 21:33             ` Eli Zaretskii
2011-01-05 22:29             ` Óscar Fuentes
2011-01-05 22:43               ` Sam Steingold
2011-01-06 12:09                 ` bug#6784: " Eli Zaretskii
2011-01-06 15:25                   ` Sam Steingold
2011-01-06 16:07                     ` Eli Zaretskii
2011-01-08 21:00                   ` bug#6784: " Chong Yidong
2011-01-08 22:13                     ` bug#7785: " Laimonas Vėbra
2011-01-09 18:07                       ` Eli Zaretskii
2011-01-09 17:59                     ` Eli Zaretskii
2011-01-09 19:56                       ` Michael Albinus
2011-01-10 20:57                       ` Michael Albinus
2011-01-05 21:19         ` Eli Zaretskii
2011-01-05 22:45           ` Sam Steingold
2011-01-05 23:49             ` Sam Steingold
2011-01-05 23:52               ` Sam Steingold
2011-01-06 10:24               ` Eli Zaretskii
2011-01-06 15:17                 ` Sam Steingold [this message]
2011-01-06 15:46                   ` Sam Steingold
2011-01-06 16:20                     ` Eli Zaretskii
2011-01-06 17:09                       ` Sam Steingold
2011-01-06 18:45                         ` Eli Zaretskii
2011-01-06 20:55                           ` Sam Steingold
2011-01-06 21:05                             ` Eli Zaretskii
2011-01-06 21:11                               ` Sam Steingold
2011-01-07  7:24                                 ` Eli Zaretskii
2011-01-07 15:16                                   ` Sam Steingold
2011-01-07 16:24                                     ` Sam Steingold
2011-01-06 16:02                   ` Eli Zaretskii
2011-01-06 16:51                     ` Sam Steingold
2011-01-06 18:48                       ` Eli Zaretskii
2011-01-06 16:04                 ` Sam Steingold
2011-01-06  9:32             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=XZS6a=Ai19L6eKVKHZdXUKzhWFCWDq67bTcY-@mail.gmail.com' \
    --to=sds@gnu.org \
    --cc=7785@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.