emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix error prone babel table output format detection
@ 2014-05-01  4:56 Ian Kelling
  2014-05-01  7:08 ` Achim Gratz
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Kelling @ 2014-05-01  4:56 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-21 13:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01  4:56 [PATCH] Fix error prone babel table output format detection Ian Kelling
2014-05-01  7:08 ` Achim Gratz
2014-05-01  8:30   ` Ian Kelling
2014-05-01  9:13     ` Ian Kelling
2014-05-01  9:32       ` Ian Kelling
2014-05-01  9:55         ` Ian Kelling
2014-05-04 15:51           ` Eric Schulte
2014-05-04 19:42             ` Ian Kelling
2014-05-07  9:15               ` Eric Schulte
2014-05-07 20:57                 ` Ian Kelling
2014-05-21 13:05                   ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).