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: Mon, 02 Dec 2013 06:53:25 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnWkv-0000HQ-Kr for emacs-orgmode@gnu.org; Mon, 02 Dec 2013 11:54:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnWkp-0006Po-0m for emacs-orgmode@gnu.org; Mon, 02 Dec 2013 11:53:57 -0500 Received: from alt-proxy17.mail.unifiedlayer.com ([66.147.241.60]:44441) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VnWko-0006PY-PY for emacs-orgmode@gnu.org; Mon, 02 Dec 2013 11:53:50 -0500 In-Reply-To: (Alan Schmitt's message of "Mon, 02 Dec 2013 11:41:12 +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 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 block that includes lines like #+BEGIN_SRC and #+END_SRC. Perhaps the same confusion shows if you change the :results raw header argument for the call line to :results org, evaluate, change back to :results raw, and then evaluate again. You should find an extra #+END_SRC in the buffer. 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. #+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 #+name: fetchcoq-call #+call: fetchcoq2("demo.v") :results org #+results: fetchcoq-call #+BEGIN_SRC org ,#+BEGIN_SRC coq demo.v ,#+END_SRC #+END_SRC hth, Tom P.S. I remembered :wrap just now. This doesn't export well, though. #+call: fetchcoq2("demo.v") :wrap src coq #+results: #+BEGIN_src coq demo.v #+END_src Tom -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com