[ESS] Indentation level
gerald.jean at dgag.ca
gerald.jean at dgag.ca
Tue May 11 21:49:19 CEST 2010
thanks for looking into this,
ess-help-bounces at stat.math.ethz.ch a écrit sur 2010/05/11 13:45:50 :
> On Tue, May 11, 2010 at 16:32, Rodney Sparapani <rsparapa at mcw.edu> wrote:
> > On 05/11/10 09:11 AM, gerald.jean at dgag.ca wrote:
> >> for me the default is 4 as well and setting it in whatever fashion has
> >> 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
> 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")
> for many years;
> e.g. from the Swiss (CH) CRAN mirror:
> (about one page down):
> ;;; ESS
> (add-hook 'ess-mode-hook
> (lambda ()
> (ess-set-style 'C++ 'quiet)
Setting "c-default-style" to "gnu" and commenting out the line
"(ess-set-style 'C++ 'quiet)" in my .emacs solved the problem, i.e.
"ess-indent-level" is now at 2, locally and globally.
> ;; 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
> [.... 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
> 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
Conseiller senior en statistiques,
VP Actuariat et Solutions d'assurances,
Desjardins Groupe d'Assurances Générales
télephone : (418) 835-4900 poste (7639)
télecopieur : (418) 835-6657
courrier électronique: gerald.jean at dgag.ca
"We believe in God, others must bring Data."
W. Edwards Deming
> > --
> > 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 at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/ess-help
> [[alternative HTML version deleted]]
> ESS-help at stat.math.ethz.ch mailing list
Faites bonne impression et imprimez seulement au besoin !
Think green before you print !
Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire.
This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.
More information about the ESS-help