delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/10/13:39:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 10 Aug 2000 11:07:12 -0400
From: Adam Schlegel <aceschle AT thinkage DOT ca>
To: Markus Hoenicka <Markus DOT Hoenicka AT uth DOT tmc DOT edu>
Cc: cygwin AT sources DOT redhat DOT com
Subject: Re: cygwin modifies path: problems in NTEmacs shell buffer
Message-ID: <20000810110712.C5789@mailhost.thinkage.ca>
References: <14738 DOT 48729 DOT 182000 DOT 978810 AT gargle DOT gargle DOT HOWL>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.4us
In-Reply-To: <14738.48729.182000.978810@gargle.gargle.HOWL>; from Markus Hoenicka on Thu, Aug 10, 2000 at 02:38:17PM +0000

Are you normally running the cygwin.bat file to run cygwin?

The cygwin.bat file adds those extra entries to your path for
normal operation, but is not invoked by emacs when running bash.

I'd suggest adding those entries to your NT path so that you can
use cygwin utilities whenever you want. That would mean running
bash.exe intead of cygwin.bat for normal cygwin use.

Adam Schlegel

On Thu, Aug 10, 2000 at 02:38:17PM +0000, Markus Hoenicka wrote:
> Hi,
> 
> when upgrading from B20.1 to the latest net release I noticed a change
> in how the PATH is handled. It appears to me that Cygwin (I say Cygwin
> because I don't know where this exactly happens - bash or
> cygwin1.dll?) automagically prepends /usr/local/bin:/usr/bin:/bin to
> the path. This is basically fine but for some reason does not work if
> I use bash as a shell in NTEmacs.
> 
> My NT path in a NT command line window looks as follows, using the
> command "path":
> <NT stuff>;d:\cygwin\bin
> 
> The latter is necessary to find bash in the first place.
> 
> If I now start bash from this command line window with bash -login -i
> and run "echo $PATH", I get:
> /usr/local/bin:/usr/bin:/bin:<NT stuff>:/cygdrive/d/user/mhoen/scripts
> 
> Cygwin prepends the first three entries. I replace the d:\cygwin\bin
> entry of my NT path with /user/mhoen/scripts in my .bashrc. I don't
> need the scripts outside of bash, and I can remove d:\cygwin\bin as
> this would simply duplicate what Cygwin prepends anyway.
> 
> If I now start bash in an NTEmacs shell buffer, the path looks
> different:
> <NT stuff>:/cygdrive/d/user/mhoen/scripts
> 
> That means my .bashrc is read correctly, but Cygwin fails to add
> /usr/local/bin:/usr/bin:/bin.
> 
> I use the following settings in my _emacs:
> 
> ; try to use bash as the default shell
> (setq shell-file-name "bash")
> (setenv "SHELL" shell-file-name)
> (setq explicit-shell-file-name shell-file-name)
> (setq explicit-shell-args '("-login" "-i"))
> (setq shell-command-switch "-c")
> (setq w32-quote-process-args t)
> (defun bash ()
>   (interactive)
>   (let ((binary-process-input t)
>         (binary-process-output nil))
>     (shell)))
> 
> (setq process-coding-system-alist (cons '("bash" . (raw-text-dos . raw-text-unix))
> 					process-coding-system-alist))
> 
> (require 'cygwin32-mount)
> 
> i.e. this will also run bash -login -i.
> 
> I could certainly just add the missing paths in my .bashrc, but this
> would mean that I have three duplicate paths in my command line bash
> sessions.
> 
> Any ideas how to rectify this?
> 
> Markus
> 
> -- 
> Markus Hoenicka, PhD
> UT Houston Medical School
> Dept. of Integrative Biology and Pharmacology
> 6431 Fannin MSB4.114
> Houston, TX 77030
> (713) 500-6313, -7477
> (713) 500-7444 (fax)
> Markus DOT Hoenicka AT uth DOT tmc DOT edu
> http://ourworld.compuserve.com/homepages/hoenicka_markus/
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

-- 
"Whenever I type any code I never have any bugs. I never have
any syntax errors. These fingers are like gold. And if you
believe that, I have some other stuff I can sell you."
	T. Vasiga, CS 241

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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