[ESS] ess-indent-exp follow OWN style?

Martin Maechler maechler at stat.math.ethz.ch
Mon Jun 6 13:45:55 CEST 2011


>>>>> Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk>
>>>>>     on Mon, 6 Jun 2011 10:35:27 +0100 writes:

    >> I think it must be ess-electric-brace, and I think it
    >> warrants a bug report.
    >> 
    >> The behavior is the same in R and Stata (though I don't
    >> know if it would ever come up in R)
    >> 
    >> Typing any line (excluding comments) that ends in { sets
    >> the indentation of the next line to ess-indent-level
    >> Typing any line (excluding comments) that ends in {; sets
    >> the indentation of the next line to so that the first
    >> character is below the preceding semicolon.
    >> 
    >> I know basically nothing about Lisp, otherwise I'd like
    >> to try to debug this thing.  It seems like an important
    >> replicable issue that warrants a bug report.

    > Thanks; I can see this behaviour in R mode.  As I don't
    > think its a common idiom in R to write something like

    >    for (i in seq) {; 
    >       ...

Note that an extraneous ";" as here is basically an empty R (or
S language) statement.
So it is 100% correct that the indentation behaves as it does.
Changing it would be wrong.

and really I just don't get it why some people want to use a
wrong syntax for R, or do like to add empty statements at the
end of almost every line of R code ....
It *will* make your code somewhat slower, maybe not noticably, ...

Martin Maechler, ETH Zurich


    > I'm afraid its not high enough on my priority list to fix
    > right now (sorry, too many other things already need
    > fixing in ESS), but I will make a note of it.  Is this
    > biting other users?

    > Stephen

    > ______________________________________________
    > ESS-help at r-project.org mailing list
    > https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list