From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Zhongtao Zhu Newsgroups: gmane.emacs.help Subject: Re: command.com versus cmd.exe Date: 12 Sep 2002 20:50:10 +0800 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1031834947 4066 127.0.0.1 (12 Sep 2002 12:49:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 12 Sep 2002 12:49:07 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17pTP4-00012y-00 for ; Thu, 12 Sep 2002 14:49:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pTPE-0004n5-00; Thu, 12 Sep 2002 08:49:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17pTOQ-0004YU-00 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2002 08:48:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17pTON-0004XZ-00 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2002 08:48:20 -0400 Original-Received: from mail.tsinghua.edu.cn ([166.111.8.18]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pTOM-0004XV-00 for help-gnu-emacs@gnu.org; Thu, 12 Sep 2002 08:48:19 -0400 Original-Received: (eyou send program); Thu, 12 Sep 2002 20:44:57 +0800 Original-Received: from unknown (HELO zhongtao.tsinghua.edu.cn) (unknown@166.111.233.1) by 166.111.8.18 with SMTP; Thu, 12 Sep 2002 20:44:57 +0800 Original-To: help-gnu-emacs@gnu.org In-Reply-To: Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1375 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1375 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: > I don't use Windows myself, but I think that some versions of Windows > use command.com as interpreter for commands and others use cmd.exe. > Is this true? >=20 > If it is true, how would a Lisp package know which one to use? > shell-file-name? system-type? In Emacs source tree there is a nt/ directory containing support for compiling and running GNU Emacs on MS Windows 95/98/nt/xp. I'd like to cite two paragraphs from cmdproxy.c as follows: Accepts subset of Unix sh(1) command-line options, for compatability with elisp code written for Unix. When possible, executes external programs directly (a common use of /bin/sh by Emacs), otherwise invokes the user-specified command processor to handle built-in shell commands, batch files and interactive mode. The main function is simply to process the "-c string" option in the way /bin/sh does, since the standard Windows command shells use the convention that everything after "/c" (the Windows equivalent of "-c") is the input string. I think this would be a hint to Kai's question.=20 By building Emacs from the nt/ directory in MS Windows, every thing works successfully well. I now check the variable `shell-file-name' in my machine it is set with "D:/emacs/bin/cmdproxy.exe". In other experiment I've performed by net-install the pre-compiled binaries without X11 in MS Windows, the installed Emacs when running in cmd.exe seems insane since it cannot even be terminated by C-x C-c. I wonder if this is exactly related to Kai's hesitation. --=20 Zhongtao Zhu Tel: +86 10 6278 2266 Department of Computer, Tsinghua University, Beijing, China