* Changing the PATH from emacs?
@ 2008-02-11 16:28 Stefan Arentz
2008-02-11 17:25 ` Peter Dyballa
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Stefan Arentz @ 2008-02-11 16:28 UTC (permalink / raw)
To: help-gnu-emacs
I'm using Emacs.app, the Carbon emacs for OS X. Works great, but it
can't find ispell, which was installed in /opt/local/bin, a path that
is not by default in the system PATH.
There doesn't seem to be a way to do this through Emacs.app/Info.plist
so my question is whether it possible to change the PATH from my
.emacs profile?
S.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
2008-02-11 16:28 Changing the PATH from emacs? Stefan Arentz
@ 2008-02-11 17:25 ` Peter Dyballa
[not found] ` <mailman.7293.1202750758.18990.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2008-02-11 17:25 UTC (permalink / raw)
To: Stefan Arentz; +Cc: help-gnu-emacs
Am 11.02.2008 um 17:28 schrieb Stefan Arentz:
> There doesn't seem to be a way to do this through Emacs.app/Info.plist
> so my question is whether it possible to change the PATH from my
> .emacs profile?
(setenv "PATH" (concat "/opt/local/bin" ":" (getenv "PATH")))
You could also work according to this: http://developer.apple.com/qa/
qa2001/qa1067.html
--
Greetings
Pete
When people run around and around in circles we say they are crazy.
When planets do it we say they are orbiting.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
[not found] ` <mailman.7293.1202750758.18990.help-gnu-emacs@gnu.org>
@ 2008-02-11 17:38 ` Stefan Arentz
2008-02-11 17:42 ` Sven Joachim
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Arentz @ 2008-02-11 17:38 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 11.02.2008 um 17:28 schrieb Stefan Arentz:
>
>> There doesn't seem to be a way to do this through Emacs.app/Info.plist
>> so my question is whether it possible to change the PATH from my
>> .emacs profile?
>
> (setenv "PATH" (concat "/opt/local/bin" ":" (getenv "PATH")))
>
> You could also work according to this: http://developer.apple.com/qa/
> qa2001/qa1067.html
Thanks! Works perfect! (The elisp snippet)
S.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
[not found] ` <mailman.7293.1202750758.18990.help-gnu-emacs@gnu.org>
2008-02-11 17:38 ` Stefan Arentz
@ 2008-02-11 17:42 ` Sven Joachim
2008-02-11 17:52 ` Stefan Arentz
1 sibling, 1 reply; 8+ messages in thread
From: Sven Joachim @ 2008-02-11 17:42 UTC (permalink / raw)
To: help-gnu-emacs
On 2008-02-11 18:25 +0100, Peter Dyballa wrote:
> Am 11.02.2008 um 17:28 schrieb Stefan Arentz:
>
>> There doesn't seem to be a way to do this through Emacs.app/Info.plist
>> so my question is whether it possible to change the PATH from my
>> .emacs profile?
>
> (setenv "PATH" (concat "/opt/local/bin" ":" (getenv "PATH")))
Are you sure that this will work? AFAIK `setenv' only modifies the
environment of subprocesses; where Emacs searches for programs is
determined by the lisp variable `exec-path'.
Sven
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
2008-02-11 16:28 Changing the PATH from emacs? Stefan Arentz
2008-02-11 17:25 ` Peter Dyballa
[not found] ` <mailman.7293.1202750758.18990.help-gnu-emacs@gnu.org>
@ 2008-02-11 17:45 ` Sven Joachim
2008-02-13 17:16 ` Stefan Monnier
3 siblings, 0 replies; 8+ messages in thread
From: Sven Joachim @ 2008-02-11 17:45 UTC (permalink / raw)
To: help-gnu-emacs
On 2008-02-11 17:28 +0100, Stefan Arentz wrote:
> I'm using Emacs.app, the Carbon emacs for OS X. Works great, but it
> can't find ispell, which was installed in /opt/local/bin, a path that
> is not by default in the system PATH.
>
> There doesn't seem to be a way to do this through Emacs.app/Info.plist
> so my question is whether it possible to change the PATH from my
> .emacs profile?
I think you should not change PATH, but rather the `exec-path' Lisp
variable. Quoting the Emacs Lisp reference manual:
,----
| -- User Option: exec-path
| The value of this variable is a list of directories to search for
| programs to run in subprocesses. Each element is either the name
| of a directory (i.e., a string), or `nil', which stands for the
| default directory (which is the value of `default-directory').
|
| The value of `exec-path' is used by `call-process' and
| `start-process' when the PROGRAM argument is not an absolute file
| name.
`----
You can use add-to-list to add elements there, e.g.
(add-to-list 'exec-path "/opt/local/bin" t)
to let Emacs search for programs in /opt/local/bin.
Sven
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
2008-02-11 17:42 ` Sven Joachim
@ 2008-02-11 17:52 ` Stefan Arentz
2008-02-11 17:59 ` Sven Joachim
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Arentz @ 2008-02-11 17:52 UTC (permalink / raw)
To: help-gnu-emacs
Sven Joachim <svenjoac@gmx.de> writes:
> On 2008-02-11 18:25 +0100, Peter Dyballa wrote:
>
>> Am 11.02.2008 um 17:28 schrieb Stefan Arentz:
>>
>>> There doesn't seem to be a way to do this through Emacs.app/Info.plist
>>> so my question is whether it possible to change the PATH from my
>>> .emacs profile?
>>
>> (setenv "PATH" (concat "/opt/local/bin" ":" (getenv "PATH")))
>
> Are you sure that this will work? AFAIK `setenv' only modifies the
> environment of subprocesses; where Emacs searches for programs is
> determined by the lisp variable `exec-path'.
Indeed. It did not work, I tested it the wrong way and was confused.
Your exec-path hint did the trick though!
S.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
2008-02-11 17:52 ` Stefan Arentz
@ 2008-02-11 17:59 ` Sven Joachim
0 siblings, 0 replies; 8+ messages in thread
From: Sven Joachim @ 2008-02-11 17:59 UTC (permalink / raw)
To: help-gnu-emacs
On 2008-02-11 18:52 +0100, Stefan Arentz wrote:
> Sven Joachim <svenjoac@gmx.de> writes:
>
>> On 2008-02-11 18:25 +0100, Peter Dyballa wrote:
>>
>>> Am 11.02.2008 um 17:28 schrieb Stefan Arentz:
>>>
>>>> There doesn't seem to be a way to do this through Emacs.app/Info.plist
>>>> so my question is whether it possible to change the PATH from my
>>>> .emacs profile?
>>>
>>> (setenv "PATH" (concat "/opt/local/bin" ":" (getenv "PATH")))
>>
>> Are you sure that this will work? AFAIK `setenv' only modifies the
>> environment of subprocesses; where Emacs searches for programs is
>> determined by the lisp variable `exec-path'.
>
> Indeed. It did not work, I tested it the wrong way and was confused.
>
> Your exec-path hint did the trick though!
It might be best to set up both. When Emacs executes a program directly
(such as in call-process or start-process), you need to modify
exec-path, but when it uses a shell (as in shell-command), it is the
PATH environment variable that is relevant.
Cheers,
Sven
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Changing the PATH from emacs?
2008-02-11 16:28 Changing the PATH from emacs? Stefan Arentz
` (2 preceding siblings ...)
2008-02-11 17:45 ` Sven Joachim
@ 2008-02-13 17:16 ` Stefan Monnier
3 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2008-02-13 17:16 UTC (permalink / raw)
To: help-gnu-emacs
> I'm using Emacs.app, the Carbon emacs for OS X. Works great, but it
> can't find ispell, which was installed in /opt/local/bin, a path that
> is not by default in the system PATH.
> There doesn't seem to be a way to do this through Emacs.app/Info.plist
> so my question is whether it possible to change the PATH from my
> .emacs profile?
Your problem has nothing to do with Emacs and shouldn't be fixed in an
Emacs-specific way. You should set your PATH variable properly for
*all* applications. E.g. via the .macosx/environment.plist file (or
whatever its name is).
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-02-13 17:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 16:28 Changing the PATH from emacs? Stefan Arentz
2008-02-11 17:25 ` Peter Dyballa
[not found] ` <mailman.7293.1202750758.18990.help-gnu-emacs@gnu.org>
2008-02-11 17:38 ` Stefan Arentz
2008-02-11 17:42 ` Sven Joachim
2008-02-11 17:52 ` Stefan Arentz
2008-02-11 17:59 ` Sven Joachim
2008-02-11 17:45 ` Sven Joachim
2008-02-13 17:16 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).