diff --git a/lisp/ob-awk.el b/lisp/ob-awk.el index de94a5684..6e139966e 100644 --- a/lisp/ob-awk.el +++ b/lisp/ob-awk.el @@ -97,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." - (org-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 diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el index f53144711..407138566 100644 --- a/lisp/ob-sh.el +++ b/lisp/ob-sh.el @@ -107,13 +107,13 @@ var of the same value." (defun org-babel-sh-var-to-string (var &optional sep) "Convert an elisp value to a string." - (org-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-sh-table-or-results (results) "Convert RESULTS to an appropriate elisp value.