From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xavier Garrido Subject: Calling a source block with raw results Date: Sun, 04 Jan 2015 20:56:36 +0100 Message-ID: <54A99AF4.2000809@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7rHx-0004Z1-2G for emacs-orgmode@gnu.org; Sun, 04 Jan 2015 14:56:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7rHt-0008EP-S0 for emacs-orgmode@gnu.org; Sun, 04 Jan 2015 14:56:37 -0500 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:41028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7rHt-0008EK-L7 for emacs-orgmode@gnu.org; Sun, 04 Jan 2015 14:56:33 -0500 Received: by mail-we0-f175.google.com with SMTP id k11so6824164wes.20 for ; Sun, 04 Jan 2015 11:56:32 -0800 (PST) Received: from [192.168.2.87] (177.24.87.79.rev.sfr.net. [79.87.24.177]) by mx.google.com with ESMTPSA id n4sm7230592wia.7.2015.01.04.11.56.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jan 2015 11:56:31 -0800 (PST) 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: "emacs-orgmode@gnu.org" Dear Orgers, The following shell function lists the files within a directory and for each file, write a org piece of code to include it. #+NAME: org-figure-to-slide #+HEADERS: :var title="Empty title" #+HEADERS: :var dir="./figures" :var ext="*.pdf" #+HEADERS: :var options="" #+BEGIN_SRC sh if [ ! -d ${dir} ]; then echo "${dir} is not a directory !" exit 1 fi for i in ${dir}/${ext}; do echo "* ${title}" if [ "${options}" != "" ]; then echo ":PROPERTIES:" echo ${options} echo ":END:" fi echo "#+BEGIN_CENTER" echo "#+ATTR_LATEX: :width \linewidth" echo "[[file:${i}]]" echo "#+END_CENTER" done #+END_SRC The basic use of such function is for a beamer presentation, each headline corresponds to a figure. Since I am explicitly writing all the org code, I would like to call the function and gets a *raw* results by doing #+CALL: org-figure-to-slide[:exports none :results raw]() The problem is when executing the call line, the result is always embeds between #+begin_example/#+end_example code block given something like #+RESULTS: #+begin_example * Empty title #+BEGIN_CENTER #+ATTR_LATEX: :width \linewidth [[file:./figures/timeline0.pdf]] #+END_CENTER * Empty title #+BEGIN_CENTER #+ATTR_LATEX: :width \linewidth [[file:./figures/timeline1.pdf]] #+END_CENTER #+end_example I want to remove the #+begin_example/#+end_example but I do not find any header arguments that achieve that (I have tested almost all of them). Moreover when I read =ob-core= code I do not understand why the function =org-babel-examplify-region= (responsible for the add of example block) is called since I set a raw results. The only (bad) way I have found is to set the variable =org-babel-min-lines-for-block-output= to nil but then I get big troubles when exporting the result. Can someone give some advice on how to get a pure raw results from a source block ? Thanks a lot for your help, Xavier