From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Josh Newsgroups: gmane.emacs.devel Subject: Re: About PATH environment variable on OSX Date: Fri, 12 Apr 2013 21:59:56 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1365829228 23264 80.91.229.3 (13 Apr 2013 05:00:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2013 05:00:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Darren Hoo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 13 07:00:32 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQsZj-0005nz-QK for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2013 07:00:31 +0200 Original-Received: from localhost ([::1]:51906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQsZj-0003g0-EO for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2013 01:00:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQsZh-0003fs-5b for emacs-devel@gnu.org; Sat, 13 Apr 2013 01:00:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQsZg-0004Xg-12 for emacs-devel@gnu.org; Sat, 13 Apr 2013 01:00:29 -0400 Original-Received: from mail-qe0-f43.google.com ([209.85.128.43]:45829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQsZf-0004XV-Tr for emacs-devel@gnu.org; Sat, 13 Apr 2013 01:00:27 -0400 Original-Received: by mail-qe0-f43.google.com with SMTP id f6so1889835qej.2 for ; Fri, 12 Apr 2013 22:00:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=JFW5wbY4Uw9wxuKK1I31rWuCKnFdAbvWdykJ/JEU5QI=; b=mMyLcGJ7bcGrTp/ueBQD5NlRfGQbU4Ntgj7DpiMK8T8NzLyu5RqBFBZV21uAYHmtQ9 JhVFAHdBAR1oTUqWBOjRwJkZviZbncyI7tvyMQArjAgcJybY555Y7ZyG7HcNsZggBcfZ /+KD5BrufQFyQhVwPCN26z/wkcjR0GJSccgcWLOMQTumW7qeGGeCX4H53RrFV7NLq5tV aOevE5e4FGrzDOEne+ygDxb9yjkXjH6VUKX4FqDK7vlEBrCOZxxxQCCcTmD1VsdWwbIo 9RjM1xvLDM6Ymo+7Uzy1ijTCSts7n0n57tTPxCjxog4ycoEyHr1LPF2qUMHSZurLlZcv wVOQ== X-Received: by 10.224.149.193 with SMTP id u1mr14510374qav.97.1365829226826; Fri, 12 Apr 2013 22:00:26 -0700 (PDT) Original-Received: by 10.49.42.65 with HTTP; Fri, 12 Apr 2013 21:59:56 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 5KnFp4dsCHB9gk5fUYnu5SLTEbo X-Gm-Message-State: ALoCoQkAsqk9aM7O2NvP+LwGCp2x1zJsAex8+VKxt3JqIplMHUwp3idzCmP2IqWGbOtHIWRektSZ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.128.43 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158874 Archived-At: Others have made good suggestions already, but I prefer the approach shown at http://paste.lisp.org/display/132476 because with a few elisp functions I can manage my environment variables in my shell profile as usual with no need to bother with silly OSXisms. On Sun, Apr 7, 2013 at 11:19 AM, Darren Hoo wrote: > > In the Emacs info manual F.1.1 Grabbing environment variables > it says and I quote: > > For the PATH and MANPATH variables, a system-wide method of setting > PATH is recommended on Mac OS X 10.5 and later, using the `/etc/paths' > files and the `/etc/paths.d' directory. > > It doesn't work for me. This is my /etc/paths file: > > $ cat /etc/paths > /usr/bin > /bin > /usr/sbin > /sbin > /usr/local/bin > > but (getenv "PATH") gives "/usr/bin:/bin:/usr/sbin:/sbin" > and I haven't used any (setenv "PATH" ...) in my init file. > > I can confirm that PATH settings in the /etc/paths and /etc/paths.d are > never picked up by the programs launched from the Finder by writing a > simple Cocoa App. > > I can not find any NS-specific code that read the /etc/paths file > either. > > So I think the paragraph I quoted above in the manual is incorrect and > should be removed. > >