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:35:52 +0300 Message-ID: <83r58qad1j.fsf@gnu.org> References: <4DB4D7DB.50101@gmail.com> <83y62yal3o.fsf@gnu.org> <4DB53599.8040703@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1303724166 13087 80.91.229.12 (25 Apr 2011 09:36:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2011 09:36:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 25 11:35:59 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 1QEID0-0001A2-UH for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 11:35:59 +0200 Original-Received: from localhost ([::1]:58360 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEID0-0004Rc-0y for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2011 05:35:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEICw-0004RM-CY for emacs-devel@gnu.org; Mon, 25 Apr 2011 05:35:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEICv-0007kB-AF for emacs-devel@gnu.org; Mon, 25 Apr 2011 05:35:54 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:47579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEICv-0007k1-2f for emacs-devel@gnu.org; Mon, 25 Apr 2011 05:35:53 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LK700600BP32700@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Mon, 25 Apr 2011 12:35:51 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.55.52]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LK7006O5BZO0V20@a-mtaout21.012.net.il>; Mon, 25 Apr 2011 12:35:50 +0300 (IDT) In-reply-to: <4DB53599.8040703@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 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:138714 Archived-At: > Date: Mon, 25 Apr 2011 01:49:29 -0700 > From: Daniel Colascione > CC: emacs-devel@gnu.org > > > . Please leave the `ms-dos' quoting as it was before. (Your research > > and blog are not valid for the MS-DOS, a.k.a. DJGPP, build of > > Emacs, which uses its own private way of passing and decoding > > command lines, bypassing MS runtime and OS facilities. The > > problems you mention in your blog do not exist in the MS-DOS > > build.) Please make the new quoting method effective for the > > `windows-nt' case alone. > > What happens when MS-DOS Emacs executes a non-DJGPP program? I'm not interested in what happens in that case. It is a mess anyway, because of the vastly different quoting features supported by the stock DOS/Windows shells. Your method will work only on Windows NT family, and only if the DJGPP library succeeds in forcing the OS to use cmd.exe as the shell. (AFAIK, normally, Windows still loads command.com for DOS programs.) Anyway, DJGPP users know very well that to have a viable and stable environment, they should use DJGPP programs in preference to the other kind. If they don't, all bets are off, and the 126-character limit on command lines doesn't leave you enough space to safely quote commands anyway. The current quoting method worked well for the last 12 years, so it ought to be good enough for these marginal cases. > Doesn't it ever pass arguments through the command interpreter? Only when the command explicitly invokes the shell, or some of its non-trivial internal commands, or batch files. Otherwise, everything is done internally, including pipes and redirections. > It's been a very > long time since I've used MS-DOS, and I don't know its command > interpreter's behavior differs from that of NT's cmd.exe. It is VERY different, especially where quoting is considered.