[ESS] knitr

Rasmus rasmus at gmx.us
Wed Jun 6 23:04:48 CEST 2012

Vitalie Spinu <spinuvit at gmail.com> writes:

> It looks like adding support to Rnw is a 30 minutes job. Adding Rhtml,
> Rbrew, Rmd will require a bit of a rewrite of noweb which we plan
> anyways. What is the state of the art in the noweb-for-emacs world?
> Stephen, you have pointed once to an improved noweb mode. Was it this one:
>  http://www.loveshack.ukfsn.org/emacs/noweb.el

Perhaps, if things are to be re-written anyway, alternatives such as the
MMM mode¹ should be considered.  I have no idea whether any of the
alternatives would be `better' than Loveshack's multi-mode.el +

One of the things that is rather annoying about the current noweb mode
is that it forgets the state when going from LaTeX source to

In general for the completion system I, as suggested by my previous code
snip, favor the C-c C-c mechanism of AUCTeX over that of ESS-noweb (the
M-n keys).  If this is a generally held preference perhaps ESS could
specify a C-c C-c like menu with Sweave-like options.

I.e. in Knitr + LaTeX mode:
  C-c C-c brings up AUCTeX C-c C-c plus knitr option (default)

In Knitr + Markdown mode:
  C-c C-c brings up {`view in browser', `update html', ...}
This would allow for (i) easy key for output preparation; (ii) ido
completion; (iii) parsimonious way to `customize' output options based
on current backed.  Ideally, ESS should be able to guess the backend
based on e.g. filename [I guess this could reduce to just having
pre-specified modes with specialized settings: e.g. Rnw-mode == ESS
noweb mode with AUCTeX and Knitr backend].

Wrt folding code chunks: I find the Knitr code externalization² really
helpful.  Perhaps it could also support pasting in code chunks.  This
could also be too Knitr-specific, though.


¹  https://github.com/purcell/mmm-mode

²  yihui.name/knitr/demo/externalization/

Enough with the bla bla!

More information about the ESS-help mailing list