[ESS] ESS unable to find R on Linux when emacs started by opening a .R file

Sparapani, Rodney r@p@r@p@ @end|ng |rom mcw@edu
Thu Jul 16 00:25:37 CEST 2015


> Hi Stephen,
> 
> Thanks for the speedy reply!
> 
> Before visiting a file:
> 
> ("/usr/lib64/qt-3.3/bin" "/usr/lib64/ccache" "/usr/local/bin"
> "/usr/local/sbin" "/usr/bin" "/usr/sbin" "/bin" "/sbin"
> "/home/gavin/.local/bin" "/home/gavin/bin"
> "/usr/libexec/emacs/24.5/x86_64-redhat-linux-gnu")
> 
> Which contains my ~/bin.
> 
> After visiting a .R file (without closing Emacs from above) M-x R works and
> the value of exec-path is the same as I report above.
> 
> If I locate the .R file I want to edit using the file manager (Files in
> Gnome 3) and open it from there with emacs, the exec-path contains just:
> 
> ("/usr/local/bin" "/usr/local/sbin" "/usr/bin" "/usr/sbin" "/bin" "/sbin"
> "/usr/libexec/emacs/24.5/x86_64-redhat-linux-gnu")
> 
> which is clearly missing my local paths.
> 
> I'm not aware of having fiddled with anything anywhere that might have lead
> to this state of affairs?
> 
> Thanks again,
> 
> Gavin
> 

Hi Gavin:

This is almost certainly not an ESS issue.  I say that because I think
I have a lucky guess (if not, then what do you want for nothing ;o)
From your description, it sounds like you are launching emacs in two
different ways (there are some details in your post that I might not
be understanding so bear with me).  I have seen problems where
launching emacs via the GUI (or other applications besides emacs) and
the upshot is that this environment does not inherit from your typical
shell session.  If this is problem, then this is a very well known
issue, but it is not ESS or even emacs related.  Unfortunately, fixing
it depends very much on the details of your local machine.  Sadly, Mac
users have had a variant of this issue for years and the fix depend on
the Mac OS version (why don't they fix this?).  Similarly, most UNIX
GUIs can suffer the same problem (maybe that is why?).  For Redhat
flavored distros, we usually can handle this by creating what is
typically called custom.sh so maybe googling that will help.

Rodney




More information about the ESS-help mailing list