unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Zhongtao Zhu <zhongtao@tsinghua.edu.cn>
Subject: Re: command.com versus cmd.exe
Date: 12 Sep 2002 20:50:10 +0800	[thread overview]
Message-ID: <uu1kv9xtp.fsf@tsinghua.edu.cn> (raw)
In-Reply-To: <vafd6rjec5c.fsf@lucy.cs.uni-dortmund.de>

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) 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?
> 
> 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

  parent reply	other threads:[~2002-09-12 12:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 10:27 command.com versus cmd.exe Kai Großjohann
2002-09-12 11:03 ` Klaus Berndl
2002-09-12 11:50   ` Kai Großjohann
2002-09-12 12:45     ` Klaus Berndl
2002-09-12 17:23       ` Jochen Küpper
2002-09-12 12:59     ` lawrence mitchell
2002-09-12 13:55       ` Kai Großjohann
2002-09-12 22:15       ` FRC
2002-09-12 12:50 ` Zhongtao Zhu [this message]
     [not found] ` <mailman.1031834951.18415.help-gnu-emacs@gnu.org>
2002-09-12 13:53   ` Kai Großjohann
2002-09-13  8:49     ` Klaus Berndl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uu1kv9xtp.fsf@tsinghua.edu.cn \
    --to=zhongtao@tsinghua.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).