From: Nick Dokos <nicholas.dokos@hp.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: David Maus <dmaus@ictsoc.de>,
Konrad Hinsen <konrad.hinsen@fastmail.net>,
nicholas.dokos@hp.com,
emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>,
Ista Zahn <izahn@psych.rochester.edu>
Subject: Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
Date: Fri, 19 Nov 2010 02:46:46 -0500 [thread overview]
Message-ID: <20160.1290152806@gamaville.dokosmarshall.org> (raw)
In-Reply-To: Message from "Eric Schulte" <schulte.eric@gmail.com> of "Wed, 17 Nov 2010 17:07:28 MST." <874obfjxz3.fsf@gmail.com>
Eric Schulte <schulte.eric@gmail.com> wrote:
> Thanks for doing most of the debugging on this.
>
> After much banging of my head, I stumbled onto this very nice page of
> common problems with compiled Macros in Emacs Lisp [1], it looks like
> this sort of thing has happened before. :)
>
> I realized I was guilty of one of the macro sins specified above, and
> after rectifying that design flaw I believe (at least for my simple test
> case) this error should be fixed. Please let me know if you continue to
> run into this problem with the byte-compiled version of this macro.
>
> ...
>
> Footnotes:
> [1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Problems-with-Macros.html
>
After Konrad reported that this doesn't fix it, I tried it too with his
simple org file and got the same error [fn:1].
So after trying the usual debugging tricks and coming up empty, I took a
look at the ob.elc file and the problem was obvious: the macro was not
expanded during compilation. I'm not sure how exactly we get to the
``consp nil'' error that way, but I'm pretty sure that the solution is
to change the order of the macro and the function that uses it in ob.el,
so the definition precedes the use.
Cheers,
Nick
PS. I can now go to bed in peace...
Footnotes:
[fn:1] OT to the above: I had to name the session , otherwise python would report
,----
| Traceback (most recent call last):
| File "<stdin>", line 5, in <module>
| File "<stdin>", line 3, in main
| NameError: global name 'days' is not defined
`----
Here for reference is my modification to Konrad's original example:
--8<---------------cut here---------------start------------->8---
* Vacation days
#+begin_src python :session foo :results silent
days = 32+2+9
#+end_src
** Vacation <2010-10-28 Thu>-<2010-10-29 Fri>
#+begin_src python :session foo :results silent
days -= 2
#+end_src
** Remaining days
#+begin_src python :session foo :results value
days
#+end_src
#+results:
: 41
--8<---------------cut here---------------end--------------->8---
next prev parent reply other threads:[~2010-11-19 7:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 16:09 Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil Ista Zahn
2010-11-08 13:35 ` Konrad Hinsen
2010-11-08 13:49 ` Eric Schulte
2010-11-08 13:58 ` Konrad Hinsen
2010-11-08 14:21 ` Eric S Fraga
2010-11-08 14:45 ` Nick Dokos
2010-11-08 14:53 ` Konrad Hinsen
2010-11-14 19:13 ` David Maus
2010-11-18 0:07 ` Eric Schulte
2010-11-18 18:58 ` Konrad Hinsen
2010-11-19 7:46 ` Nick Dokos [this message]
2010-11-19 8:19 ` Eric Schulte
2010-11-19 8:48 ` Konrad Hinsen
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=20160.1290152806@gamaville.dokosmarshall.org \
--to=nicholas.dokos@hp.com \
--cc=dmaus@ictsoc.de \
--cc=emacs-orgmode@gnu.org \
--cc=izahn@psych.rochester.edu \
--cc=konrad.hinsen@fastmail.net \
--cc=schulte.eric@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).