[ESS] could intending around code chunks be fixed in Sweave docs?

Vitalie Spinu spinuvit at gmail.com
Wed May 15 10:58:58 CEST 2013


Hi Paul, 

 >> Paul Johnson <pauljohn32 at gmail.com>
 >> on Tue, 14 May 2013 10:30:54 -0500 wrote:

[...]

 > The code chunks are required to be flush left, so markup that follows them
 > is not indented consistently with what came before..

Sweave needs <<>> blocks to follow immediately after new line. So you
are out of luck even if ESS/Auctex would indent the code. Knitr
overcomes this problem, but ess-noweb.el is designed for Sweave.

Polymode allows chunks not to start in the middle of the line but
indentation of fully indented chunks is not yet implemented.

 > Oh, while I'm on the list of things that bug me, I can't understand why
 > selection of regions "disappears" when the region goes over a code chunk.
 > But I think that's an Auctex issue that's debated elsewhere, I just wanted
 > to share :)

This is the drawback of mode re-initialization. Each time you switch
chunks the corresponding mode is completely reinitialized. This and
other similar issues don't occur in polymode.

So I guess you will have to wait a couple of weeks till I properly
finish polymode. It is already pretty stable so you can give a dev
version a try.

    Vitalie



More information about the ESS-help mailing list