GNU bug report logs - #6674
PATCH: fix assignment of grep-find-use-xargs on Windows/MS-DOS

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <ofv <at> wanadoo.es>

Date: Tue, 20 Jul 2010 03:51:02 UTC

Severity: normal

Done: Óscar Fuentes <ofv <at> wanadoo.es>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 6674 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: 6674 <at> debbugs.gnu.org
Cc: lekktu <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#6674: PATCH: fix assignment of grep-find-use-xargs on Windows
Date: Wed, 21 Jul 2010 01:18:38 +0200
rgrep is broken on Windows. Although it is obvious that a general fix
for the shell issue is the most correct resolution for this bug, I
propose to apply the patch below and revert it once cmdproxy.c is
enhanced for dealing with the problem.

Otherwise, a workaround is to add

(setq grep-find-use-xargs 'exec)

to the user's .emacs file.


2010-07-21  Óscar Fuentes  <ofv <at> wanadoo.es>

	* progmodes/grep.el (grep-compute-defaults): always assign
        'exec to grep-find-use-xargs on Windows.

=== modified file 'lisp/progmodes/grep.el'
*** lisp/progmodes/grep.el	2010-01-31 21:47:47 +0000
--- lisp/progmodes/grep.el	2010-07-20 23:04:56 +0000
*************** Set up `compilation-exit-message-functio
*** 552,557 ****
--- 552,561 ----
  	(unless grep-find-use-xargs
  	  (setq grep-find-use-xargs
  		(cond
+ 		 ;; Windows' shell has problems with long commands and
+ 		 ;; pipes. See bug #6674.
+ 		 ((eq system-type 'windows-nt)
+ 		  'exec)
  		 ((and
  		   (grep-probe find-program `(nil nil nil ,null-device "-print0"))
  		   (grep-probe xargs-program `(nil nil nil "-0" "-e" "echo")))




This bug report was last modified 14 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.