all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Changing the Environment (such as PATH)
@ 2010-02-25 23:38 Rob Emanuele
  2010-02-26  0:19 ` Óscar Fuentes
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Emanuele @ 2010-02-25 23:38 UTC (permalink / raw)
  To: help-gnu-emacs

Greetings,

I'm using Emacs for osx (the carbon version) and I need a way to alter
the path in which emacs searches for programs.  I need to alter this
path after emacs has started.  For example, I need to run a particular
version of arm-eabi-gdb or scons.  These executables are not in the
usual places as they are custom per project.  I would like to be able
to alter my path after emacs has started so that I can use 'M-x gdb'
and just type arm-eabi-gdb to invoke it.  Is this possible?

Thanks,

Rob




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

* Re: Changing the Environment (such as PATH)
       [not found] <mailman.1893.1267141094.14305.help-gnu-emacs@gnu.org>
@ 2010-02-26  0:08 ` Pascal J. Bourguignon
  2010-02-26  1:14   ` Rob Emanuele
  2010-02-26  9:46   ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Pascal J. Bourguignon @ 2010-02-26  0:08 UTC (permalink / raw)
  To: help-gnu-emacs

Rob Emanuele <rje@crystalfontz.com> writes:

> Greetings,
>
> I'm using Emacs for osx (the carbon version) and I need a way to alter
> the path in which emacs searches for programs.  I need to alter this
> path after emacs has started.  For example, I need to run a particular
> version of arm-eabi-gdb or scons.  These executables are not in the
> usual places as they are custom per project.  I would like to be able
> to alter my path after emacs has started so that I can use 'M-x gdb'
> and just type arm-eabi-gdb to invoke it.  Is this possible?

exec-path is the variable used by emacs (initialized from (getenv "PATH")).


Otherwise, you can modify the environment variable PATH for the
subprocesses from emacs with:

(require 'cl)
(setf (getenv "PATH") "....")

-- 
__Pascal Bourguignon__


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

* Re: Changing the Environment (such as PATH)
  2010-02-25 23:38 Rob Emanuele
@ 2010-02-26  0:19 ` Óscar Fuentes
  0 siblings, 0 replies; 5+ messages in thread
From: Óscar Fuentes @ 2010-02-26  0:19 UTC (permalink / raw)
  To: help-gnu-emacs

Rob Emanuele <rje@crystalfontz.com> writes:

> I'm using Emacs for osx (the carbon version) and I need a way to alter
> the path in which emacs searches for programs.  I need to alter this
> path after emacs has started.  For example, I need to run a particular
> version of arm-eabi-gdb or scons.  These executables are not in the
> usual places as they are custom per project.  I would like to be able
> to alter my path after emacs has started so that I can use 'M-x gdb'
> and just type arm-eabi-gdb to invoke it.  Is this possible?

There is an interactive `setenv' command which asks for an environment
variable and its value, but in this case maybe you will find more
practical to do this:

* switch to the *Scratch* buffer.

* type:

(setenv "PATH" (concat "/your/path/goes/here:" (getenv "PATH")))

* don't forget the colon!

* with the cursor after the last closing parenthesis, type C-x C-e

Done. You now have /your/path/goes/here as the first entry of PATH.





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

* Re: Changing the Environment (such as PATH)
  2010-02-26  0:08 ` Changing the Environment (such as PATH) Pascal J. Bourguignon
@ 2010-02-26  1:14   ` Rob Emanuele
  2010-02-26  9:46   ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Emanuele @ 2010-02-26  1:14 UTC (permalink / raw)
  To: Pascal J. Bourguignon; +Cc: help-gnu-emacs

Thank you all.  Those were very helpful suggestions.


On Thu, Feb 25, 2010 at 4:08 PM, Pascal J. Bourguignon
<pjb@informatimago.com> wrote:
> Rob Emanuele <rje@crystalfontz.com> writes:
>
>> Greetings,
>>
>> I'm using Emacs for osx (the carbon version) and I need a way to alter
>> the path in which emacs searches for programs.  I need to alter this
>> path after emacs has started.  For example, I need to run a particular
>> version of arm-eabi-gdb or scons.  These executables are not in the
>> usual places as they are custom per project.  I would like to be able
>> to alter my path after emacs has started so that I can use 'M-x gdb'
>> and just type arm-eabi-gdb to invoke it.  Is this possible?
>
> exec-path is the variable used by emacs (initialized from (getenv "PATH")).
>
>
> Otherwise, you can modify the environment variable PATH for the
> subprocesses from emacs with:
>
> (require 'cl)
> (setf (getenv "PATH") "....")
>
> --
> __Pascal Bourguignon__
>




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

* Re: Changing the Environment (such as PATH)
  2010-02-26  0:08 ` Changing the Environment (such as PATH) Pascal J. Bourguignon
  2010-02-26  1:14   ` Rob Emanuele
@ 2010-02-26  9:46   ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2010-02-26  9:46 UTC (permalink / raw)
  To: help-gnu-emacs

> From: pjb@informatimago.com (Pascal J. Bourguignon)
> Date: Fri, 26 Feb 2010 01:08:46 +0100
> 
> Rob Emanuele <rje@crystalfontz.com> writes:
> 
> > Greetings,
> >
> > I'm using Emacs for osx (the carbon version) and I need a way to alter
> > the path in which emacs searches for programs.  I need to alter this
> > path after emacs has started.  For example, I need to run a particular
> > version of arm-eabi-gdb or scons.  These executables are not in the
> > usual places as they are custom per project.  I would like to be able
> > to alter my path after emacs has started so that I can use 'M-x gdb'
> > and just type arm-eabi-gdb to invoke it.  Is this possible?
> 
> exec-path is the variable used by emacs (initialized from (getenv "PATH")).
> 
> 
> Otherwise, you can modify the environment variable PATH for the
> subprocesses from emacs with:
> 
> (require 'cl)
> (setf (getenv "PATH") "....")

For best results, I recommend modifying _both_ PATH and exec-path.




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

end of thread, other threads:[~2010-02-26  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1893.1267141094.14305.help-gnu-emacs@gnu.org>
2010-02-26  0:08 ` Changing the Environment (such as PATH) Pascal J. Bourguignon
2010-02-26  1:14   ` Rob Emanuele
2010-02-26  9:46   ` Eli Zaretskii
2010-02-25 23:38 Rob Emanuele
2010-02-26  0:19 ` Óscar Fuentes

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.