[ESS] how to change the default ess-style?
Joshua N Pritikin
jpritikin at pobox.com
Wed Dec 13 16:53:00 CET 2017
I'm trying to persuade ess to use the RStudio- style by default. I
upgraded to ess-17.11 (emacs 24.5+1-11+deb9u1). I tried some solutions
suggested here,
https://stackoverflow.com/questions/7502540/make-emacs-ess-follow-r-style-guide
This one does something bad and every other attempt to load a file fails,
(add-hook 'find-file-hook 'my-r-style-hook)
(defun my-r-style-hook ()
(when (string-match (file-name-extension buffer-file-name) "[r|R]$")
(ess-set-style 'RStudio)))
I tried this one,
(add-hook 'ess-mode-hook
(lambda ()
(ess-set-style 'RStudio-)
(setq ess-offset-arguments 'prev-line)))
It seems to do something,
ess-style is a variable defined in `ess-custom.el'.
Its value is RStudio-
Local in buffer MxAlgebra.R; global value is RRR
but the indention style still doesn't even remotely match RStudio.
Can somebody provide some elisp that works?
Thank you.
--
Joshua N. Pritikin, Ph.D.
Virginia Institute for Psychiatric and Behavioral Genetics
Virginia Commonwealth University
PO Box 980126
800 E Leigh St, Biotech One, Suite 1-133
Richmond, VA 23219
http://exuberant-island.surge.sh
More information about the ESS-help
mailing list