From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: Shell and Shell Command Date: Wed, 17 Dec 2014 02:17:13 +0100 Message-ID: <87y4q713dy.fsf@wanadoo.es> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418779232 19438 80.91.229.3 (17 Dec 2014 01:20:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2014 01:20:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 02:20:25 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y13Hd-0007n5-TC for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 02:20:10 +0100 Original-Received: from localhost ([::1]:47440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y13Hd-0005TW-EU for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2014 20:20:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y13HM-0005T4-6s for help-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:19:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y13HG-0005Ko-2Y for help-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:19:52 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:60351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y13HF-0005Je-RY for help-gnu-emacs@gnu.org; Tue, 16 Dec 2014 20:19:45 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y13F2-0007Gl-TW for help-gnu-emacs@gnu.org; Wed, 17 Dec 2014 02:17:28 +0100 Original-Received: from 129.red-88-10-128.dynamicip.rima-tde.net ([88.10.128.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Dec 2014 02:17:28 +0100 Original-Received: from ofv by 129.red-88-10-128.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Dec 2014 02:17:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 59 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 129.red-88-10-128.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:Rq599FOFdN2ZgXzvcQzG51rbHGY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101619 Archived-At: 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.