1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

ob: allow elisp code in results header arguments

* lisp/ob.el (org-babel-process-params): Allow elisp code in
  specification of results header arguments.
This commit is contained in:
Eric Schulte 2011-02-20 02:16:43 -07:00
parent 77c278c932
commit 39192b78d2

View File

@ -976,8 +976,11 @@ may be specified in the current buffer."
(cdr (assoc :hlines params))
(cdr (assoc :colnames params))
(cdr (assoc :rownames params))))
(raw-result (or (cdr (assoc :results params)) ""))
(result-params (append
(split-string (or (cdr (assoc :results params)) ""))
(split-string (if (stringp raw-result)
raw-result
(eval raw-result)))
(cdr (assoc :result-params params)))))
(append
(mapcar (lambda (var) (cons :var var)) (car vars-and-names))
@ -1703,7 +1706,10 @@ parameters when merging lists."
vars))))))
(:results
(setq results (e-merge results-exclusive-groups
results (split-string (cdr pair)))))
results
(split-string
(let ((r (cdr pair)))
(if (stringp r) r (eval r)))))))
(:file
(when (cdr pair)
(setq results (e-merge results-exclusive-groups