From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Fixing Windows and DOS command line argument quoting Date: Mon, 25 Apr 2011 12:15:17 +0300 Message-ID: <83sjt6adzu.fsf@gnu.org> References: <4DB4D7DB.50101@gmail.com> <83y62yal3o.fsf@gnu.org> <4DB53599.8040703@gmail.com> <4DB537BB.1090205@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1303722929 7654 80.91.229.12 (25 Apr 2011 09:15:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2011 09:15:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 25 11:15:26 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QEHt6-0008K5-J1 for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 11:15:24 +0200 Original-Received: from localhost ([::1]:41054 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEHt6-0000bU-0U for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 05:15:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEHt3-0000bN-KO for emacs-devel@gnu.org; Mon, 25 Apr 2011 05:15:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEHt2-0002lO-Mi for emacs-devel@gnu.org; Mon, 25 Apr 2011 05:15:21 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:43294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEHt2-0002kl-DK; Mon, 25 Apr 2011 05:15:20 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LK700900AWW7J00@a-mtaout20.012.net.il>; Mon, 25 Apr 2011 12:15:18 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.55.52]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LK70092ZB1D2C40@a-mtaout20.012.net.il>; Mon, 25 Apr 2011 12:15:17 +0300 (IDT) In-reply-to: <4DB537BB.1090205@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138710 Archived-At: > Date: Mon, 25 Apr 2011 16:58:35 +0800 > From: Jason Rumney > > On 25/04/2011 16:49, Daniel Colascione wrote: > > > 1. we can have cmdproxy level-two-dequote the supplied command line > > before giving it to CreateProcess, or > > > > 2. we can remove optimization described above and have cmdproxy always > > run the command interpreter. > > > > I favor the second option: cmd starts very quickly, and we don't save > > much time by bypassing it. > > IIRC, this "optimisation" isn't about saving time, but about avoiding > limitations in cmd.exe where possible. Indeed. One such limitation (but not the only one) is the command length limitation: cmd.exe supports only 8K, while CreateProcess can support upto 32K (more if we ever move to using the Unicode interfaces). > Another possibility is to make the decision whether to use cmd.exe or > not based on the presence of "level 2" metacharacters rather than "level 1". This is what I would prefer. Daniel, is this feasible?