[ESS] Customisation of ess-r-versions or ess-r-versions-list

Stephen Eglen S.J.Eglen at damtp.cam.ac.uk
Tue Aug 16 12:37:29 CEST 2011


John Maindonald <john.maindonald at anu.edu.au> wrote:

> With the release of 5.14, I have moved from Carbon Emacs to
> Vincent Goulet's bundle for MacOS.  Everything is working, 
> except that placing the following in my .emacs [prior to 
> (require 'ess-site)
> ]
> now has no effect:
> 
> (setq ess-r-versions-list
>           '( ("R64" "/usr/bin/R64")
>              ("R32" "/usr/bin/R32")))
> 
> Nor does (setq ess-r-versions '("R-2" "R32" "R64"))
> or the equivalent with defvar.
> 
> Are such a customisation been for the time being disabled;
> I did see a comment somewhere that suggested this?

No, I think the issue is with the init files.  I'm cc'ing Vincent in.
Here is the relevant part of the info documentation for Emacs:

----------------------------------------------------------------------
   There can also be a "default init file", which is the library named
`default.el', found via the standard search path for libraries.  The
Emacs distribution contains no such library; your site may create one
for local customizations.  If this library exists, it is loaded
whenever you start Emacs (except when you specify `-q').  But your init
file, if any, is loaded first; if it sets `inhibit-default-init'
non-`nil', then `default' is not loaded.

   Your site may also have a "site startup file"; this is named
`site-start.el', if it exists.  Like `default.el', Emacs finds this
file via the standard search path for Lisp libraries.  Emacs loads this
library before it loads your init file.  To inhibit loading of this
library, use the option `--no-site-file'.  *Note Initial Options::.  We
recommend against using `site-start.el' for changes that some users may
not like.  It is better to put them in `default.el', so that users can
more easily override them.
----------------------------------------------------------------------

The problem you have found is that ESS is loaded by site-start.el,
before your .emacs file is read.  The ESS code that searches for other
versions of R is run only once, when ESS is loaded.  Hence your changes
come too late.

If you are feeling brave, just edit Vincent's site.start.el and put your
setq commands before ESS is loaded, and restart Emacs.  You can find
site-start.el by doing M-x locate-library RET site-start.el 
Does that then work for you?

As hinted above, in the info, it might be better to use default.el,
which is loaded after the user's .emacs files.  What do you think
Vincent?

Stephen



More information about the ESS-help mailing list