unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* MAC OSX Emacs does not find PATH
@ 2010-04-05  8:10 Daniel (Youngwhan)
  2010-04-05 13:21 ` Harald Hanche-Olsen
  2010-04-06  8:17 ` Stefan Kamphausen
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel (Youngwhan) @ 2010-04-05  8:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I am using GNU Emacs 23.1.95.1 (x86_64-apple-darwin, NS apple-
appkit-1038.29) of 2010-04-03 on black.local in MAC OSX (intel)

And, I found that it does not recognize added PATH in bash/
environment.plist at all.

I googled it, and found that

defaults write $HOME/.MacOSX/environment PATH "$PATH"

will make it work, but in my case, it does not work at all.

I tried

defaults write -globalDomain PATH "$PATH"

but no luck.

I tried insert /etc/profile, /etc/bashrc, $HOMW/.emacs_bash, but no
luck too.

When it goes shell mode, PATH is showing correctly when (setenv "PATH"
path) is being set in .emacs, but while using cscope, it says it
cannot find cscope which is in /opt/local/bin where should be added.

When I launch it through terminal, it works as expected.

Is there any body how I can resolve this one, please?

Thanks,

Daniel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05  8:10 MAC OSX Emacs does not find PATH Daniel (Youngwhan)
@ 2010-04-05 13:21 ` Harald Hanche-Olsen
  2010-04-05 14:47   ` Daniel (Youngwhan)
  2010-04-06  8:17 ` Stefan Kamphausen
  1 sibling, 1 reply; 9+ messages in thread
From: Harald Hanche-Olsen @ 2010-04-05 13:21 UTC (permalink / raw)
  To: help-gnu-emacs

+ "Daniel (Youngwhan)" <breadncup@gmail.com>:

> I am using GNU Emacs 23.1.95.1 (x86_64-apple-darwin, NS apple-
> appkit-1038.29) of 2010-04-03 on black.local in MAC OSX (intel)
>
> And, I found that it does not recognize added PATH in bash/
> environment.plist at all.
>
> I googled it, and found that
>
> defaults write $HOME/.MacOSX/environment PATH "$PATH"
>
> will make it work, but in my case, it does not work at all.

Did you remember to log out and back in afterwards?

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05 13:21 ` Harald Hanche-Olsen
@ 2010-04-05 14:47   ` Daniel (Youngwhan)
  2010-04-05 22:16     ` Harald Hanche-Olsen
  2010-04-05 22:21     ` Harald Hanche-Olsen
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel (Youngwhan) @ 2010-04-05 14:47 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 5, 6:21 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>
> > I am using GNU Emacs 23.1.95.1 (x86_64-apple-darwin, NS apple-
> > appkit-1038.29) of 2010-04-03 on black.local in MAC OSX (intel)
>
> > And, I found that it does not recognize added PATH in bash/
> > environment.plist at all.
>
> > I googled it, and found that
>
> > defaults write $HOME/.MacOSX/environment PATH "$PATH"
>
> > will make it work, but in my case, it does not work at all.
>
> Did you remember to log out and back in afterwards?
>
> --
> * Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
> - It is undesirable to believe a proposition
>   when there is no ground whatsoever for supposing it is true.
>   -- Bertrand Russell

Of course, I did, but no luck.

Daniel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05 14:47   ` Daniel (Youngwhan)
@ 2010-04-05 22:16     ` Harald Hanche-Olsen
  2010-04-05 22:21     ` Harald Hanche-Olsen
  1 sibling, 0 replies; 9+ messages in thread
From: Harald Hanche-Olsen @ 2010-04-05 22:16 UTC (permalink / raw)
  To: help-gnu-emacs

+ "Daniel (Youngwhan)" <breadncup@gmail.com>:

> On Apr 5, 6:21 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
>> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>>
>> > I googled it, and found that
>>
>> > defaults write $HOME/.MacOSX/environment PATH "$PATH"
>>
>> > will make it work, but in my case, it does not work at all.
>>
>> Did you remember to log out and back in afterwards?
>>
> Of course, I did, but no luck.

Hm. Well, it should. (It's the loginwindow program that reads the file
and puts the data in its environment, and all your other processes
should inherit from it.) It works for me. Maybe you're better off asking
in some Mac group. There must be something odd about your setup, I think.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05 14:47   ` Daniel (Youngwhan)
  2010-04-05 22:16     ` Harald Hanche-Olsen
