emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Gregor Kappler <gregor.kappler@univie.ac.at>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org babel execution and new exporter
Date: Thu, 14 Feb 2013 10:37:04 -0700	[thread overview]
Message-ID: <87obfmlrun.fsf@gmail.com> (raw)
In-Reply-To: <87sj4yizlq.fsf@univie.ac.at> (Gregor Kappler's message of "Thu, 14 Feb 2013 18:17:53 +0100")

Hi Gregor,

This patch looks good to me, but I'll leave the actual application of
anything dealing with the new export engine to Nicolas.

Thanks for contributing!

Gregor Kappler <gregor.kappler@univie.ac.at> writes:

> 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
>
>
> From a955c54f3ecda02b70933f6b98b8043a4f40d634 Mon Sep 17 00:00:00 2001
> From: Gregor Kappler <gregor@alcedo.(none)>
> 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

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-02-14 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 17:17 [PATCH] org babel execution and new exporter Gregor Kappler
2013-02-14 17:37 ` Eric Schulte [this message]
2013-02-14 17:59 ` Nicolas Goaziou
2013-02-18 20:40 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obfmlrun.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gregor.kappler@univie.ac.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).