From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: inherit the path environment from .bash_profile (Mac OS 10.5)
Date: Fri, 6 Aug 2010 00:15:07 -0700 (PDT) [thread overview]
Message-ID: <84a79521-4fdc-4ec0-a7c6-3f9f219187c1@u31g2000pru.googlegroups.com> (raw)
In-Reply-To: mailman.0.1281064508.32647.help-gnu-emacs@gnu.org
On Aug 5, 8:15 pm, Z <zell...@orange.fr> wrote:
> Hello,
>
> Is there a way to inherit the path environments of .bash_profile, when we
> lance emacs directly from the dock of Macs?
>
> In fact, I am using Mac OS X 10.5. I launch carbon emacs from the dock
> (which is the icons list normally at the bottom of the screen) . Then, if I
> invoke a shell from within emacs, it does not inherit the path environment
> defined at .bash_profile !
>
> So in my case, how can I achieve this inheritance of path environments?
> Maybe it suffices to add something at the initialization file .emacs?
>
> Thank you for your ideas.
>
> Z.
this is from my emacs init file, wrote around 2004 or so.
; Carbon Emacs doesn't inherit shell's env. A workaround is to shart
it from shell like this: “/Applications/Emacs.app/Contents/MacOS/Emacs
&” however, exiting the shell by Ctrl+D also kills your emacs. So a
workaround is to use the nohub: “nohup /Applications/Emacs.app/
Contents/MacOS/Emacs &”. However, Apple's Term has a feature such
that closing the window (by clicking on the Red Light or Cmd+w) kills
all processes started from it. So, the solution is to never close
window by clicking or Cmd+w, instead, always use Ctrl+d. However, when
ssh to remote server and running “tail -f”, sometimes broken
connection causes the session to hang. So you are left with a frozen
ssh session where the remote server has disconnected. So, here you
can't use Ctrl-d to close the window. If you close the window by
clicking, then you'll kill any emacs you might have started from that
window. Hot Damn. So, the optimal solution seems to get Carbon Emacs
to start using the Mac's GUI way of inheriting env vars by the file
“~/.MacOSX/environment.plist”. Though, that mean you gonna maintain
two sets of env vars. Shit. Therefore at the end, maybe just dup it in
elisp and forget about all quality solutions. Software Industry is
quite fucked anyway. This is peanuts. All this is due to the
motherfucking unix fucking env var system fuck. Fuck unix and fuck the
unixer's mothers.
(setenv "PATH" "/Users/xah/bin:/usr/local/bin:/opt/local/bin:/
Developer/Tools:/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/
X11R6/bin:/usr/X11R6/bin")
(setenv "MANPATH" "/usr/local/man/:/sw/share/man:/usr/share/man:/usr/
X11R6/man:/sw/lib/perl5/5.8.6/man")
Xah
∑ http://xahlee.org/
☄
next prev parent reply other threads:[~2010-08-06 7:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.0.1281064508.32647.help-gnu-emacs@gnu.org>
2010-08-06 5:58 ` inherit the path environment from .bash_profile (Mac OS 10.5) Tim X
2010-08-06 7:15 ` Xah Lee [this message]
[not found] <mailman.1.1281064641.32647.help-gnu-emacs@gnu.org>
2010-08-06 12:02 ` Inherit " Elena
2010-08-06 3:17 Z
2010-08-06 8:47 ` Peter Dyballa
2010-08-06 14:04 ` Jim Crossley
2010-08-06 15:27 ` Peter Dyballa
2010-08-08 17:54 ` Andrea Crotti
2010-08-06 12:09 ` Andrea Crotti
-- strict thread matches above, loose matches on Subject: below --
2010-08-06 3:15 inherit " Z
2010-08-06 14:00 ` Jim Crossley
2010-08-06 15:36 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84a79521-4fdc-4ec0-a7c6-3f9f219187c1@u31g2000pru.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.