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,

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 ev

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 thi

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 disp

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 #+name:

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

2013-12-02 Thread Thomas S. Dye
Aloha Alan, Alan Schmitt 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 results is itself a source code

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

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 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
t...@tsdye.com writes: > Alan Schmitt 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: fetc

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

2013-11-30 Thread Thomas S. Dye
Alan Schmitt 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 I get a r

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-29 Thread Charles Berry
Thomas S. Dye tsdye.com> writes: > > Aloha Alan, > > Alan Schmitt 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)

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

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

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

2013-11-29 Thread Alan Schmitt
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: #+BEGIN_SR