diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-02-20 02:16:43 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-02-20 02:16:43 -0700 |
commit | 39192b78d2b0178a75a5ae1bd5de9f7f15eee5a5 (patch) | |
tree | acaf635c497a04da309b45628c938a4ba0b8f076 | |
parent | 77c278c93251aa8e2d92af226acb352f53861cb4 (diff) | |
download | org-mode-39192b78d2b0178a75a5ae1bd5de9f7f15eee5a5.tar.gz |
ob: allow elisp code in results header arguments
* lisp/ob.el (org-babel-process-params): Allow elisp code in
specification of results header arguments.
-rw-r--r-- | lisp/ob.el | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |