Mail Archives: cygwin/2000/08/10/13:32:07
Hi,
Adam Schlegel writes:
> Are you normally running the cygwin.bat file to run cygwin?
Yes, normally I do this, but my cygwin.bat is (almost) virgin and does
not change PATH. There is actually no difference whether I run
cygwin.bat or start bash as bash -login -i from a NT command line
window as far as the PATH is concerned.
>
> The cygwin.bat file adds those extra entries to your path for
> normal operation, but is not invoked by emacs when running bash.
>
My cygwin.bat reads:
-----------
@echo off
d:
chdir \cygwin\bin
SET MAKE_MODE=unix
bash --login -i
-----------
No path mangling here. I just added the MAKE_MODE line to the
cygwin.bat shipped with the latest net release.
regards,
Markus
> 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
--
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
- Raw text -