From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: How do I specify the language for a :results code block Date: Sat, 30 Nov 2013 06:57:52 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vmns9-0003RJ-3N for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 11:58:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vmns2-0005tN-Ro for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 11:58:25 -0500 Received: from oproxy9-pub.mail.unifiedlayer.com ([69.89.24.6]:45726) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Vmns2-0005sm-Jm for emacs-orgmode@gnu.org; Sat, 30 Nov 2013 11:58:18 -0500 In-Reply-To: (Alan Schmitt's message of "Sat, 30 Nov 2013 11:52:56 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Schmitt Cc: emacs-orgmode@gnu.org, Charles Berry 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 result like this, with extra quoting: > > #+RESULTS: > : #+BEGIN_SRC coq > : Definition toto : forall x, exists y, x = y. > : > : Lemma foo: forall x, x=x. > : #+END_SRC > > I feel like I'm missing something obvious. ":results code" is exactly > what I want (put the results in a SRC block), but I don't know how to > specify the headers of the generated code block. You need :results raw at the end of the call line. #+name: fetchcoq2 #+BEGIN_SRC sh :exports none :results raw :var f="demo.v" echo "#+BEGIN_SRC coq" echo $f echo "#+END_SRC" #+END_SRC #+results: fetchcoq2 #+BEGIN_SRC coq demo.v #+END_SRC #+call: fetchcoq2("demo.v") :results raw #+results: #+BEGIN_SRC coq demo.v #+END_SRC hth, Tom -- Thomas S. Dye http://www.tsdye.com