From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Quote file name args to start-process-shell-command? Date: Thu, 12 Oct 2006 11:27:58 +0200 Message-ID: <85d58xq3xd.fsf@lola.goethe.zz> References: <452D54D8.7060705@student.lu.se> <452DDBC8.2060606@student.lu.se> <85y7rmou5t.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160646225 21383 80.91.229.2 (12 Oct 2006 09:43:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Oct 2006 09:43:45 +0000 (UTC) Cc: Lennart Borgman , Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 12 11:43:44 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GXx61-0001l3-4Z for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2006 11:43:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXx60-0006wR-4S for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2006 05:43:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXwru-00017z-Vn for emacs-devel@gnu.org; Thu, 12 Oct 2006 05:28:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXwrt-00016W-3p for emacs-devel@gnu.org; Thu, 12 Oct 2006 05:28:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXwrq-00016C-JL for emacs-devel@gnu.org; Thu, 12 Oct 2006 05:28:43 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXx02-0007EC-O9 for emacs-devel@gnu.org; Thu, 12 Oct 2006 05:37:10 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GXwrp-0004TK-LK; Thu, 12 Oct 2006 05:28:41 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 0E79D1CE169B; Thu, 12 Oct 2006 11:27:58 +0200 (CEST) Original-To: Andreas Schwab In-Reply-To: (Andreas Schwab's message of "Thu\, 12 Oct 2006 10\:49\:45 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:60636 Archived-At: Andreas Schwab writes: > David Kastrup writes: > >> Eli Zaretskii writes: >> >>> For example, I just tried this: >>> >>> (call-process-shell-command "ls" nil t nil "foo* bar*") >>> >>> and got a listing of all files that match the two wildcards `foo*' and >>> `bar*'. >> >> I think that would be abuse of the command. > > No, it isn't. The doc string says: > > "Wildcards and redirection are handled as usual in the shell." Spaces are neither a wildcard nor a redirection. > That implies that there shall be no quoting applied. `shell-quote-argument' and `shell-quote-wildcard-pattern' are two different functions. > You need to go lower level to avoid metacharacter handling. Straw man. This never was about "metacharacter handling" but rather about argument processing. However, I agree that `shell-quote-argument' would be inappropriate to apply on the arguments of `call-process-shell-command'. Only those characters responsible for splitting arguments into words should get quoted. That would pretty much be the subset that `shell-quote-wildcard-pattern' uses. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum