Using 4 spaces is following the R coding standards from R internals:
  http://cran.r-project.org/doc/manuals/R-ints.html#R-coding-standards
so it is not exactly coming from out of nowhere.  I have been following
these standards for many years, but most of my collaborators use a default
ess setup and then we have the 2 vs 4 indentation issue.

I support the change, but I agree that many users will perhaps complain.

Kasper


On Mon, May 13, 2013 at 8:42 AM, Martin Maechler <maechler@stat.math.ethz.ch
> wrote:

> >>>>> Vitalie Spinu <spinuvit@gmail.com>
> >>>>>     on Mon, 13 May 2013 13:06:57 +0200 writes:
>
>     >>> Vincent Goulet <vincent.goulet@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
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]

