[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Fix error prone babel table output format detection

From: Ian Kelling
Subject: [O] [PATCH] Fix error prone babel table output format detection
Date: Wed, 30 Apr 2014 21:56:52 -0700

>From dc0b727328266785528fe160046ae1aa8df8a993 Mon Sep 17 00:00:00 2001
Message-ID: <address@hidden>
MIME-Version: 1.0
Content-Type: text/plain

* lisp/ob-core.el: Test that all elements are in a list are lists
instead of just the first.

org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error, as in this example:
#+begin_src emacs-lisp 
'((1) 2)
 lisp/ob-core.el |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1348f04..5872b68 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2185,8 +2185,7 @@ code ---- the results are extracted in the syntax of the 
                  (goto-char beg)
                  (insert (concat (orgtbl-to-orgtbl
                                   (if (or (eq 'hline (car result))
-                                          (and (listp (car result))
-                                               (listp (cdr (car result)))))
+                                          (cl-every 'listp result))
                                       result (list result))
                                   '(:fmt (lambda (cell) (format "%s" cell)))) 
                  (goto-char beg) (when (org-at-table-p) (org-table-align)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]