From 4122d20f1253c2cbf5e73070ea00665bbc802275 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 30 Apr 2014 21:56:52 -0700 Subject: [PATCH] Fix error prone babel table output format detection * lisp/ob-core.el: Test that all elements are in a list are lists or 'hline instead of just the first. org-babel table output uses different formatting for a list of lists, but detects it incorrectly causing an error. An example of a block causing an error is an emacs lisp source block containing just 1 line: '((1) 2) --- lisp/ob-core.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 1348f04..4ddafaf 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2184,9 +2184,9 @@ code ---- the results are extracted in the syntax of the source ((funcall proper-list-p result) (goto-char beg) (insert (concat (orgtbl-to-orgtbl - (if (or (eq 'hline (car result)) - (and (listp (car result)) - (listp (cdr (car result))))) + (if (org-every + (lambda (el) (or (listp el) (eq el 'hline))) + result) result (list result)) '(:fmt (lambda (cell) (format "%s" cell)))) "\n")) (goto-char beg) (when (org-at-table-p) (org-table-align))) -- 1.7.10.4