Browse Source

ob-ocaml.el: Make sure a value was extracted before printing

* lisp/ob-ocaml.el (org-babel-execute:ocaml): Do not try to print
a value if either the type or the value could not be extracted from
the toplevel.
Alan Schmitt 11 years ago
parent
commit
f57b2d7141
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/ob-ocaml.el

+ 3 - 1
lisp/ob-ocaml.el

@@ -95,7 +95,9 @@
 	((member "verbatim" result-params) raw)
 	((member "output" result-params) output)
 	(t raw))
-       (org-babel-ocaml-parse-output value type))
+       (if (and value type)
+	   (org-babel-ocaml-parse-output value type)
+	 raw))
      (org-babel-pick-name
       (cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
      (org-babel-pick-name