@ 2010-04-05 22:21     ` Harald Hanche-Olsen
  2010-04-06  2:47       ` queries0
  2010-04-06  3:53       ` Daniel (Youngwhan)
  1 sibling, 2 replies; 9+ messages in thread
From: Harald Hanche-Olsen @ 2010-04-05 22:21 UTC (permalink / raw)
  To: help-gnu-emacs

+ "Daniel (Youngwhan)" <breadncup@gmail.com>:

> On Apr 5, 6:21 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
>> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>>
>> > I [...] and found that
>>
>> > defaults write $HOME/.MacOSX/environment PATH "$PATH"
>>
>> > will make it work, but in my case, it does not work at all.
>>
>> Did you remember to log out and back in afterwards?
>>
> Of course, I did, but no luck.

I think something is odd with your mac setup, not with emacs.
Try locating your Finder process (ps uxww | grep Finder) and inspect its
environment with  ps eww PID,  where PID is the pid of your Finder
process. If the PATH value you set in .MacOSX/environment is not present
in the output, this is not an emacs problem, and you're better off
asking in a mac newsgroup.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05 22:21     ` Harald Hanche-Olsen
@ 2010-04-06  2:47       ` queries0
  2010-04-06  3:53       ` Daniel (Youngwhan)
  1 sibling, 0 replies; 9+ messages in thread
From: queries0 @ 2010-04-06  2:47 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 5, 6:21 pm, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>
> > On Apr 5, 6:21 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> >> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>
> >> > I [...] and found that
>
> >> > defaults write $HOME/.MacOSX/environment PATH "$PATH"
>
> >> > will make it work, but in my case, it does not work at all.
>
> >> Did you remember to log out and back in afterwards?
>
> > Of course, I did, but no luck.
>
> I think something is odd with your mac setup, not with emacs.
> Try locating your Finder process (ps uxww | grep Finder) and inspect its
> environment with  ps eww PID,  where PID is the pid of your Finder
> process. If the PATH value you set in .MacOSX/environment is not present
> in the output, this is not an emacs problem, and you're better off
> asking in a mac newsgroup.

For what it's worth, I am running Emacs 22.3.1 on OS X 10.6.3 and I am
having (and have had under previous OS versions) similar problems to
Daniels's.

In the Emacs shell, my .zshrc and .zshenv customizations (my login
shell is /bin/zsh) are not recognized, even if I explicitly $ source ~/
zsh* the files.

My workaround is to use either Terminal.app or an X windows terminal,
but I agree that it would be much better if Emacs recognized my
default shell, and its customizations.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05 22:21     ` Harald Hanche-Olsen
  2010-04-06  2:47       ` queries0
@ 2010-04-06  3:53       ` Daniel (Youngwhan)
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel (Youngwhan) @ 2010-04-06  3:53 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 5, 3:21 pm, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>
> > On Apr 5, 6:21 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> >> + "Daniel (Youngwhan)" <breadn...@gmail.com>:
>
> >> > I [...] and found that
>
> >> > defaults write $HOME/.MacOSX/environment PATH "$PATH"
>
> >> > will make it work, but in my case, it does not work at all.
>
> >> Did you remember to log out and back in afterwards?
>
> > Of course, I did, but no luck.
>
> I think something is odd with your mac setup, not with emacs.
> Try locating your Finder process (ps uxww | grep Finder) and inspect its
> environment with  ps eww PID,  where PID is the pid of your Finder
> process. If the PATH value you set in .MacOSX/environment is not present
> in the output, this is not an emacs problem, and you're better off
> asking in a mac newsgroup.
>
> --
> * Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
> - It is undesirable to believe a proposition
>   when there is no ground whatsoever for supposing it is true.
>   -- Bertrand Russell

Good information!

And, somehow a magic happened today. :)

When I came back from work, it suddenly works! I don't know why it
works, but "defaults write $HOME/.MacOSX/environment PATH "$PATH""
make it work.

Hmm...

Anyway, Thanks!

Daniel


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-05  8:10 MAC OSX Emacs does not find PATH Daniel (Youngwhan)
  2010-04-05 13:21 ` Harald Hanche-Olsen
@ 2010-04-06  8:17 ` Stefan Kamphausen
  2010-04-06 14:32   ` Daniel (Youngwhan)
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Kamphausen @ 2010-04-06  8:17 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,


"Daniel (Youngwhan)" <breadncup@gmail.com> writes:

> Hello,
>
> I am using GNU Emacs 23.1.95.1 (x86_64-apple-darwin, NS apple-
> appkit-1038.29) of 2010-04-03 on black.local in MAC OSX (intel)
>
> And, I found that it does not recognize added PATH in bash/
> environment.plist at all.
>

[...]

> When I launch it through terminal, it works as expected.

I am by no means an OSX expert, just unhappily stuck with that machine
for two years...

