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

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

Re: Cocoa Emacs 23 and Tramp problem


From: Lars Wessman
Subject: Re: Cocoa Emacs 23 and Tramp problem
Date: Sat, 7 Mar 2009 10:36:22 +0000


On Mar 7, 2009, at 12:24 AM, Peter Dyballa wrote:


Am 07.03.2009 um 00:59 schrieb Lars Wessman:

I'll try this out tomorrow, and then maybe I'll look to see if this info is in the emacs wiki and, if not, add it in an appropriate place.


If you do so, you could also mention that with ~/.MacOSX/ environment.plist you have one "single point of failure:" you don't need to mess with PATH or path settings in different (login) shell RC files. Whenever you need a particular environment variable globally, you can put it there. Since the process environment does not automatically change when ~/.MacOSX/environment.plist is changed, and it could happen that you log in to your or some other Mac from remote, you can also use ~/.MacOSX/environment.plist as the single source for quite up-to-date environment settings in shell by using in ~/.bashrc or such:

        export PATH=$(defaults read "${HOME}/.MacOSX/environment" PATH)

or in ~/.(t)cshrc or such:

        set path=(`defaults read ~/.MacOSX/environment PATH | tr ':' ' '`)

I.e.: instead of editing half a dozen files every time you care for just a single one.

--
Greetings

 Pete

I love deadlines. I love the whooshing noise they make as they go by.
                                – Douglas Adams

I just checked this out. It seems that my ~/.macosx/environment.plist has been there with the PATH variable in it all the time. For some reason it is not being picked up. I tested this again by commenting out the code I got from Aquamacs, and the contents of the environment.plist file was not being loaded again. I seems that this is problem.

After some googling, I cross a little package ( http://edward.oconnor.cx/elisp/osx-plist.el ) for parsing plists that also happens to have the code for loading ~/.macosx/environment.plist as sample code. I just tested it and it works like a charm.

So there are two choices, the code I took from Aquamacs, or osx- plist.el. osx-plist.el is probably the preferred method, since .emacs loads twice as fast using osx-plist.el than it does when using the Aquamacs code. This is likely due to the fact that the process of lifting the data directly from the shell is a bit slow, as Dave Reitter says in the comments to the code.

Cheers

Lars



reply via email to

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