babel: adding :noeval header argument to inhibit execution of code blocks on export

* contrib/babel/lisp/org-babel.el (org-babel-header-arg-names): adding
  :noeval header argument which can be specified to inhibit the
  execution of a source block during export.

* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-do-export):
  adding :noeval header argument which can be specified to inhibit the
  execution of a source block during export.
This commit is contained in:
Eric Schulte 2010-06-07 14:08:06 -07:00
parent ac2e6fefee
commit 8d7ab3a4b7
2 changed files with 5 additions and 2 deletions

View File

@ -122,7 +122,9 @@ options are taken from `org-babel-default-header-args'."
"Return a string containing the exported content of the current
code block respecting the value of the :exports header argument."
(flet ((silently () (let ((session (cdr (assoc :session (third info)))))
(when (and session (not (equal "none" session)))
(when (and session
(not (equal "none" session))
(not (assoc :noeval (third info))))
(org-babel-exp-results info type 'silent))))
(clean () (org-babel-remove-result info)))
(case (intern (or (cdr (assoc :exports (third info))) "code"))

View File

@ -93,7 +93,8 @@ then run `org-babel-pop-to-session'."
(add-hook 'org-metadown-hook 'org-babel-pop-to-session-maybe)
(defconst org-babel-header-arg-names
'(cache cmdline colnames dir exports file noweb results session tangle var)
'(cache cmdline colnames dir exports file noweb results
session tangle var noeval)
"Common header arguments used by org-babel. Note that
individual languages may define their own language specific
header arguments as well.")