[ESS] can I make ess to recognise ~/.bashrc

Vitalie Spinu spinuvit at gmail.com
Thu Jul 11 14:08:39 CEST 2013

 >> Jannis <bt_jannis at yahoo.de>
 >> on Thu, 11 Jul 2013 13:49:32 +0200 wrote:

 > Thanks, Vitalie. I am now defining these environment variables pointing to
 > .RProfile within emacs. The last problem I have is that I need to define a
 > particular path to the R executable when using TRAMP to start R (M-x R) as there
 > are several versions of R installed.

 > Apparently this setting will set this:

 >      (setq inferior-R-program-name "c:/progra~1/R/R-2.15.1/bin/Rterm.exe")

 > Can i adjust this so that hitting M-x R on may local machine and doing so using
 > tramp beeing connected to a remote server will use different paths?

Not implemented on ESS side. So you have two options, other set
inferior-R-program-name to Rterm and add the containing directories to
PATH environment variable, or on emacs side (not tested):

   (defun my-set-R-program-name ()
    (set (make-local-variable 'inferior-R-program-name)
         (if (and buffer-file-name
                  (file-remote-p buffer-file-name))
   (add-hook 'R-mode-hook 'my-set-R-program-name)
This part of ESS could be much improved, but somebody has to be
interested enough to do that :)


More information about the ESS-help mailing list