From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Using `call-process-shell-command' in `process-lines' Date: Mon, 26 Nov 2007 15:35:51 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196109385 26863 80.91.229.12 (26 Nov 2007 20:36:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 20:36:25 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 26 21:36:32 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iwkgt-0003zi-Mm for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2007 21:36:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iwkge-0000Ey-KO for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2007 15:36:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iwkga-0000A0-1B for emacs-devel@gnu.org; Mon, 26 Nov 2007 15:36:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwkgY-00006J-7P for emacs-devel@gnu.org; Mon, 26 Nov 2007 15:36:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwkgY-000068-1W for emacs-devel@gnu.org; Mon, 26 Nov 2007 15:36:06 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IwkgT-0002iH-VV; Mon, 26 Nov 2007 15:36:02 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id A7A8C2CF4C2; Mon, 26 Nov 2007 15:36:01 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 03EBC3FE2; Mon, 26 Nov 2007 15:35:52 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id E3AA86CA42; Mon, 26 Nov 2007 15:35:51 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Mon, 26 Nov 2007 22:23:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84173 Archived-At: > If this minor variant works: > (apply #'call-process "c:/bin/gnuwin32/bin/find.exe" nil > (get-buffer-create "output") nil '("c:/emacs/trunk/lisp/" "-name" > (shell-quote-argument "*.el"))) > it might give you a clue to the solution. The call to > shell-quote-argument should be limited to Windows only, since the > Windows implementation of the library function called by call-process > constructs a single command line out of all arguments, which of course > means you need an extra pair of quotes. But this library function already does the necessary quoting. The problem seems to be that under Windows, the globbing is not done by the shell but by the application, so while under Unix no globbing is performed (because no shell is involved) under Windows `find' performs globbing. I'd be surprised if it's the first time this happens. What solutions have we used in the other cases where this problem showed up? Stefan