Browse Source

ob-org: now raises an error on nested export calls

* lisp/ob-org.el (org-babel-org-export): raise error on nested export call
Eric Schulte 14 years ago
parent
commit
ca15dd6dbe
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lisp/ob-org.el

+ 2 - 0
lisp/ob-org.el

@@ -57,6 +57,8 @@ This function is called by `org-babel-execute-src-block'."
 (defvar org-local-vars)
 (defun org-babel-org-export (body fmt)
   "Export BODY to FMT using Org-mode's export facilities. "
+  (when (get-buffer " org-mode-tmp")
+    (error "Nested call to org-export: from org code block exporting results"))
   (let ((tmp-file (org-babel-temp-file "org-")))
     (with-temp-buffer
       (insert org-babel-org-default-header)