[ESS] Upgraded to El Capitan (OS X 10.11) and ESS Cannot Find R

Marc Schwartz marc_schwartz at me.com
Thu Oct 1 23:57:02 CEST 2015


Hi all,

Apologies for the delay in my follow up, I got pulled into a meeting.

The addition of exec-path-from-shell to my .emacs has resolved the problem.

Vincent, what are the modifications in your distribution to the above?

Stephen, to your first reply, using 'open -a Emacs' worked to run Emacs.app from within the OS X Terminal.

R did run in that setting, much as it did when I ran a shell in Emacs and started R from there. 

So there was some nuance in how Emacs was picking up the $PATH. This new addition of exec-path-from-shell will hopefully be more robust moving forward.

Unlike Vincent's experience, reinstalling R did not seem to reset things, despite doing a clean re-install. So some difference there.

Thanks to both of your for your rapid assist on this.

Regards,

Marc


> On Oct 1, 2015, at 4:07 PM, Vincent Goulet <vincent.goulet at me.com> wrote:
> 
> Hi Stephen,
> 
> Great minds think alike! ;-)
> 
> ;;; import-env-from-shell.el --- Make Emacs use the environment set up by the user's shell
> 
> ;; Copyright (C) 2013-2014 Vincent Goulet
> 
> ;; Author: Vincent Goulet
> 
> ;; This file is a modified version of exec-path-from-shell.el by
> ;; Steve Purcell <steve at sanityinc.com>
> ;; URL: https://github.com/purcell/exec-path-from-shell
> 
> 
>> Le 1 oct. 2015 à 16:41, Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk> a écrit :
>> 
>> hi Vincent/Marc,
>> 
>> Is it worth adding this to the Emacs.app that Vincent kindly bundles?
>> 
>> https://github.com/purcell/exec-path-from-shell
>> 
>> (apologies if you already have this).
>> 
>> Stephen
>> 
>> On Thu, Oct 01 2015, Vincent Goulet wrote:
>> 
>>>> Le 1 oct. 2015 à 15:54, Marc Schwartz <marc_schwartz at me.com> a écrit :
>>>> 
>>>> Hi all,
>>>> 
>>>> Using ess-15.09 with Emacs 24.5, which worked fine on OS X Yosemite until yesterday.
>>>> 
>>>> I know that this has been reported on prior versions of OS X and have attempted the proposed solutions, but I am at a loss to figure this one out at the moment.
>>>> 
>>>> I upgraded to the new El Capitan yesterday and now ESS cannot find R. I get the familiar:
>>>> 
>>>> no such file or directory, R
>>>> 
>>>> when using M-x R.
>>> 
>>> Same here.
>>> 
>>>> I did a re-install of R as well, along with XQuartz.
>>> 
>>> Reinstalling R 3.2.2 fixed the issue for me. I guess this reinstated the symlink in /usr/local/bin.
>>> 
>>>> R.app (the standard OS X GUI) finds R without issue and I can run R from the OS X shell (Terminal). 
>>>> 
>>>> When I use:
>>>> 
>>>> M-x shell
>>>> 
>>>> in Emacs, I can then run R without issue within the shell. So the $PATH seems to be picked up correctly in those settings to /usr/local/bin/R.
>>>> 
>>>> I do have the location added to $PATH in my ~/.bash_profile and I have a line in my .emacs:
>>>> 
>>>> (setenv "PATH" "/usr/texbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin")
>>>> 
>>>> so the path is set there as as well, so that Emacs will pick up $PATH when run from the dock, which I know has been an issue.
>>> 
>>> Did you check the Emacs variable exec-path? I think this one is the key. My distribution has a patch to correctly import the shell environment at Emacs startup. For example, I have:
>>> 
>>> exec-path is a variable defined in `C source code'.
>>> Its value is
>>> ("/opt/local/bin/" "/opt/local/sbin/" "~/bin/" "/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/opt/X11/bin/" "/Library/TeX/texbin/" "/Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9/" "/Applications/Emacs.app/Contents/MacOS/libexec-x86_64-10_9/" "/Applications/Emacs.app/Contents/MacOS/libexec/")
>>> 
>>> Hope this helps!
>>> 
>>> v.
>>> 
>>>> Anyone else upgrade yet and/or have recommendations based upon fresh eyes?
>>>> 
>>>> Thanks!
>>>> 
>>>> Marc Schwartz



More information about the ESS-help mailing list