diff options
author | Dan Davison <dandavison7@gmail.com> | 2010-12-20 18:20:48 +0000 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2010-12-21 14:19:24 +0000 |
commit | 70349cd0c27c9993688bd47748806eafb8db204f (patch) | |
tree | 26653203cd1270f34668f309ad8aa7cc62cb2d19 | |
parent | e0b79276789e47c268ac9a3dcc9b9bac93c1f251 (diff) | |
download | org-mode-70349cd0c27c9993688bd47748806eafb8db204f.tar.gz |
ob: Bug fix in writing results to file
* lisp/ob.el (org-babel-execute-src-block): Avoid calling
`orgtbl-to-generic' on number results
-rw-r--r-- | lisp/ob.el | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -417,12 +417,16 @@ block." (when (cdr (assoc :file params)) (when result (with-temp-file (cdr (assoc :file params)) - (if (stringp result) - (insert result) - (insert (orgtbl-to-generic - result - (list :sep (or (cdr (assoc :sep params)) "\t") - :fmt 'echo-res)))))) + (insert + (if (listp result) + ;; table result + (orgtbl-to-generic + result + (list + :sep (or (cdr (assoc :sep (nth 2 info))) "\t") + :fmt 'echo-res)) + ;; scalar result + (echo-res result))))) (setq result (cdr (assoc :file params))))) (org-babel-insert-result result result-params info new-hash indent lang) |