help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inherit the path environment from .bash_profile (Mac OS 10.5)


From: Xah Lee
Subject: Re: inherit the path environment from .bash_profile (Mac OS 10.5)
Date: Wed, 08 Dec 2010 15:23:24 -0000
User-agent: G2/1.0

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/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]