[ESS] how to override site install of ESS?
ross at biostat.ucsf.edu
Tue Apr 9 20:32:01 CEST 2013
On Tue, 2013-04-09 at 13:09 -0500, Sebastian P.Luque wrote:
> On Tue, 9 Apr 2013 10:18:38 -0700,
> Ross Boylan <ross at biostat.ucsf.edu> wrote:
> > I have a sort of work around. This is on Debian squeeze. .emacs has
> > ;use with --no-site ; must load new ess first to prevent system-wide
> > one from loading (load "~/ess-12.09-2/lisp/ess-site") ; next line gets
> > the standard system setup (load
> > "/usr/share/emacs/site-lisp/debian-startup")
> > .bashrc has # If running interactively, then: if [ "$PS1" ]; then
> > export EDITOR=emacs alias emacs='emacs --no-site'
> > I think debian-startup is the usual first step for site startup, at
> > least in the absence of actual code in the /etc/emacs/site-start.el.
> > The one problem I've run into is that when emacs is invoked by some
> > other process, e.g., svn commit, it still does site startup first and
> > produces a bunch of error messages. Also, later commands in .emacs
> > are never executed.
> > Is export EDITOR=emacs --no-site legal (maybe in quotes)? That might
> > fix it.
> > I also tried (unload-feature 'ess-site t) but that didn't quite work;
> > ess-version remained the old one. Various other libraries depend on
> > ess-site (e.g., 50ess.el), but I don't think they are features and I
> > couldn't figure out how to unload them.
> > Yes, I'll ask the sysadmin again. I thought it would be easy to
> > install a personal copy of ess. As you all already knew, it's not.
> Also in Debian, I think I worked around this in the past (long ago
> though, when I had the ess package installed but wanted to load a local
> development version):
> (setq load-path
> (delete "/usr/share/emacs23/site-lisp/ess/" load-path)
> ess-etc-directory "~/.emacs.d/site-lisp/ess/etc"
> ess-lisp-directory "~/.emacs.d/site-lisp/ess/lisp")
> (require 'ess-site "~/.emacs.d/site-lisp/ess/lisp/ess-site")
> IOW, remove the site-wide ess paths from `load-path' and set the
> critical ess variables before loading the local ess-site.el. Not sure
> if it would still work (haven't tested it in a long time).
I think there are couple problems with that strategy in the current
debian. First, the site-wide startup script happens before the
personal .emacs file is read and so there is no effective way to
override it without either starting emacs with --no-site or fiddling
with the system level configuration files.
Second, the site-wide startup processes files, including 50ess.el, that
set the load path dynamically. If one tries to intervene before I
believe the path will not be there, and intervention after is too late.
Since 50ess.el is in a common directory with the other startup files,
one can't simply skip the directory.
This might be fixable as a Debian packaging issue. First, if ess
wrapped all its files as a feature, it might be possible to unload them
(it might be possible now and I just don't know how). Second, it seems
to me emacs, as packaged, should make it easier to modify what happens
at startup or to substitute local versions of packages.
More information about the ESS-help