[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: versus cmd.exe

From: Zhongtao Zhu
Subject: Re: versus cmd.exe
Date: 12 Sep 2002 20:50:10 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden (Kai Großjohann) writes:

> I don't use Windows myself, but I think that some versions of Windows
> use as interpreter for commands and others use cmd.exe.
> Is this true?
> 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. 

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.
Zhongtao Zhu                          Tel: +86 10 6278 2266
Department of Computer, Tsinghua University, Beijing, China

reply via email to

[Prev in Thread] Current Thread [Next in Thread]