From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephan Stahl" Newsgroups: gmane.emacs.devel Subject: Should shell-quote-argument really use (eq system-type 'windows-nt)? Date: Mon, 7 Mar 2005 13:59:28 +0100 (CET) Message-ID: <47393.217.194.34.123.1110200368.squirrel@wwws.franken.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Trace: sea.gmane.org 1110201140 31175 80.91.229.2 (7 Mar 2005 13:12:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Mar 2005 13:12:20 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 07 14:12:19 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D8I1s-0005W8-L6 for ged-emacs-devel@m.gmane.org; Mon, 07 Mar 2005 14:12:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8ILe-0007Kt-5c for ged-emacs-devel@m.gmane.org; Mon, 07 Mar 2005 08:32:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D8IFh-0005Vq-VA for emacs-devel@gnu.org; Mon, 07 Mar 2005 08:26:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D8IFX-0005Q2-8i for emacs-devel@gnu.org; Mon, 07 Mar 2005 08:26:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D8IFV-0005KB-9P for emacs-devel@gnu.org; Mon, 07 Mar 2005 08:26:17 -0500 Original-Received: from [193.175.24.27] (helo=ilsa.franken.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1D8Hpb-00059p-JN for emacs-devel@gnu.org; Mon, 07 Mar 2005 07:59:32 -0500 Original-Received: from wwws.franken.de (mail-n.franken.de [193.175.24.27]) by ilsa.franken.de (Postfix) with SMTP id 556F6245D0 for ; Mon, 7 Mar 2005 13:59:28 +0100 (CET) Original-Received: from 217.194.34.123 (SquirrelMail authenticated user eos) by wwws.franken.de with HTTP; Mon, 7 Mar 2005 13:59:28 +0100 (CET) Original-To: emacs-devel@gnu.org User-Agent: SquirrelMail/1.4.0 X-Priority: 3 Importance: Normal 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34272 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34272 Hi. I think shell-quote-argument should not use (eq system-type'windows-nt) instead it should take shell-file-name into account. It seems very usual for emacs users on w32 to use cygwin or mingw. Right now shell-quote-argument would return something wrong when bash or some "intelligent" shell is used on w32 because it assumes a dumb w32 shell. What do others think about this (little tested) change? diff -c "subr.el.~1.433~" "subr.el" *** subr.el.~1.433~ Mon Mar 7 13:47:21 2005 --- subr.el Mon Mar 7 13:48:36 2005 *************** *** 2274,2280 **** "\\" (substring argument end (1+ end))) start (1+ end)))) (concat "\"" result (substring argument start) "\"")) ! (if (eq system-type 'windows-nt) (concat "\"" argument "\"") (if (equal argument "") "''" --- 2274,2280 ---- "\\" (substring argument end (1+ end))) start (1+ end)))) (concat "\"" result (substring argument start) "\"")) ! (if (string-match shell-dumb-shell-regexp shell-file-name) (concat "\"" argument "\"") (if (equal argument "") "''" Stephan -- Stephan Stahl