From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: shell-quote-argument bug on w32 Date: Mon, 25 Sep 2006 21:51:49 +0200 Message-ID: <45183355.4090807@student.lu.se> References: <4517DC7C.90106@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1159213989 18832 80.91.229.2 (25 Sep 2006 19:53:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2006 19:53:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 25 21:53:08 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 1GRwUm-0004xi-VK for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2006 21:52:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRwUm-0000p0-E2 for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2006 15:52:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GRwUb-0000ol-Gj for emacs-devel@gnu.org; Mon, 25 Sep 2006 15:51:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GRwUa-0000oZ-1b for emacs-devel@gnu.org; Mon, 25 Sep 2006 15:51:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GRwUZ-0000oW-S6 for emacs-devel@gnu.org; Mon, 25 Sep 2006 15:51:51 -0400 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GRwZ2-0006b3-GO; Mon, 25 Sep 2006 15:56:28 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.075) id 451775170004087A; Mon, 25 Sep 2006 21:51:50 +0200 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Eli Zaretskii In-Reply-To: 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:60206 Archived-At: Eli Zaretskii wrote: >> Date: Mon, 25 Sep 2006 15:41:16 +0200 >> From: Lennart Borgman >> >> shell-quote-argument actually is an "os quote argument". It does not >> check what shell is actually used. This is a bug in my opinion, but you >> notice it mostly on w32 where different shells are actually used. >> > > >> I think therefore that shell-quote-argument should check >> shell-file-name at least when system-type is 'windows-nt. >> > > I think it's needed _only_ on windows-nt. Cygwin uses Bash, while the > > >> (defcustom shell-quote-types >> '( ("cmdproxy" w32cmd) ) >> ... > This isn't needed, since we already have w32-system-shell-p and > w32-shell-dos-semantics, see w32-fns.el. > Ah, thanks, I forgot about that. I just still feel that shell-quote-argument is to hard to use. Maybe it should have an optional second argument? That could perhaps make it much easier to use on w32. The reason I was thinking about it was actually the problems I reported yesterday in "Ftp and file name with spaces". It looks to me that probably should quoting there be unix style. And it does not matter what the shell is since the ftp program is run directly (or am I missing something there?). So what is needed on w32 seems to be a way to tell for each program how quoting should be done. And a second optional argument to shell-quote-argument would probably make the coding quite a bit easier.