Function: org-babel-expand-body:generic

org-babel-expand-body:generic is a byte-compiled function defined in ob-core.el.gz.

Signature

(org-babel-expand-body:generic BODY PARAMS &optional VAR-LINES)

Documentation

Expand BODY with PARAMS.

Expand a block of code with org-babel according to its header arguments. This generic implementation of body expansion is called for languages which have not defined their own specific org-babel-expand-body:lang function.

VAR-LINES is a list of lines that define variable environment. These lines will be added after :prologue parameter and before BODY.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-core.el.gz
(defun org-babel-expand-body:generic (body params &optional var-lines)
  "Expand BODY with PARAMS.
Expand a block of code with org-babel according to its header
arguments.  This generic implementation of body expansion is
called for languages which have not defined their own specific
org-babel-expand-body:lang function.

VAR-LINES is a list of lines that define variable environment.  These
lines will be added after `:prologue' parameter and before BODY."
  (let ((pro (cdr (assq :prologue params)))
	(epi (cdr (assq :epilogue params))))
    (mapconcat #'identity
	       (append (when pro (list pro))
		       var-lines
		       (list body)
		       (when epi (list epi)))
	       "\n")))