diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-04-06 10:47:34 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-04-06 11:39:23 -0600 |
commit | f58889f0c127fb6f3e3cd02da2e758678eed2ba3 (patch) | |
tree | 085c5ce89059c2633dc87aa1688599e07bcbb2aa | |
parent | 4b51984fe7706335b54fab29fbf9006cced740cd (diff) | |
download | org-mode-f58889f0c127fb6f3e3cd02da2e758678eed2ba3.tar.gz |
use org-babel-result-cond in OCaml code blocks
* lisp/ob-ocaml.el (org-babel-execute:ocaml): Use org-babel-result-cond
in OCaml code blocks.
-rw-r--r-- | lisp/ob-ocaml.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el index 9390fab..6a83908 100644 --- a/lisp/ob-ocaml.el +++ b/lisp/ob-ocaml.el @@ -74,7 +74,11 @@ (progn (setq out t) nil)))) (mapcar #'org-babel-trim (reverse raw)))))))) (org-babel-reassemble-table - (org-babel-ocaml-parse-output (org-babel-trim clean)) + (let ((raw (org-babel-trim clean))) + (org-babel-result-cond (cdr (assoc :result-params params)) + ;; strip type information from output + (if (string-match "= \\(.+\\)$" raw) (match-string 1 raw) raw) + (org-babel-ocaml-parse-output raw))) (org-babel-pick-name (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) (org-babel-pick-name |