[ESS] ESS 13.05 release next week: beta testers welcome
Vitalie Spinu
spinuvit at gmail.com
Mon May 13 13:06:57 CEST 2013
>> Vincent Goulet <vincent.goulet at dgfc.ulaval.ca>
>> on Sat, 11 May 2013 13:17:42 -0400 wrote:
[...]
>> Also
>>
>> (setq-default inferior-R-args "--no-restore-history --no-save ")
>>
>> --no-restore-history has no effect because ESS/comint manages its own
>> completion ring. I think having it there is a bit confusing for users.
> I think I took this from some old posting of Martin somewhere. I see
> --no-restore-history does not even avoid the "Cannot read history file" warning
> message that IS confusing for newbies (I see my students thinking something went
> wrong starting R).
> So, --no-save only?
Yes, indeed, that warning is from comint's failure to load history.
>> ;; Set code indentation following the standard in R sources.
>> (setq ess-default-style 'C++)
>>
[...]
> Not that I kept much up to date on this issue, but that's the first time I read
> about the "RRR" indentation style. Can you elaborate a bit about it? How does it
> differ from "C++"? Also, I figure it is different from "DEFAULT"?
RRR is there from 2004 :)
╭──────── #780 ─ /home/vitoshka/ESS/git/lisp/ess-custom.el ──
│ ;; R added ajr 17Feb04 to match "common R" use
│ (RRR (ess-indent-level . 4)
│ (ess-continued-statement-offset . 4)
│ (ess-brace-offset . 0)
│ (ess-arg-function-offset . 4)
│ (ess-arg-function-offset-new-line . '(4))
│ (ess-expression-offset . 4)
│ (ess-else-offset . 0)
│ (ess-close-brace-offset . 0))
╰──────── #788 ─
The only difference between RRR and C++ is the brace-offset. So instead
of
{
{
}
}
in RRR, one have
{
{
}
}
in C++.
The DEFAULT is built dynamically from global user's custom settings (like
ess-indent-level). So your distribution ignores those.
╭──────── #732 ─ /home/vitoshka/ESS/git/lisp/ess-custom.el ──
│ (defvar ess-default-style-list
│ (list 'DEFAULT
│ (cons 'ess-indent-level '(default-value 'ess-indent-level))
│ (cons 'ess-continued-statement-offset '(default-value 'ess-continued-statement-offset))
│ ....
│ (cons 'ess-arg-function-offset-new-line '(default-value 'ess-arg-function-offset-new-line))
│ (cons 'ess-close-brace-offset '(default-value 'ess-close-brace-offset)))
│ "Default style constructed from initial values of indentation variables.")
╰──────── #744 ─
DEFAULT style uses 2 as indentation level, but people usually prefer 4
(like in C++ and RRR styles). I personally also use 4 and I think it is
visually much better.
The solution would be to change the global defaults (DEFAULT style) to
comply with RRR style and to remove the (setq ess-default-style 'C++)
from your init files.
What do people think about this change?
Vitalie
More information about the ESS-help
mailing list