From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#1555: marked as done (OSX Emacs.app not containing enough paths (emacs lisp fix included)) Date: Mon, 19 Jan 2009 19:00:03 +0000 Message-ID: References: <2C9FF472-FCE0-4CCA-B84C-2505BC87F037@gmail.com> <8574d28f0812121312q71d4c255wa849a4f0639d1925@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1232391603-18983-0" X-Trace: ger.gmane.org 1232393331 31951 80.91.229.12 (19 Jan 2009 19:28:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Jan 2009 19:28:51 +0000 (UTC) To: Adrian Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 19 20:30:04 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LOzbc-0001Ms-1A for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jan 2009 20:16:20 +0100 Original-Received: from localhost ([127.0.0.1]:42170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOzaK-00084H-GC for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jan 2009 14:14:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOzPR-0001aU-KK for bug-gnu-emacs@gnu.org; Mon, 19 Jan 2009 14:03:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOzPL-0001ZG-BN for bug-gnu-emacs@gnu.org; Mon, 19 Jan 2009 14:03:38 -0500 Original-Received: from [199.232.76.173] (port=41254 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOzPL-0001ZB-1P for bug-gnu-emacs@gnu.org; Mon, 19 Jan 2009 14:03:35 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48905) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LOzPK-0004fM-2h for bug-gnu-emacs@gnu.org; Mon, 19 Jan 2009 14:03:34 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0JJ3Rgi020180; Mon, 19 Jan 2009 11:03:27 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0JJ03Md019063; Mon, 19 Jan 2009 11:00:03 -0800 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 1555 X-Emacs-PR-Package: emacs,ns X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24286 Archived-At: This is a multi-part message in MIME format... ------------=_1232391603-18983-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Mon, 19 Jan 2009 20:49:39 +0200 with message-id <2C9FF472-FCE0-4CCA-B84C-2505BC87F037@gmail.com> and subject line Re: OSX Emacs.app not containing enough paths (emacs lisp = fix included) has caused the Emacs bug report #1555, regarding OSX Emacs.app not containing enough paths (emacs lisp fix include= d) to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 1555: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D1555 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1232391603-18983-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 65; hammy, 83; neutral, 61; spammy, 5. spammytokens:0.999-2--bare, 0.990-+--H*c:alternative, 0.987-1--kinda, 0.944-+--H*c:multipart, 0.863-+--UD:com hammytokens:0.000-+--emacs, 0.000-+--23.0.60, 0.000-+--23060, 0.000-+--UD:app, 0.000-+--emacsapp X-Spam-Status: No, score=-6.4 required=4.0 tests=BAYES_00,FOURLA,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Dec 2008 21:12:46 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBCLChBM009280 for ; Fri, 12 Dec 2008 13:12:44 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBFJS-0001cu-Sn for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 16:12:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBFJS-0001bo-5R for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 16:12:42 -0500 Received: from [199.232.76.173] (port=58891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBFJR-0001bd-TY for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 16:12:41 -0500 Received: from yx-out-1718.google.com ([74.125.44.157]:52036) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBFJR-00072I-CD for bug-gnu-emacs@gnu.org; Fri, 12 Dec 2008 16:12:41 -0500 Received: by yx-out-1718.google.com with SMTP id 34so773823yxf.66 for ; Fri, 12 Dec 2008 13:12:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=fjhnFl+qAAjhx29NqwiVZe9xMV6CmSycJw00PnDHu5Q=; b=viXK50vodyj+R9kUFE3vWJwwpUAGo15oyJT2oIs0+bvjYD+qZCw81WRMft43g+V6eF 7Xj7fXpgFCjY6zUBrS+MlbSFOl8QqlxPyDqInaOBUBggnRmT7to4UUffOT1nhxKi4jbr n+1ggbmG1z/RCnxx6hZtOFhAIl95D1vBsFgD0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=k83YQRoZRNYdkQ+v4hdOGVOsR/ecSOMzuZCZaXCGRzGNjv9bVV8sBteiLOXzcfjYM/ YzRwBv+Ur+Cp0uIFyhq54+BEymWm57TE/nzS5S36eZZ4gYSf4+5hhyU3OU8MRk+ELPnG gehBlj/w/joE5KgExg7WyUs8WKc9U3LmE/qEs= Received: by 10.142.141.21 with SMTP id o21mr1514547wfd.205.1229116360267; Fri, 12 Dec 2008 13:12:40 -0800 (PST) Received: by 10.142.178.3 with HTTP; Fri, 12 Dec 2008 13:12:40 -0800 (PST) Message-ID: <8574d28f0812121312q71d4c255wa849a4f0639d1925@mail.gmail.com> Date: Fri, 12 Dec 2008 16:12:40 -0500 From: "Francesco Lazzarino" To: bug-gnu-emacs@gnu.org Subject: OSX Emacs.app not containing enough paths (emacs lisp fix included) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_119255_9361416.1229116360255" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) ------=_Part_119255_9361416.1229116360255 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Emacs.app version 23.0.60 (9.0) (getenv "PATH") => bare minimum (/usr/bin:/bin:/usr/sbin:/sbin) exec-path => bare minimum but with /Applications/Emacs.app/Contents/MacOS/bin OSX seems to keep paths in /etc/paths and files in /etc/paths.d, programs launched from Terminal seem to pick this up but Emacs.app is not loaded from terminal so the path is kinda small. the problem was interacting with other programs via m-!, eshell, etc. this seems to fix it, not sure if it's the right way tho. (setenv "PATH" (let ((osx-path-files (append (mapcar (lambda (x) (concat "/etc/paths.d/" x)) (delete ".." (delete "." (directory-files "/etc/paths.d")))) '("/etc/paths"))) (read-path-file (lambda (file) (when (file-readable-p file) (delete "" (split-string (with-temp-buffer (insert-file-contents file) (buffer-substring (point-min) (point-max))) "\n")))))) (mapconcat 'identity (reverse (delete-dups (reverse (append (reduce 'append (mapcar read-path-file osx-path-files)) (split-string (getenv "PATH") ":"))))) ":"))) -- franco ------=_Part_119255_9361416.1229116360255 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Emacs.app version 23.0.60 (9.0)

