Date: Wed, 15 Jan 1997 17:20:38 +0200 (IST) From: Eli Zaretskii To: "W. L. Estes" cc: djgpp AT delorie DOT com Subject: Re: bash, emacs 19.34, shell commands In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.