From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kelling Subject: [PATCH] Fix error prone babel table output format detection Date: Wed, 30 Apr 2014 21:56:52 -0700 Message-ID: <20140501065231.5AE63181A42@treetowl.lan> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wfks1-0002ja-5Q for emacs-orgmode@gnu.org; Thu, 01 May 2014 02:53:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wfkru-000621-US for emacs-orgmode@gnu.org; Thu, 01 May 2014 02:53:25 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wfkru-00061u-RB for emacs-orgmode@gnu.org; Thu, 01 May 2014 02:53:18 -0400 Received: from treetowl.lan (unknown [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 661B4C00005 for ; Thu, 1 May 2014 02:53:17 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org >From dc0b727328266785528fe160046ae1aa8df8a993 Mon Sep 17 00:00:00 2001 Message-ID: <87zjj2ous9.fsf@treetowl.lan> 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) #+end_src --- 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 source (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)))) "\n")) (goto-char beg) (when (org-at-table-p) (org-table-align))) -- 1.7.10.4