Re: [O] How do I specify the language for a :results code block

2013-12-05 Thread Alan Schmitt
Hello Fabrice, fni-n...@pirilampo.org writes: Hello Alan, Alan Schmitt wrote: I tried to apply the drawer trick to the :wrap src but it does not work, unfortunately. I like your approach better anyway as it allows me to specify not only the language used by the output source block, but

Re: [O] How do I specify the language for a :results code block

2013-12-04 Thread Alan Schmitt
Hi Thomas, IIUC, your goal is to export the coq source code blocks. Does the following, which uses :results org, do what you want? It seems to work for me. It almost works. What I get upon export is an org blog, where I can see the #+BEGIN_SRC coq marker. The code inside is correctly

Re: [O] How do I specify the language for a :results code block

2013-12-04 Thread Alan Schmitt
Hi Sean, sean.ohal...@gmail.com writes: Taking a slightly different approach, you could use the :post header argument to wrap the results in a source block. See http://orgmode.org/org.html#post (from which the example below is derived). For example, you could use something like this:

Re: [O] How do I specify the language for a :results code block

2013-12-04 Thread Fabrice Niessen
Hello Alan, Alan Schmitt wrote: I tried to apply the drawer trick to the :wrap src but it does not work, unfortunately. I like your approach better anyway as it allows me to specify not only the language used by the output source block, but other properties (such as whether it should be

Re: [O] How do I specify the language for a :results code block

2013-12-02 Thread Alan Schmitt
t...@tsdye.com writes: Alan Schmitt alan.schm...@polytechnique.org writes: I tried this alternate approach, to directly generate the block: #+name: fetchcoq2 #+BEGIN_SRC sh :exports none :results raw :var f=demo.v echo #+BEGIN_SRC coq head $f echo echo #+END_SRC #+END_SRC #+call:

Re: [O] How do I specify the language for a :results code block

2013-12-02 Thread Sebastien Vauban
Alan Schmitt wrote: t...@tsdye.com writes: Alan Schmitt alan.schm...@polytechnique.org writes: I tried this alternate approach, to directly generate the block: #+name: fetchcoq2 #+BEGIN_SRC sh :exports none :results raw :var f=demo.v echo #+BEGIN_SRC coq head $f echo echo #+END_SRC

Re: [O] How do I specify the language for a :results code block

2013-12-02 Thread Alan Schmitt
Hi Sébastien, sva-n...@mygooglest.com writes: Exporting if the result is not in the buffer is fine. I tried adding a :results replace as inner header argument to the call line and to the fetchcoq block, but it does not change anything. How can I tell the call line to replace the results

Re: [O] How do I specify the language for a :results code block

2013-12-02 Thread Thomas S. Dye
Aloha Alan, Alan Schmitt alan.schm...@polytechnique.org writes: Unfortunately, if I export this, the code is duplicated. Here is the generated html, for instance: Yes, the code is partially duplicated when I run it. It looks to me as if the problem stems from :results raw and the fact that

Re: [O] How do I specify the language for a :results code block

2013-12-02 Thread Sean O'Halpin
Hi, Taking a slightly different approach, you could use the :post header argument to wrap the results in a source block. See http://orgmode.org/org.html#post (from which the example below is derived). For example, you could use something like this: #+OPTIONS: d:RESULTS * Example

Re: [O] How do I specify the language for a :results code block

2013-11-30 Thread Alan Schmitt
Hello Thomas and Charles, ccbe...@ucsd.edu writes: A simple example: generate code in sh that is run in emacs-lisp This is almost what I want, with two differences: I don't want to run the generated code, but to pretty-print it, and I want to do this with another language than emacs-lisp.

Re: [O] How do I specify the language for a :results code block

2013-11-30 Thread Thomas S. Dye
Alan Schmitt alan.schm...@polytechnique.org writes: I tried this alternate approach, to directly generate the block: #+name: fetchcoq2 #+BEGIN_SRC sh :exports none :results raw :var f=demo.v echo #+BEGIN_SRC coq head $f echo echo #+END_SRC #+END_SRC #+call: fetchcoq2(demo.v) But then

Re: [O] How do I specify the language for a :results code block

2013-11-29 Thread Thomas S. Dye
Aloha Alan, Alan Schmitt alan.schm...@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

Re: [O] How do I specify the language for a :results code block

2013-11-29 Thread Charles Berry
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