From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregor Kappler Subject: [PATCH] org babel execution and new exporter Date: Thu, 14 Feb 2013 18:17:53 +0100 Message-ID: <87sj4yizlq.fsf@univie.ac.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U62ac-00011Q-JX for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:27:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U62aX-0000Gw-0x for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:27:18 -0500 Received: from grace.univie.ac.at ([131.130.3.115]:35371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U62aW-0000Et-M1 for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 12:27:12 -0500 Received: from joan.univie.ac.at ([131.130.3.110] helo=joan.univie.ac.at) by grace.univie.ac.at with esmtp (Exim 4.80) (envelope-from ) id 1U62Ta-0002Cw-5k for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 18:20:02 +0100 Received: from [2001:62a:4:412:18dd:5155:11b7:c87a] (helo=localhost) by joan.univie.ac.at with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1U62TZ-0001XU-Tp for emacs-orgmode@gnu.org; Thu, 14 Feb 2013 18:20:02 +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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi, the new exporter currently does not respect `org-export-babel-evaluate' and evaluates babel src blocks always on export. I did the tiniest change to ox.el as in the attached patch. (This is my first patch sent - I hope it works and helps...). Best regards, Gregor --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0018-Export-Prevent-babel-src-blocks-from-being-evaluated.patch >From a955c54f3ecda02b70933f6b98b8043a4f40d634 Mon Sep 17 00:00:00 2001 From: Gregor Kappler Date: Thu, 14 Feb 2013 18:12:39 +0100 Subject: [PATCH] Export: Prevent babel src blocks from being evaluated if org-export-babel-evaluate is nil * lisp/ox.el (org-export-as): Make sure org-export-babel-evaluate is not nil before calling `org-export-execute-babel-code'. TINYCHANGE --- lisp/ox.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ox.el b/lisp/ox.el index 049dcc5..1ce900b 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -2810,7 +2810,10 @@ Return code as a string." ;; added some new ones. (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) - (org-export-execute-babel-code) + + (when org-export-babel-evaluate + (org-export-execute-babel-code)) + ;; Update radio targets since keyword inclusion might have ;; added some more. (org-update-radio-target-regexp) -- 1.7.10.4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Dr. Gregor Kappler Fakult=C3=A4t f=C3=BCr Psychologie=20 Institut f=C3=BCr Angewandte Psychologie: Gesundheit, Entwicklung, F=C3=B6rderung Universit=C3=A4t Wien Liebiggasse 5 A-1010 Wien http://www.univie.ac.at/Psychologie tel: +43 1 4277 47276 --=-=-=--