[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] "user-error: No language for src block: (unnamed)" when running

From: Charles C. Berry
Subject: Re: [O] "user-error: No language for src block: (unnamed)" when running `org-icalendar-combine-agenda-files`
Date: Fri, 21 Aug 2015 20:19:30 -0700
User-agent: Alpine 2.11 (OSX 23 2013-08-11)

On Fri, 21 Aug 2015, Andreas Leha wrote:


Just a small comment.

[ ... discussion of :caching of evaluation results ... ]

For purely R-based work, Charles Berry’s ox-ravel package
is a very interesting approach, since it relies on the cache feature of
knitr, which is capable of automatically detecting cross-block
dependencies like the example above under some circumstances
<http://yihui.name/knitr/demo/cache/>.  It would be interesting to see
if that approach could be used to override :cache handling for ob-R,
while falling back on org-babel’s less intelligent features for other
languages (or in R environments that don’t have knitr available).

That would be just awesome!

I think I understand what Aaron is suggesting, but...

In ox-ravel exports, non-R src blocks get executed as usual, while R blocks get converted to `chunks' for later processing by knitr or Sweave or whatever. Anything that needs to be communicated from other languages to R via noweb `<<run-this()>>' or `:var rvar=elisp-block()' headers should work. That is, the resulting chunks will have code put into them as usual in R src block execution. (And this is useful for passing latex code to R, for example.)

But when the R code is run under knitr or some other engine outside of org mode, it cannot communicate values back to src blocks using other languages. Or even other R src blocks using `:var rvar=r-src-block()', say. And it cannot use `:post' header args. I agree it would be interesting to adapt knitr or some other dependency-aware caching engine to run under babel control to allow R to push results to other src blocks. I don't know how hard it would be to make it work well.


p.s. I just pushed an org mode translation of auto-dependson.Rnw from https://github.com/yihui/knitr-examples to the ravel-lang branch at
It illustrates automatic dependency-aware caching of R src blocks.

p.p.s. I expect to move the `ravel-lang' branch to `master' soon, so I encourage users to try that branch.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]