diff options
Diffstat (limited to 'lisp/org/ob-awk.el')
-rw-r--r-- | lisp/org/ob-awk.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el index 682d802c11c..6e139966eee 100644 --- a/lisp/org/ob-awk.el +++ b/lisp/org/ob-awk.el @@ -33,6 +33,7 @@ ;;; Code: (require 'ob) (require 'ob-eval) +(require 'org-compat) (eval-when-compile (require 'cl)) (declare-function org-babel-ref-resolve "ob-ref" (ref)) @@ -96,13 +97,13 @@ called by `org-babel-execute-src-block'" (defun org-babel-awk-var-to-awk (var &optional sep) "Return a printed value of VAR suitable for parsing with awk." - (flet ((echo-var (v) (if (stringp v) v (format "%S" v)))) + (let ((echo-var (lambda (v) (if (stringp v) v (format "%S" v))))) (cond ((and (listp var) (listp (car var))) - (orgtbl-to-generic var (list :sep (or sep "\t") :fmt #'echo-var))) + (orgtbl-to-generic var (list :sep (or sep "\t") :fmt echo-var))) ((listp var) - (mapconcat #'echo-var var "\n")) - (t (echo-var var))))) + (mapconcat echo-var var "\n")) + (t (funcall echo-var var))))) (defun org-babel-awk-table-or-string (results) "If the results look like a table, then convert them into an |