AFAIK the PATH together with the rest of your environment depends on how
you start things..

* From a terminal using some shell-script which opens Emacs.app:
  This will inherit the PATH from you shell environment, just as in
  Linux, so ~/.bashrc /etc/profile etc all should work.

* From the Dock using some Icon:
  This becomes a child process of the window server and has no knowledge
  of your shell environment.  It should read the environment plist you
  mentioned already, though.  Unfortunately there is no (easy) way to
  keep PATH in ~/.bashrc and in env-plist in sync, you'll have to take
  care of that yourself

* From spotlight, i.e. Apple-Space, search for Emacs, start the App:
  This is a direct child of the init-process, called launchd on OSX.
  Well, this one reads neither /etc/profile nor env-plist, it is
  controlled by some other conf-file in /etc, which I forgot.  Since
  fiddling with that could lead to an unbootable system (as far as I can
  tell, that is) I stopped at that point, when I had problems with PATH,
  and just chose not to start Emacs (or Netbeans or whatever) using
  spotlight.


Ridiculous if you ask me, but then, I'm already through one year and for
me there's only one more left ;-)


Cheers,
Stefan
-- 
a blessed +42 regexp of confusion (weapon in hand)
You hit. The format string crumbles and turns to dust.
user=> (clojure-buch (Locale/GERMANY))
#<URL http://www.clojure-buch.de>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: MAC OSX Emacs does not find PATH
  2010-04-06  8:17 ` Stefan Kamphausen
@ 2010-04-06 14:32   ` Daniel (Youngwhan)
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel (Youngwhan) @ 2010-04-06 14:32 UTC (permalink / raw)
  To: help-gnu-emacs

On Apr 6, 1:17 am, Stefan Kamphausen <ska...@gmx.net> wrote:
> Hi,
>
> "Daniel (Youngwhan)" <breadn...@gmail.com> writes:
> > Hello,
>
> > I am using GNU Emacs 23.1.95.1 (x86_64-apple-darwin, NS apple-
> > appkit-1038.29) of 2010-04-03 on black.local in MAC OSX (intel)
>
> > And, I found that it does not recognize added PATH in bash/
> > environment.plist at all.
>
> [...]
>
> > When I launch it through terminal, it works as expected.
>
> I am by no means an OSX expert, just unhappily stuck with that machine
> for two years...
>
> AFAIK the PATH together with the rest of your environment depends on how
> you start things..
>
> * From a terminal using some shell-script which opens Emacs.app:
>   This will inherit the PATH from you shell environment, just as in
>   Linux, so ~/.bashrc /etc/profile etc all should work.
>
> * From the Dock using some Icon:
>   This becomes a child process of the window server and has no knowledge
>   of your shell environment.  It should read the environment plist you
>   mentioned already, though.  Unfortunately there is no (easy) way to
>   keep PATH in ~/.bashrc and in env-plist in sync, you'll have to take
>   care of that yourself
>
> * From spotlight, i.e. Apple-Space, search for Emacs, start the App:
>   This is a direct child of the init-process, called launchd on OSX.
>   Well, this one reads neither /etc/profile nor env-plist, it is
>   controlled by some other conf-file in /etc, which I forgot.  Since
>   fiddling with that could lead to an unbootable system (as far as I can
>   tell, that is) I stopped at that point, when I had problems with PATH,
>   and just chose not to start Emacs (or Netbeans or whatever) using
>   spotlight.
>
> Ridiculous if you ask me, but then, I'm already through one year and for
> me there's only one more left ;-)
>
> Cheers,
> Stefan
> --
> a blessed +42 regexp of confusion (weapon in hand)
> You hit. The format string crumbles and turns to dust.
> user=> (clojure-buch (Locale/GERMANY))
> #<URLhttp://www.clojure-buch.de>

Great info, Stefan. Thank you,

Actually, it has been two day's experience for mac for me. Just bought
it and started to use mac for my life for the first time. :) However,
I am familiar with linux, so it is very convenient to use it, and I
like it.

Thank you!

Daniel.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-04-06 14:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05  8:10 MAC OSX Emacs does not find PATH Daniel (Youngwhan)
2010-04-05 13:21 ` Harald Hanche-Olsen
2010-04-05 14:47   ` Daniel (Youngwhan)
2010-04-05 22:16     ` Harald Hanche-Olsen
2010-04-05 22:21     ` Harald Hanche-Olsen
2010-04-06  2:47       ` queries0
2010-04-06  3:53       ` Daniel (Youngwhan)
2010-04-06  8:17 ` Stefan Kamphausen
2010-04-06 14:32   ` Daniel (Youngwhan)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).