From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: "source" shell commands Date: Sun, 25 Mar 2007 13:53:27 +0200 Message-ID: <6A88E31C-15DF-4589-9D89-F5C572080230@Web.DE> References: <87bqii936r.fsf@baldur.tsdh.de> <85wt16btg5.fsf@lola.goethe.zz> <46059643.8090705@gatech.edu> <4605BD72.6040904@gatech.edu> <2D4FA764-9DEE-4F5C-8501-AA4E3F4787A7@Web.DE> <46065528.5000702@gatech.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1174823763 18005 80.91.229.12 (25 Mar 2007 11:56:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2007 11:56:03 +0000 (UTC) Cc: emacs To: Matthew Flaschen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 25 13:55:56 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HVRKG-0000Lt-Cl for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Mar 2007 13:55:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVRMN-0001Lw-Ts for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Mar 2007 06:58:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HVRMA-0001Lh-96 for help-gnu-emacs@gnu.org; Sun, 25 Mar 2007 07:57:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HVRM7-0001LV-Fr for help-gnu-emacs@gnu.org; Sun, 25 Mar 2007 07:57:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVRM7-0001LS-A2 for help-gnu-emacs@gnu.org; Sun, 25 Mar 2007 06:57:51 -0500 Original-Received: from fmmailgate01.web.de ([217.72.192.221]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HVRJy-0007op-Ry for help-gnu-emacs@gnu.org; Sun, 25 Mar 2007 07:55:39 -0400 Original-Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate01.web.de (Postfix) with ESMTP id AAE126E0C812; Sun, 25 Mar 2007 13:53:35 +0200 (CEST) Original-Received: from [62.134.234.151] (helo=[192.168.1.2]) by smtp05.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.107 #114) id 1HVRHz-0000WV-00; Sun, 25 Mar 2007 13:53:35 +0200 In-Reply-To: <46065528.5000702@gatech.edu> X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42180 Archived-At: Am 25.03.2007 um 12:55 schrieb Matthew Flaschen: > Apparently bash. However, ~/.bashrc already sources ~/.rc , which > includes JAVA_HOME . It was my impression that bash *always* read > ~/.bashrc . As I recommended: put an echo " Hi, Matt! It's me, your ~/.bashrc. Remember me, still?" > = /=20 dev/console into your ~/.bashrc and see what you'll see. What is pstree showing? For me, on Mac OS X, and launched from some =20 menu, I get: pete 123 /\ pstree -p $$ -+=3D 00001 root /sbin/launchd -v \-+- 01695 pete -bin/tcsh -i -c /usr/local/bin/emacs-23.0.0 -=20 geometry 100x57+666+44 \-+- 01700 pete /usr/local/bin/emacs-23.0.0 -geometry = 100x57+666+44 \-+=3D 01701 pete -bin/tcsh -i \-+=3D 04001 pete pstree -p 1701 \--- 04002 root ps -axwwo user An interactive tcsh stands at my beginning. 'Man bash,' in GNU Emacs, will reveal: =95 when invoked as a login shell, it will read /etc/profile, =20= ~/.bash_profile, ~/.bash_login, ~/.profile in that sequence; =95 when invoked as an interactive shell, that is no login = shell, it =20 will read ~/.bashrc; =95 when invoked with the name sh, it mimics the Bourne shell = reading /=20 etc/profile and ~/.profile, in that order; =95 when a login shell is finished, ~/.bash_logout is read. There are constraints with environment variables like ENV or =20 BASH_ENV. So even a non-interactive non-login bash can read (and =20 execute) some RC files. When the login bash hits the first of the many personal RC files, it =20 only executes the first one. So, IMO, it's best to put everything =20 personal in Bourne shell syntax into ~/.profile, which a Bourne shell =20= or Bourne shell bash will read (and execute) also. And read, not entirely, you have C-s, the *Man bash* buffer a few times! > Should I source ~/.rc in ~/.profile instead? No. Keep it simple, let bash do its job right. -- Greetings Pete Math illiteracy affects 7 out of every 5 Americans.