From e400a80429b41596da24b0d61c9fcdcf89a17bff Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 6 Aug 2012 09:37:09 -0600 Subject: [PATCH] improved handling of results that look like elisp * lisp/ob.el (org-babel-string-read): Don't automatically evaluate code block results which look like elisp. (org-babel-import-elisp-from-file): Raise a warning message when the process of reading code block results raises an error. --- lisp/ob.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index 6580a52c7..fe4d2c3d8 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -2454,14 +2454,14 @@ If the table is trivial, then return it as a scalar." (let (result) (save-window-excursion (with-temp-buffer - (condition-case nil + (condition-case err (progn (org-table-import file-name separator) (delete-file file-name) (setq result (mapcar (lambda (row) (mapcar #'org-babel-string-read row)) (org-table-to-lisp)))) - (error nil))) + (error (message "error reading results: %s" err) nil))) (if (null (cdr result)) ;; if result is trivial vector, then scalarize it (if (consp (car result)) (if (null (cdr (car result))) @@ -2475,7 +2475,7 @@ If the table is trivial, then return it as a scalar." (org-babel-read (or (and (stringp cell) (string-match "\\\"\\(.+\\)\\\"" cell) (match-string 1 cell)) - cell))) + cell) t)) (defun org-babel-reverse-string (string) "Return the reverse of STRING."