From: Eric Schulte <schulte.eric@gmail.com>
To: Matthew Snyder <matthew.c.snyder@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Quirk in Emacs-Lisp code block evaluation
Date: Thu, 28 Jul 2011 23:02:51 -0600 [thread overview]
Message-ID: <87k4b1nijg.fsf@gmail.com> (raw)
In-Reply-To: <5405E694-DC71-4783-8C93-C87215F4B8A3@gmail.com> (Matthew Snyder's message of "Fri, 29 Jul 2011 00:30:49 -0400")
Matthew Snyder <matthew.c.snyder@gmail.com> 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/
prev parent reply other threads:[~2011-07-29 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 4:30 Quirk in Emacs-Lisp code block evaluation Matthew Snyder
2011-07-29 5:02 ` Eric Schulte [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4b1nijg.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=matthew.c.snyder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).