(getenv "PATH") 
    => bare minimum (/usr/bin:/bin:/usr/sbin:/sbin)

exec-path 
    => bare minimum but with /Applications/Emacs.app/Contents/MacOS/bin

OSX seems to keep paths in /etc/paths and files in /etc/paths.d, programs launched from Terminal seem to pick this up but Emacs.app is not loaded from terminal so the path is kinda small. the problem was interacting with other programs via m-!, eshell, etc.

this seems to fix it, not sure if it's the right way tho.

(setenv "PATH"
        (let ((osx-path-files
               (append (mapcar (lambda (x) (concat "/etc/paths.d/" x))
                               (delete ".." (delete "." (directory-files "/etc/paths.d"))))
                       '("/etc/paths")))
              (read-path-file
               (lambda (file)
                 (when (file-readable-p file)
                   (delete ""
                           (split-string (with-temp-buffer (insert-file-contents file)
                                                           (buffer-substring (point-min) (point-max)))
                                         "\n"))))))
          (mapconcat 'identity
                     (reverse (delete-dups (reverse
                                            (append (reduce 'append
                                                            (mapcar read-path-file osx-path-files))
                                                    (split-string (getenv "PATH") ":")))))
                     ":")))



--
franco
------=_Part_119255_9361416.1229116360255-- ------------=_1232391603-18983-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1555-done) by emacsbugs.donarmstrong.com; 19 Jan 2009 18:54:00 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f11.google.com (mail-bw0-f11.google.com [209.85.218.11]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0JIrvv9017755 for <1555-done@emacsbugs.donarmstrong.com>; Mon, 19 Jan 2009 10:53:58 -0800 Received: by bwz4 with SMTP id 4so5186515bwz.1 for <1555-done@emacsbugs.donarmstrong.com>; Mon, 19 Jan 2009 10:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version:content-type :message-id:cc:content-transfer-encoding:from:subject:date:to :x-mailer; bh=a0F0zE84oXZGGCyMRebD/nlVS68UaO5NIS8s2ixwnI4=; b=lQ1TjbBGCUvHOiBujof6zcyibW6zEsoRL3nyEWf85uqc3eG1ySj3bhI/AwEMJFLBLq MmEb85/bhSIkujptP+cpwwSsosZ0WMVICfVtthgbfsnSlVHb6yGfFgtg3Oo79tUV+KVc +Je0yEWcmKoScSreCCetYQiGercbqbobPidV4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; b=F4CUV49G9QLgxmIcg8i+uJHZ/7WNoRCF4XbfUKJxOtjpAjN6IEi4gOMskB2B4mrssa FN4WK+x4HEiXE+5lp9p2ckGPC5Y8RmhYzbFgozqKdsyQn9ZPzePmHiyVToLJaVGthaWV A4beBFBJ2FjkCoXvTHbaA3wbFmCbY3CLLm1Gc= Received: by 10.223.105.195 with SMTP id u3mr1061210fao.13.1232391026373; Mon, 19 Jan 2009 10:50:26 -0800 (PST) Received: from ?192.168.1.101? (h018098.gprs.dnafinland.fi [87.93.18.98]) by mx.google.com with ESMTPS id f6sm15365219nfh.79.2009.01.19.10.50.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 19 Jan 2009 10:50:25 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2C9FF472-FCE0-4CCA-B84C-2505BC87F037@gmail.com> Cc: "Francesco Lazzarino" Content-Transfer-Encoding: 7bit From: Adrian Robert Subject: Re: OSX Emacs.app not containing enough paths (emacs lisp fix included) Date: Mon, 19 Jan 2009 20:49:39 +0200 To: 1555-done@emacsbugs.donarmstrong.com X-Mailer: Apple Mail (2.753.1) Hi, Please see the section about "Grabbing environment variables" in the Emacs.app (Mac / GNUstep) section of the info manual. (Closing bug.) ------------=_1232391603-18983-0--