On Tue, May 11, 2010 at 16:32, Rodney Sparapani <rsparapa@mcw.edu> wrote:

> On 05/11/10 09:11 AM, gerald.jean@dgag.ca wrote:
>
>>
>> for me the default is 4 as well and setting it in whatever fashion has not
>> effect on the local buffer.
>>
>> ess-indent-level is a variable defined in `ess-custom.el'.
>> Its value is 4
>> Local in buffer DataPrep.q; global value is 2
>>
>> I setted it as recommanded by Rich and yes, I restarted Emacs.
>>
>> Gérald Jean
>>
>>
> Hi Gerald:
>
> But the sources say 2 and that is what I see as well.  AFAICT, it
> hasn't changed recently either.  Is everybody running 5.8?
>

Yes, the default is definitely 2 and has always been so.
As R-core, we've set "our default" to 4, and indeed I have been preferring
that myself;
but nonetheless, the ESS default has always been 2.

One way to set it to 4 and change other things as well, is using
what we have had in the "R Internals" (and previously "R Extensions") manual
for many years;
e.g. from the Swiss (CH) CRAN mirror:

    http://stat.ethz.ch/CRAN/doc/manuals/R-ints.html#R-coding-standards
(about one page down):

     ;;; ESS
     (add-hook 'ess-mode-hook
               (lambda ()
                 (ess-set-style 'C++ 'quiet)
                 ;; Because
                 ;;                                 DEF GNU BSD K&R C++
                 ;; ess-indent-level                  2   2   8   5   4
                 ;; ess-continued-statement-offset    2   2   8   5   4
                 ;; ess-brace-offset                  0   0  -8  -5  -4
                 ;; ess-arg-function-offset           2   4   0   0   0
                 ;; ess-expression-offset             4   2   8   5   4
                 ;; ess-else-offset                   0   0   0   0   0
                 ;; ess-close-brace-offset            0   0   0   0
0

          [.... other recommendatinos omitted here ...]

and as others have said repeatedly on this thread:
Yes, you should and I think *must* set this via adding to the ess-mode-hook
BTW: In the above Emacs code, most are comments showing you the diverse
style settings,
mentioning indeed that the default ("DEF") is at 2.

Martin Maechler, ETH Zurich


>
> --
> Rodney Sparapani       Center for Patient Care and Outcomes Research
> Sr. Biostatistician               http://www.mcw.edu/pcor
> 4 wheels good, 2 wheels better!   Medical College of Wisconsin (MCW)
> WWLD?:  What Would Lombardi Do?   Milwaukee, WI, USA
>
>
> ______________________________________________
> ESS-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
>

	[[alternative HTML version deleted]]

