From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kelling Subject: Re: [PATCH] Fix error prone babel table output format detection Date: Thu, 01 May 2014 01:30:10 -0700 Message-ID: <87eh0dnbot.fsf@treetowl.lan> References: <20140501065231.5AE63181A42@treetowl.lan> <8761lqrn5p.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfmOX-00062q-4S for emacs-orgmode@gnu.org; Thu, 01 May 2014 04:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfmOR-0005xb-Sd for emacs-orgmode@gnu.org; Thu, 01 May 2014 04:31:05 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:47621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfmOR-0005vH-Mv for emacs-orgmode@gnu.org; Thu, 01 May 2014 04:30:59 -0400 In-Reply-To: <8761lqrn5p.fsf@Rainer.invalid> (Achim Gratz's message of "Thu, 01 May 2014 09:08:50 +0200") 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: Achim Gratz Cc: emacs-orgmode@gnu.org Achim Gratz writes: > Ian Kelling writes: >> 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 > > So this isn't a proper table, what do you expect to happen? I expect to be able to emacs -q, make an org mode buffer containing that block, do ctrl-c c on it, and not have an error message pop up and fail to have any output. What is improper about it? Would it be better if org did not try to format it as a table? > >> - (and (listp (car result)) >> - (listp (cdr (car result))))) >> + (cl-every 'listp result)) > > This is wrong, because a table can come with any number of 'hline > symbols, so ostensibly not every element will be a listp. Yes, I agree. It will have to test if elements are listp or hline. > Besides, you > can't use cl-every unless Org drops backwards compatibility with older > Emacsen or mandates cl-lib to be present. Even then, you'd also need to > require cl-extra. I forgot about the multiple parts of cl. I originally wrote it without, and can change it.