emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Respect org-export-babel-evaluate on export
@ 2013-06-02 16:21 Christopher Allan Webber
  2013-06-03 14:45 ` Eric Schulte
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Allan Webber @ 2013-06-02 16:21 UTC (permalink / raw)
  To: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Hiya,

I was running into troubles where regardless of my setting on
org-export-babel-evaluate, it was evaluating babel code anyway.  Here's
a patch that seems to fix this.

For convenience: I've signed the emacs/orgmode papers already.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: respect_babel_settings.patch --]
[-- Type: text/x-diff, Size: 905 bytes --]

From 5f2621aeda0fa1eb1b976ce85bad7006f45921ea Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Sun, 2 Jun 2013 11:16:54 -0500
Subject: [PATCH] Respect the "org-export-babel-evaluate" variable while
 exporting.

For some reason, this variable existed, but wasn't being respected on
export.
---
 lisp/ox.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 0e32cf3..a1f8058 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2949,7 +2949,8 @@ 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)
+	 (if 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Respect org-export-babel-evaluate on export
  2013-06-02 16:21 [PATCH] Respect org-export-babel-evaluate on export Christopher Allan Webber
@ 2013-06-03 14:45 ` Eric Schulte
  2013-06-03 17:04   ` Christopher Allan Webber
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Schulte @ 2013-06-03 14:45 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: Emacs-orgmode

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Hiya,
>
> I was running into troubles where regardless of my setting on
> org-export-babel-evaluate, it was evaluating babel code anyway.  Here's
> a patch that seems to fix this.
>
> For convenience: I've signed the emacs/orgmode papers already.
>

Can you send an minimal example in which evaluation takes place on
export?

Thanks,

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Respect org-export-babel-evaluate on export
  2013-06-03 14:45 ` Eric Schulte
@ 2013-06-03 17:04   ` Christopher Allan Webber
  2013-06-05 12:27     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Allan Webber @ 2013-06-03 17:04 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

Here's such a file.  The exact contents of it don't really matter.

What's significant is you should see a "lol" appear in your *Messages*
buffer... which shouldn't happen.... when exporting to anything while
  (setq org-export-babel-evaluate nil)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eval-on-export.org --]
[-- Type: text/x-org, Size: 1729 bytes --]

* Statistics

*** Last month's graph

#+name: org-diet-graph-month
#+headers: :var data=org-diet-info()
#+begin_src gnuplot :file /tmp/weight_month.png
  reset
  set xdata time
  set ylabel "weight (in pounds)"
  set timefmt "%Y-%m-%d"
  set term pngcairo font "Sans,10" dashed
  plot data using 1:2 with lines lt 3 title "weight",\
       data using 1:3 with lines lw 3 lt 1 title "average weight"
#+end_src

#+results: org-diet-graph-month
[[file:/tmp/weight_month.png]]

** Support funcs

#+name: org-diet-info
#+begin_src emacs-lisp
  (message "lol")
  '(("2013-05-17" "216.4" "217.23" "80%")
    ("2013-05-19" "217.4" "217.03" "80%")
    ("2013-05-20" "218.0" "217.13" "90%")
    ("2013-05-21" "218.0" "217.36" "90%")
    ("2013-05-22" "217.0" "217.24" "90%")
    ("2013-05-23" "217.0" "217.13" "90%")
    ("2013-05-24" "217.0" "217.33" "90%")
    ("2013-05-25" "215.0" "217.09" "90%")
    ("2013-05-26" "213.8" "216.62" "90%")
    ("2013-05-27" "216.4" "216.62" "90%")
    ("2013-05-28" "216.4" "216.60" "100%")
    ("2013-05-29" "215.8" "216.44" "100%")
    ("2013-05-30" "215.8" "216.22" "100%")
    ("2013-06-03" "215.6" "215.54" "70%"))
#+end_src

#+RESULTS: org-diet-info
| 2013-05-17 | 216.4 | 217.23 |  80% |
| 2013-05-19 | 217.4 | 217.03 |  80% |
| 2013-05-20 | 218.0 | 217.13 |  90% |
| 2013-05-21 | 218.0 | 217.36 |  90% |
| 2013-05-22 | 217.0 | 217.24 |  90% |
| 2013-05-23 | 217.0 | 217.13 |  90% |
| 2013-05-24 | 217.0 | 217.33 |  90% |
| 2013-05-25 | 215.0 | 217.09 |  90% |
| 2013-05-26 | 213.8 | 216.62 |  90% |
| 2013-05-27 | 216.4 | 216.62 |  90% |
| 2013-05-28 | 216.4 | 216.60 | 100% |
| 2013-05-29 | 215.8 | 216.44 | 100% |
| 2013-05-30 | 215.8 | 216.22 | 100% |
| 2013-06-03 | 215.6 | 215.54 |  70% |

[-- Attachment #3: Type: text/plain, Size: 438 bytes --]


Eric Schulte writes:

> Christopher Allan Webber <cwebber@dustycloud.org> writes:
>
>> Hiya,
>>
>> I was running into troubles where regardless of my setting on
>> org-export-babel-evaluate, it was evaluating babel code anyway.  Here's
>> a patch that seems to fix this.
>>
>> For convenience: I've signed the emacs/orgmode papers already.
>>
>
> Can you send an minimal example in which evaluation takes place on
> export?
>
> Thanks,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Respect org-export-babel-evaluate on export
  2013-06-03 17:04   ` Christopher Allan Webber
@ 2013-06-05 12:27     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2013-06-05 12:27 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: Emacs-orgmode, Eric Schulte

Hello,

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Here's such a file.  The exact contents of it don't really matter.
>
> What's significant is you should see a "lol" appear in your *Messages*
> buffer... which shouldn't happen.... when exporting to anything while
>   (setq org-export-babel-evaluate nil)

I cannot reproduce it.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-05 12:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-02 16:21 [PATCH] Respect org-export-babel-evaluate on export Christopher Allan Webber
2013-06-03 14:45 ` Eric Schulte
2013-06-03 17:04   ` Christopher Allan Webber
2013-06-05 12:27     ` Nicolas Goaziou

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).