For PATH, in Emacs you can do something like

(setq exec-path (append exec-path '("~/Bin" "/usr/local/bin" "/usr/texbin"
"/sbin")))

(setenv "PATH" (concat (getenv "PATH")
       ":/usr/texbin:~/Bin:/usr/local/bin"))

Kasper



On Thu, Mar 27, 2014 at 5:35 PM, Vitalie Spinu <spinuvit@gmail.com> wrote:

>  >>> Ross Boylan on Thu, 27 Mar 2014 13:47:38 -0700 wrote:
>
>  > On 3/27/2014 1:22 PM, Vitalie Spinu wrote:
>  >> Yes, process-environment is one way tot go but it will affect all the
>  >> processes spanned by Emacs. If you want only for R then Sys.setenv from
>  >> .Rprofile should do what you want.
>  >>
>  >> Vitalie
>  > I have seen some comments that Sys.setenv may be too late to affect the
> library
>  > paths R uses (I mean paths in the LD_LIBRARY_PATH sense, not the R
> sense) and
>  > it's certainly too late for PATH to affect which R gets run.  Do I need
> PATH set
>  > when I launch emacs to affect ESS's choice of R binaries?
>
> Ah, ok. For that specific variably it is indeed late. Then you have to
> set it either in .emacs by adding to process-environment. I don't think
> there is other option if you want to affect only the processes started
> in emacs.
>
> You can affect only R process if you dynamically rebind
> process-environment variable while calling R. Something along the lines:
>
> (defun my-R ()
>   (interactive)
>   (let ((process-environment ....))
>      (R)))
>
>
>   Vitalie
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

