emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Quirk in Emacs-Lisp code block evaluation


From: Eric Schulte
Subject: Re: [O] Quirk in Emacs-Lisp code block evaluation
Date: Thu, 28 Jul 2011 23:02:51 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Matthew Snyder <address@hidden> 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/



reply via email to

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