For some reason (which I can't understand, I did not change anything) emacs has become very slow - as in 2 min - at startup. I traced it down to the require
commands of ESS. This is what I have in the .init
file:
(setq load-path (cons "/usr/share/emacs/site-lisp/ess" load-path))
(require 'ess-site)
(require 'ess-smart-underscore)
(setq ess-default-style 'DEFAULT)
ess-smart-underscore
also loads ess-site
so eliminating the first require
does not change anything. From this question I tried to use eval-after-load
, but this does not work:
(eval-after-load 'ess-smart-underscore)
In general, I don't care to have ESS loading at startup. I'd be happy if it only loads when I open *.R or *.r files, but I'd like a reasonable startup time. I am running emacs 24.5.1 and ESS 16.04 on Linux. Downgrading to the previous versions of either did not make a difference.
I have now commented everything in .emacs
except for:
(setq load-path (cons "/usr/share/emacs/site-lisp/ess" load-path))
(require 'ess-site)
Then I have reinstalled emacs, ESS, R and updated all the R packages: no difference. I noticed, however, that the first time emacs is launched it is a little bit faster then the following times, which seems odd to me.
(eval-after-load 'ess-smart-underscore '(setq ess-default-style 'DEFAULT))
emacs -Q
? Maybe something else in your init is interfering. If that's not it, then maybe something is corrupt in your ESS installation, or even in your R installation. I would reinstall both of those if theemacs -Q
test doesn't turn up anything useful.(setq ess-default-style 'DEFAULT)
[...] in your~/.emacs
equivalent before loading ESS"