From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Quirk in Emacs-Lisp code block evaluation Date: Thu, 28 Jul 2011 23:02:51 -0600 Message-ID: <87k4b1nijg.fsf@gmail.com> References: <5405E694-DC71-4783-8C93-C87215F4B8A3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmqAk-0000iv-KZ for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 12:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmqAj-0006uQ-AF for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 12:44:26 -0400 Received: from mail-pz0-f49.google.com ([209.85.210.49]:37428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmqAj-0006uH-5M for emacs-orgmode@gnu.org; Fri, 29 Jul 2011 12:44:25 -0400 Received: by pzk33 with SMTP id 33so5717923pzk.8 for ; Fri, 29 Jul 2011 09:44:24 -0700 (PDT) In-Reply-To: <5405E694-DC71-4783-8C93-C87215F4B8A3@gmail.com> (Matthew Snyder's message of "Fri, 29 Jul 2011 00:30:49 -0400") 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: Matthew Snyder Cc: emacs-orgmode@gnu.org Matthew Snyder writes: > Hello - > > I noticed today as I was playing with code blocks that some results > are prematurely truncated, possibly because they contain nil as a > first element and are thus considered empty return values. > > Consider: > > > #+BEGIN_SRC emacs-lisp > '(a nil nil b) > #+END_SRC > > #+results: > | a | nil | nil | b | > > But then: > > #+BEGIN_SRC emacs-lisp > '(nil nil nil b) > #+END_SRC > > #+results: > > I'm using Emacs 24.0.50.1 and Org Mode 7.6, ELPA version 20110728. > Interesting corner case. If you place a ":results scalar" header argument onto the code block, then you get reasonable results #+begin_src emacs-lisp :results scalar '(nil nil nil nil) #+end_src #+results: : (nil nil nil nil) However when the results are converted into a table, the `orgtbl-to-orgtbl' which ultimately calls the `orgtbl-to-generic' function turns '(nil nil nil nil) into "". This may be something to look at in the future, but for now I'm hesitant to touch such a central function. Cheers -- Eric > > -- > Matthew Snyder -- Eric Schulte http://cs.unm.edu/~eschulte/