help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Shell and Shell Command


From: Mike Flynn
Subject: Re: Shell and Shell Command
Date: Wed, 17 Dec 2014 09:48:42 -0800 (PST)
User-agent: G2/1.0

On Tuesday, December 16, 2014 5:20:01 PM UTC-8, Óscar Fuentes wrote:
> mflynn@scu.edu writes:
> 
> > Hi,
> > I installed 24.4.1 from the mingw32 build.  Here's what I get if I run the 
> > version command:
> > GNU Emacs 24.4.1 (i686-pc-mingw32) of 2014-10-24 on LEG570
> >
> > I had previous versions on Emacs installed.
> > I extracted the 24.4 files from the zip and started the executable a few 
> > times by running runemacs.exe
> >
> > If previous jobs I had got used to using bash as the shell in emacs.
> > In my current job I do not program so much and I had not got the shell
> > commands to work. I was excited therfore to see was that ESC-! and
> > ESC-x shell worked out of the box, and that they ran bash commands or
> > started a bash shell.
> 
> This is very strange. Do you have `bash' installed on your system?
> 
> Anyways, Emacs defaults to cmd.exe on Windows. Do you have any package
> that brings in Unix-like commands? Examples are Gnuwin32, MSYS, MSYS2,
> MSYSGit, Cygwin...
> 
> > Then I noticed a little typo in the name of the directory where I had
> > unpacked Emacs. So I deleted all the old stuff and unpacked Emacs
> > again. Now shell and Esc-! shell-command start a DOS shell and accept
> > only DOS commands.
> >
> > Then I realized I had not moved the PATH to the new installation, so I
> > edited the Windows PATH variable (the directory structure seems
> > different from Emacs of a couple of years ago).
> >
> > But still no bash shell - only DOS.
> >
> > What do I need to do?
> >
> > PATH is :
> > C:\Emacs;C:\Emacs\share\emacs\24.4\etc;C:\Emacs\share\info;C:\Emacs\bin;C:\Emacs\share\emacs\24.4\lisp;C:\Emacs\share\emacs\24.4\site-lisp;C:\Emacs\share\info;C:\Emacs\share\man;C:\Emacs\share\man\man1;
> >
> > I know it's overkill, but I don't know what the minimum would be.
> 
> As far as Emacs is concerned, you only need c:\Emacs\bin in your PATH.
> And you don't really need that if you always execute runemacs.exe with a
> fully qualified pathname (c:\Emacs\bin\runemacs.exe in your case) as
> usually is done when usin a Windows shortcut.
> 
> However, there is much missing on your PATH. It lacks the Windows system
> directories. So you either are not showing the full contents of PATH or
> you overwrote it with the Emacs directories instead of
> appending/prepending them, which is the correct practice.
> 
> I suspect that you have one of the Unix-like packages mentioned above,
> that the directory where those Unix-like binaries are installed on was
> previously listed on your PATH (or they were on the same directory were
> you installed Emacs the first time) and that you thought that you were
> running `bash' when in reality you were running the `ls.exe', `cp.exe`,
> etc binaries of the Unix-like package.
> 
> BTW, it is possible to use `bash' as the Emacs shell on Windows. It has
> some caveats, though. There are several places on the Web that explain
> it.

Thanks.  I set the path to just the emacs bin and emacs works just fine.
I'll investigate what the best solution is to having a unix-like shell start 
when I invoke Esc-x shell.  

I'm really baffled as to why I saw the bash-like behavior when I first started 
it.  I don't have any unix packages installed.  Maybe I imagined it.  




reply via email to

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