Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Markus Hoenicka" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14738.51356.380000.48156@gargle.gargle.HOWL> Date: Thu, 10 Aug 2000 15:22:04 +0000 (CT0) To: Adam Schlegel CC: cygwin AT sources DOT redhat DOT com Subject: Re: cygwin modifies path: problems in NTEmacs shell buffer In-Reply-To: <20000810110712.C5789@mailhost.thinkage.ca> References: <14738 DOT 48729 DOT 182000 DOT 978810 AT gargle DOT gargle DOT HOWL> <20000810110712 DOT C5789 AT mailhost DOT thinkage DOT ca> X-Mailer: VM 6.75 under Emacs 20.6.1 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": > > ;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::/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: > > :/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