Thomas S. Dye <tsd <at> tsdye.com> writes: > > Aloha Alan, > > Alan Schmitt <alan.schmitt <at> polytechnique.org> writes: > > > Hello, > > > > I'm trying to write a block in some language (right now shell, but it > > will probably be something different) whose output is an org source > > block is some language (here coq). I keep looking at the documentation > > and I cannot see how to specify the language. If I try something like: [example-deleted]
> > > > How can I have a block with "#+BEGIN_SRC coq" instead? [snip] > > I think this can be accomplished by chaining: > [example-deleted] The problem I see is that the :var x=y() idiom can hand an object to the src block that is hard to parse and execute -- depending on the language. If the object is create code in one language and run it in another, it is sometimes easier to insert results using noweb <<abc()>> calls. A simple example: generate code in sh that is run in emacs-lisp #+name: make-elisp #+BEGIN_SRC sh :exports none :var fun="+" echo "(" $fun "1 2)" #+END_SRC #+BEGIN_SRC emacs-lisp :noweb yes :exports results <<make-elisp()>> #+END_SRC #+RESULTS: : 3 #+BEGIN_SRC emacs-lisp :noweb yes :exports results <<make-elisp("-")>> #+END_SRC #+RESULTS: : -1 #+BEGIN_SRC emacs-lisp :noweb yes :exports results <<make-elisp("list")>> #+END_SRC #+RESULTS: | 1 | 2 | HTH, Chuck