Function: org-babel-exp-do-export
org-babel-exp-do-export is a byte-compiled function defined in
ob-exp.el.gz.
Signature
(org-babel-exp-do-export INFO TYPE &optional HASH)
Documentation
Return a string with the exported content of a code block defined by INFO.
TYPE is the code block type: block, inline, or lob. HASH is the
result hash.
Return nil when exported content cannot be determined.
The function respects the value of the :exports header argument.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ob-exp.el.gz
(defun org-babel-exp-do-export (info type &optional hash)
"Return a string with the exported content of a code block defined by INFO.
TYPE is the code block type: `block', `inline', or `lob'. HASH is the
result hash.
Return nil when exported content cannot be determined.
The function respects the value of the :exports header argument."
(let ((silently (lambda () (let ((session (cdr (assq :session (nth 2 info)))))
(unless (equal "none" session)
(org-babel-exp-results info type 'silent)))))
(clean (lambda () (if (eq type 'inline)
(org-babel-remove-inline-result)
(org-babel-remove-result info)))))
(pcase (or (cdr (assq :exports (nth 2 info))) "code")
("none" (funcall silently) (funcall clean) "")
("code" (funcall silently) (funcall clean) (org-babel-exp-code info type))
("results" (org-babel-exp-results info type nil hash) "")
("both"
(org-babel-exp-results info type nil hash)
(org-babel-exp-code info type))
(unknown-value
(warn "Unknown value of src block parameter :exports %S" unknown-value)
nil))))