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

(org-babel-expand-body:awk):
This commit is contained in:
Ihor Radchenko 2023-10-19 11:57:33 +03:00
parent 312deaa13a
commit 1f0eaefa52
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 7 additions and 2 deletions

View File

@ -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.