* lisp/ob-org.el: Add support for :prologue/:epilogue parameters

(org-babel-expand-body:org):
This commit is contained in:
Ihor Radchenko 2023-10-19 11:59:46 +03:00
parent 320b0e5b1f
commit ab4ec726e5
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 7 additions and 1 deletions

View File

@ -52,7 +52,13 @@ $VAR instances are replaced by VAR values defined in PARAMS."
(regexp-quote (format "$%s" (car var)))
(format "%s" (cdr var))
body nil 'literal)))
body)
(let ((prologue (cdr (assq :prologue params)))
(epilogue (cdr (assq :epilogue params))))
(concat
(and prologue (concat prologue "\n"))
body
(and epilogue (concat "\n" epilogue "\n")))))
(defun org-babel-execute:org (body params)
"Execute a Org BODY according to PARAMS.