unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Shell and Shell Command
@ 2014-12-17  0:26 mflynn
  2014-12-17  1:17 ` Óscar Fuentes
       [not found] ` <mailman.16258.1418779199.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: mflynn @ 2014-12-17  0:26 UTC (permalink / raw)
  To: help-gnu-emacs

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.

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.

Michael


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Shell and Shell Command
  2014-12-17  0:26 Shell and Shell Command mflynn
@ 2014-12-17  1:17 ` Óscar Fuentes
       [not found] ` <mailman.16258.1418779199.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Óscar Fuentes @ 2014-12-17  1:17 UTC (permalink / raw)
  To: help-gnu-emacs

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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Shell and Shell Command
       [not found] ` <mailman.16258.1418779199.1147.help-gnu-emacs@gnu.org>
@ 2014-12-17 17:48   ` Mike Flynn
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Flynn @ 2014-12-17 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

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.  




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-17 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17  0:26 Shell and Shell Command mflynn
2014-12-17  1:17 ` Óscar Fuentes
     [not found] ` <mailman.16258.1418779199.1147.help-gnu-emacs@gnu.org>
2014-12-17 17:48   ` Mike Flynn

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).