branch: externals/org commit 1f0eaefa521f17ee6c43c9a778439f5df985799a Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
* lisp/ob-awk.el: Add support for :prologue/:epilogue parameters (org-babel-expand-body:awk): --- lisp/ob-awk.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ob-awk.el b/lisp/ob-awk.el index 86af982a67..3671fae67e 100644 --- a/lisp/ob-awk.el +++ b/lisp/ob-awk.el @@ -48,9 +48,14 @@ (defvar org-babel-awk-command "awk" "Name of the awk executable command.") -(defun org-babel-expand-body:awk (body _params) +(defun org-babel-expand-body:awk (body params) "Expand BODY according to PARAMS, return the expanded body." - 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:awk (body params) "Execute a block of Awk code BODY with org-babel.