X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 	tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4A2D9947.1080606@aim.com>
References: <4A2D9947.1080606@aim.com>
Date: Tue, 9 Jun 2009 01:32:27 +0200
Message-ID: <e01d8a50906081632t238a268dt28d5b55e29996773@mail.gmail.com>
Subject: Re: Bug in $PATH initialization?
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Mark Harig <idirectscm@aim.com>
Cc: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Tue, Jun 9, 2009 at 1:05 AM, Mark Harig<idirectscm@aim.com> wrote:
> From the bash manual (in emacs: M-: (info "(bash) Bash Startup Files")):
>
> "When an interactive shell that is not a login shell is started, Bash
> reads and executes commands from `~/.bashrc', if that file exists.
> This may be inhibited by using the `--norc' option."
>
> So, in the typical case, when you start bash with '-i', it sources the
> following files:
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 /etc/profile =C2=A0 # which typically contain=
s PATH initialization
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ~/.bash_profile =C2=A0# or some other "login"=
 file, such as ~/.profile
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ~/.bash_profile will usually source ~/.bashrc=
 (the non-login code)
>
> To avoid having these files read, start bash with '--noprofile' (if you w=
ish
> to avoid reading /etc/profile and ~/.bash_profile) and '--norc' (if you w=
ish
> to avoid reading ~/.bashrc. =C2=A0Or, simply edit /etc/profile and ~/.bas=
hrc,
> where PATH is typically set to get PATH to have the ordering that you
> want.

Thanks Mark. I might need this information, I am not sure at the
moment, but I am trying to do avoid changing anything in this file. I
am not the user so to say.

What I am trying to do is to make the setup for the command
cygwin-shell in the Emacs+EmacsW32 distro as automatic as possible.
The user should not have to care. It should just work. (This is native
Emacs, compiled for windows, not for cygwin.)

So therefor I check the cygwin installation from the windows registry
and try to add the path for cygwin as I told before.

The information I got here is that the result from what I do should
work as expected. There is now only one flaw and that is that cygwin
will not show the expected path in $PATH. This could be a source of
great confusion and waste a lot of time for a user hunting a difficult
error so it would be good if it could be fixed.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

