all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1555: OSX Emacs.app not containing enough paths (emacs lisp fix included)
@ 2008-12-12 21:12 ` Francesco Lazzarino
  2008-12-13 19:42   ` David Reitter
  2009-01-19 19:00   ` bug#1555: marked as done (OSX Emacs.app not containing enough paths (emacs lisp fix included)) Emacs bug Tracking System
  0 siblings, 2 replies; 3+ messages in thread
From: Francesco Lazzarino @ 2008-12-12 21:12 UTC (permalink / raw
  To: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3331 bytes --]

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

* bug#1555: OSX Emacs.app not containing enough paths (emacs lisp fix included)
  2008-12-12 21:12 ` bug#1555: OSX Emacs.app not containing enough paths (emacs lisp fix included) Francesco Lazzarino
@ 2008-12-13 19:42   ` David Reitter
  2009-01-19 19:00   ` bug#1555: marked as done (OSX Emacs.app not containing enough paths (emacs lisp fix included)) Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: David Reitter @ 2008-12-13 19:42 UTC (permalink / raw
  To: Francesco Lazzarino, 1555; +Cc: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

On 12 Dec 2008, at 16:12, Francesco Lazzarino wrote:
>
> 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.


Applications are not run from a login shell, so they don't inherit the  
same paths.  This is an old problem.
Your method of addressing this won't work with pre-10.5 versions of  
the OS.

The correct way is, IMHO, either leave it to the system to set the  
correct environment variables for the applications, or, as a  
convenience for users, start a login shell, print the environment and  
import it.  (I've been doing that in Aquamacs for a long time; the  
code is there if people want it.) 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

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

* bug#1555: marked as done (OSX Emacs.app not containing enough  paths (emacs lisp fix included))
  2008-12-12 21:12 ` bug#1555: OSX Emacs.app not containing enough paths (emacs lisp fix included) Francesco Lazzarino
  2008-12-13 19:42   ` David Reitter
@ 2009-01-19 19:00   ` Emacs bug Tracking System
  1 sibling, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2009-01-19 19:00 UTC (permalink / raw
  To: Adrian Robert

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]


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 included)
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.)


-- 
1555: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1555
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 8343 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 1513 bytes --]

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

[-- Attachment #2.1.2: Type: text/html, Size: 3331 bytes --]

[-- Attachment #3: Type: message/rfc822, Size: 2700 bytes --]

From: Adrian Robert <adrian.b.robert@gmail.com>
To: 1555-done@emacsbugs.donarmstrong.com
Cc: "Francesco Lazzarino" <flazzarino@gmail.com>
Subject: Re: OSX Emacs.app not containing enough paths (emacs lisp fix included)
Date: Mon, 19 Jan 2009 20:49:39 +0200
Message-ID: <2C9FF472-FCE0-4CCA-B84C-2505BC87F037@gmail.com>

Hi,

Please see the section about "Grabbing environment variables" in the  
Emacs.app (Mac / GNUstep) section of the info manual.

(Closing bug.)



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

end of thread, other threads:[~2009-01-19 19:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2C9FF472-FCE0-4CCA-B84C-2505BC87F037@gmail.com>
2008-12-12 21:12 ` bug#1555: OSX Emacs.app not containing enough paths (emacs lisp fix included) Francesco Lazzarino
2008-12-13 19:42   ` David Reitter
2009-01-19 19:00   ` bug#1555: marked as done (OSX Emacs.app not containing enough paths (emacs lisp fix included)) Emacs bug Tracking System

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.