emacs-devel
[Top][All Lists]
Advanced

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

Re: carbon emacs on OS X 10.3 (Panther): how to fix environment?


From: Benjamin Riefenstahl
Subject: Re: carbon emacs on OS X 10.3 (Panther): how to fix environment?
Date: Tue, 13 Jan 2004 12:16:52 +0100
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3.50 (gnu/linux)

Hi John,


John Wiegley <address@hidden> writes:
> (when (file-readable-p "~/.MacOSX/environment.plist")
>   (with-temp-buffer
>     (insert-file-contents "~/.MacOSX/environment.plist")
>     (let* ((dict (cdr (assoc "dict" (read-xml)))))
>       (while dict
>       (when (string= "key" (caar dict))
>         (setenv (car (cdr (car dict)))
>                 (car (cdr (cadr dict))))
>         (message "Setting %s=%s" (car (cdr (car dict)))
>                  (car (cdr (cadr dict)))))
>       (setq dict (cddr dict)))))
>
>   (setq exec-path nil)
>   (dolist (path (nreverse (split-string (getenv "PATH") ":")))
>     (add-to-list 'exec-path path)))

??

Why do you need this?  My understanding is that
~/.MacOSX/environment.plist is read by the Finder and that the
variables are inherited automatically by Emacs.

The code should only have an effect, if you log in through SSH, where
the Finder isn't in the loop.  But for that situation you can set the
variables in ~/.cshrc or ~/.bashrc or somewhere similar.

What am I missing?


benny





reply via email to

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