diff options
author | Eric S Fraga <e.fraga@ucl.ac.uk> | 2017-01-05 15:03:05 +0000 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-01-07 15:51:04 +0100 |
commit | 7d4b3bbdb7a532aaa7b6dbff71e23f6f99a5d4b4 (patch) | |
tree | 69af7d52dc699d38b72a329298bef4d200dee6ab | |
parent | d809a604f26b28d1b425239e8789445698836f3a (diff) | |
download | org-mode-7d4b3bbdb7a532aaa7b6dbff71e23f6f99a5d4b4.tar.gz |
ob-maxima.el: Add prologue and epilogue src block options for Maxima
* ob-maxima.el (org-babel-maxima-expand): add contents of prologue and
epilogue src block options to the body of code.
-rw-r--r-- | lisp/ob-maxima.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index 0a4d835..350f66b 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -48,9 +48,13 @@ (defun org-babel-maxima-expand (body params) "Expand a block of Maxima code according to its header arguments." - (let ((vars (org-babel--get-vars params))) + (let ((vars (org-babel--get-vars params)) + (epilogue (cdr (assq :epilogue params))) + (prologue (cdr (assq :prologue params)))) (mapconcat 'identity (list + ;; Any code from the specified prologue at the start. + prologue ;; graphic output (let ((graphic-file (ignore-errors (org-babel-graphical-output-file params)))) (if graphic-file @@ -62,6 +66,8 @@ (mapconcat 'org-babel-maxima-var-to-maxima vars "\n") ;; body body + ;; Any code from the specified epilogue at the end. + epilogue "gnuplot_close ()$") "\n"))) |