From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: How do I specify the language for a :results code block Date: Mon, 02 Dec 2013 14:04:40 +0100 Message-ID: References: <8661r7ze4y.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnTOb-00085a-W0 for emacs-orgmode@gnu.org; Mon, 02 Dec 2013 08:18:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnTOV-0003Wc-HX for emacs-orgmode@gnu.org; Mon, 02 Dec 2013 08:18:41 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:48662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnTOV-0003WQ-Ax for emacs-orgmode@gnu.org; Mon, 02 Dec 2013 08:18:35 -0500 In-reply-to: <8661r7ze4y.fsf@somewhere.org> 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org Hi Sébastien, sva-news@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 when exporting? > > The syntax of the call line is: > > #+call: []() > > So, you should add your option either in [] after the name, or at the end of > the line -- I'm always hesitating about where to put the right stuff (not so > enough clear yet in my mind)... I tried both, and neither works. Here is an org file showing the problem: --8<---------------cut here---------------start------------->8--- #+name: testcall #+BEGIN_SRC sh :exports none :results raw echo "#+BEGIN_SRC emacs-lisp" echo "(+ 1 2)" echo "#+END_SRC" #+END_SRC Test fails: #+call: testcall() :results raw #+RESULTS: #+BEGIN_SRC emacs-lisp (+ 1 2) #+END_SRC Test fails: #+call: testcall[:results replace]() :results raw #+RESULTS: #+BEGIN_SRC emacs-lisp (+ 1 2) #+END_SRC Test fails: #+call: testcall() :results raw replace #+RESULTS: #+BEGIN_SRC emacs-lisp (+ 1 2) #+END_SRC Test succeeds (results not already in the file): #+call: testcall() :results raw --8<---------------cut here---------------end--------------->8--- If you export this, you'll see that only the last call generates the expected output. Alan