[ESS] ESS 13.05 release next week: beta testers welcome
Martin Maechler
maechler at stat.math.ethz.ch
Mon May 13 14:42:07 CEST 2013
>>>>> Vitalie Spinu <spinuvit at gmail.com>
>>>>> on Mon, 13 May 2013 13:06:57 +0200 writes:
>>> 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?
Well, for Vincent's users it may be ok,
but for everyone else,
including some people at our institute,
it is *not* back compatible with > 10 year of ESS usage.
They would not want ESS to suddenly indent by 4 instead of by 2
in all their existing *.R files.
I agree that 'DEFAULT' is not my favorite style, and I do use
another one myself; however I do so very much on purpose.
Also, I know from talking to people that this is very much a
matter of personal taste and often years of tradition which
formed that taste, rather than anything "optimal".
I think we can and maybe should advertize some of our options
more loudly.
However, changing the default is very impolite towards all the
users with years of getting accustomed to it.
Martin
> Vitalie
More information about the ESS-help
mailing list