Mon, 28 Nov 2005 19:21:49 +0100, you wrote:
Yoichi NAKAYAMA <yoichi(a)geiin.org> writes:
> At Sat, 17 Jul 2004 17:46:20 +0200,
> Michael Sperber wrote:
>> 2004-07-11 Mike Sperber <mike(a)xemacs.org>
>>
>> * igrep.el: Synch igrep with author version 2.111.
>>
>> I've committed this patch.
>
> This commit kills previous change:
>> 2003-09-24 Mike Sperber <mike(a)xemacs.org>
>>
>> * igrep.el (igrep-find-use-xargs): Don't assume xargs behaves
>> GNU-like if find does.
>
> as igrep-find cause error on FreeBSD where xargs
> doesn't have -e option.
I don't think so. The trunk's at version 1.8. It has:
(defvar igrep-find-use-xargs
(cond ((and (equal (call-process igrep-find-program nil nil nil
igrep-null-device "-print0")
0)
(equal (call-process "xargs" nil nil nil
"-e" "-0" "cat")
0))
'gnu)
((not (equal system-type 'darwin)))) ; not MacOS
"Whether `\\[igrep-find]' uses the `xargs` program or not.
If `gnu', it executes
`find ... -print0 | xargs -0 -e grep ...`;
if not `gnu' but non-nil, it executes
`find ... -print | xargs -e grep ...`;
if nil, it executes
`find ... -exec grep ...`.")
... which contains the check. (And I use it on FreeBSD every day.)
Is there some confusion over the code you're looking at? (Or the code
I'm looking at :-) ? )
This is not work on the FreeBSD. This patch is fixed this problem:
--8<---------------cut here---------------start------------->8---
Index: xemacs-packages/igrep/igrep.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/igrep/igrep.el,v
retrieving revision 1.8
diff -u -u -r1.8 igrep.el
--- xemacs-packages/igrep/igrep.el 2004/07/17 15:39:39 1.8
+++ xemacs-packages/igrep/igrep.el 2005/11/28 19:47:25
@@ -445,14 +445,14 @@
see `igrep-find'.")
(defvar igrep-find-use-xargs
- (cond ((and (equal (call-process igrep-find-program nil nil nil
- igrep-null-device "-print0")
- 0)
- (equal (call-process "xargs" nil nil nil
- "-e" "-0" "cat")
- 0))
- 'gnu)
- ((not (equal system-type 'darwin)))) ; not MacOS
+ (if (and (equal (call-process igrep-find-program nil nil nil
+ igrep-null-device "-print0")
+ 0)
+ (equal (call-process "xargs" nil nil nil
+ "-e" "-0" "cat")
+ 0))
+ 'gnu
+ nil)
"Whether `\\[igrep-find]' uses the `xargs` program or not.
If `gnu', it executes
`find ... -print0 | xargs -0 -e grep ...`;
--8<---------------cut here---------------end--------------->8---