delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/15/10:33:08

Date: Wed, 15 Jan 1997 17:20:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "W. L. Estes" <wlestes AT hamlet DOT uncg DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: bash, emacs 19.34, shell commands
In-Reply-To: <Pine.GSO.3.93.970110122145.518B-100000@euler.uncg.edu>
Message-ID: <Pine.SUN.3.91.970115170733.15458E-100000@is>
MIME-Version: 1.0

On Fri, 10 Jan 1997, W. L. Estes wrote:

> while in emacs:
> 
> with comspec pointing to c:\4dos\4dos.com,
> 
> running m-!help calls the msdos help, not the 4dos help.
> tried from my shell (4dos) prompt, it does call the right help.

Short answer: say `M-! 4dos help RET' instead of `M-! help RET'.

Long answer: this is a feature.  Emacs on MSDOS doesn't blindly call the
shell when you invoke `M-!', but first looks on the PATH for the named
command, and thus finds the DOS help.com and invokes it.  The reason for 
this is that even 4DOS isn't smart enough for us DJGPP'ers (to say 
nothing of stock COMMAND.COM): for example, the way Emacs works, you can 
invoke long commands (upto 14KB, to be exact), which is impossible with 
DOS shells.  Another case in point is when you have a program named 
`mkdir' (e.g. from GNU Fileutils) which is much smarter than its DOS 
namesake: if Emacs would to go through the shell, you would never be able 
to call that `mkdir'.  If you need to invoke a command internal to the 
shell, be sure to call it explicitly, like above.

Btw, the above behavior is implemented inside DJGPP library function 
`system'; Emacs merely calls `system' when you press `M-!'.  There is 
much more to features of `system' than I can tell here; please refer to 
the docs of that function in the libc reference, for the details.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019