* Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
@ 2010-11-02 16:09 Ista Zahn
2010-11-08 13:35 ` Konrad Hinsen
0 siblings, 1 reply; 13+ messages in thread
From: Ista Zahn @ 2010-11-02 16:09 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
Hi,
I recently upgraded to version 7.3 (from 7.01), and discovered that
org-babel-execute-buffer no longer works, returning "Wrong type
argument: consp, nil". This behavior is exists even with the simplest
of examples, such as
#+begin_src R
2+2
#+end_src
and persists even when I reduce my .emacs file down to a bare minimum of
;;Set up org mode
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
;; Enable R, latex, lisp support
(org-babel-do-load-languages
'org-babel-load-languages
'((R . t)
(latex . t)))
org-babel-execute-src_block works. If all blocks have been evaluated,
then running org-babel-execute-buffer works (even if a block has
changed), although it returns a message saying "Invalid function:
org-babel-map-src-blocks" (I don't know if this is related or not). In
other words, org-babel-execute-buffer works to update blocks that have
previously been evaluated, but fails when the buffer contains
unevaluated blocks.
This is with org version 7.3, and I get the same behavior using emacs
version 23.2.1 and emacs version 24.0.50.1
Any help will be appreciated.
Best,
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
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
0 siblings, 1 reply; 13+ messages in thread
From: Konrad Hinsen @ 2010-11-08 13:35 UTC (permalink / raw)
To: Ista Zahn, emacs-orgmode Mailinglist
On 02.11.2010, at 17:09, Ista Zahn wrote:
> I recently upgraded to version 7.3 (from 7.01), and discovered that
> org-babel-execute-buffer no longer works, returning "Wrong type
> argument: consp, nil".
I just ran into the same problem... Did you find a workaround, other than going back to some older release?
Konrad.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-08 13:35 ` Konrad Hinsen
@ 2010-11-08 13:49 ` Eric Schulte
2010-11-08 13:58 ` Konrad Hinsen
0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2010-11-08 13:49 UTC (permalink / raw)
To: Konrad Hinsen; +Cc: Ista Zahn, emacs-orgmode Mailinglist
I'm unable to re-create this problem. Could you please send a minimal
example file in which the problem occurs?
Thanks -- Eric
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:
> On 02.11.2010, at 17:09, Ista Zahn wrote:
>
>> I recently upgraded to version 7.3 (from 7.01), and discovered that
>> org-babel-execute-buffer no longer works, returning "Wrong type
>> argument: consp, nil".
>
> I just ran into the same problem... Did you find a workaround, other than going back to some older release?
>
> Konrad.
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
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
0 siblings, 2 replies; 13+ messages in thread
From: Konrad Hinsen @ 2010-11-08 13:58 UTC (permalink / raw)
To: Eric Schulte; +Cc: Ista Zahn, emacs-orgmode Mailinglist
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
On 08.11.2010, at 14:49, Eric Schulte wrote:
> I'm unable to re-create this problem. Could you please send a minimal
> example file in which the problem occurs?
Here is an example file. Open it and run org-babel-execute-buffer, and you will get "Wrong type argument: consp, nil". Then type C-c C-c on the three code blocks in order: everything works as expected. Do org-babel-execute-buffer again, and it will complain about an undefined function org-babel-map-src-blocks.
Konrad.
[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 294 bytes --]
* Vacation days
#+begin_src python :session :results silent
days = 32+2+9
#+end_src
** Vacation <2010-10-28 Thu>-<2010-10-29 Fri>
#+begin_src python :session :results silent
days -= 2
#+end_src
** Remaining days
#+begin_src python :session :results value
days
#+end_src
#+results:
: 41
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-08 13:58 ` Konrad Hinsen
@ 2010-11-08 14:21 ` Eric S Fraga
2010-11-08 14:45 ` Nick Dokos
1 sibling, 0 replies; 13+ messages in thread
From: Eric S Fraga @ 2010-11-08 14:21 UTC (permalink / raw)
To: Konrad Hinsen; +Cc: Ista Zahn, emacs-orgmode Mailinglist
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:
> On 08.11.2010, at 14:49, Eric Schulte wrote:
>
>> I'm unable to re-create this problem. Could you please send a minimal
>> example file in which the problem occurs?
>
> Here is an example file. Open it and run org-babel-execute-buffer, and you will get "Wrong type
> argument: consp, nil". Then type C-c C-c on the three code blocks in order: everything works as
> expected. Do org-babel-execute-buffer again, and it will complain about an undefined function
> org-babel-map-src-blocks.
>
> Konrad.
Data point: this fails for me as well with the same error.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.43.g10c8)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
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
1 sibling, 2 replies; 13+ messages in thread
From: Nick Dokos @ 2010-11-08 14:45 UTC (permalink / raw)
To: Konrad Hinsen; +Cc: Ista Zahn, nicholas.dokos, emacs-orgmode Mailinglist
Konrad Hinsen <konrad.hinsen@fastmail.net> wrote:
> On 08.11.2010, at 14:49, Eric Schulte wrote:
>
> > I'm unable to re-create this problem. Could you please send a minimal
> > example file in which the problem occurs?
>
> Here is an example file. Open it and run org-babel-execute-buffer, and
> you will get "Wrong type argument: consp, nil". Then type C-c C-c on
> the three code blocks in order: everything works as expected. Do
> org-babel-execute-buffer again, and it will complain about an
> undefined function org-babel-map-src-blocks.
>
Something to do with the compilation of the org-babel-map-src-blocks
macro, no doubt. I don't see it with uncompiled files.
HTH,
Nick
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-08 14:45 ` Nick Dokos
@ 2010-11-08 14:53 ` Konrad Hinsen
2010-11-14 19:13 ` David Maus
1 sibling, 0 replies; 13+ messages in thread
From: Konrad Hinsen @ 2010-11-08 14:53 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Ista Zahn, emacs-orgmode Mailinglist
On 08.11.2010, at 15:45, Nick Dokos wrote:
> Konrad Hinsen <konrad.hinsen@fastmail.net> wrote:
>
>> On 08.11.2010, at 14:49, Eric Schulte wrote:
>>
>>> I'm unable to re-create this problem. Could you please send a minimal
>>> example file in which the problem occurs?
>>
>> Here is an example file. Open it and run org-babel-execute-buffer, and
>> you will get "Wrong type argument: consp, nil". Then type C-c C-c on
>> the three code blocks in order: everything works as expected. Do
>> org-babel-execute-buffer again, and it will complain about an
>> undefined function org-babel-map-src-blocks.
>>
>
> Something to do with the compilation of the org-babel-map-src-blocks
> macro, no doubt. I don't see it with uncompiled files.
I confirm. Removing all the byte-compiled files from my org-mode directory and restarting emacs solves the problem. That's already a useful workaround, thanks!
Konrad.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
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
1 sibling, 1 reply; 13+ messages in thread
From: David Maus @ 2010-11-14 19:13 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Ista Zahn, Konrad Hinsen, emacs-orgmode Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 682 bytes --]
At Mon, 08 Nov 2010 09:45:25 -0500,
Nick Dokos wrote:
> Something to do with the compilation of the org-babel-map-src-blocks
> macro, no doubt. I don't see it with uncompiled files.
Not a solution, but some debugging showed that
`org-babel-get-src-block-info' fails to get the info of the source
block when run byte-compiled.
If I change the last sexp of the function
(when info (append info (list name indent)))
to
(if info (append info (list name indent))
(error "EMPTY INFO"))
And run byte-compiled Org, the EMPTY INFO error is thrown before the
invalid argument.
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
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
0 siblings, 2 replies; 13+ messages in thread
From: Eric Schulte @ 2010-11-18 0:07 UTC (permalink / raw)
To: David Maus
Cc: Ista Zahn, Konrad Hinsen, nicholas.dokos,
emacs-orgmode Mailinglist
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.
Best -- Eric
David Maus <dmaus@ictsoc.de> writes:
> At Mon, 08 Nov 2010 09:45:25 -0500,
> Nick Dokos wrote:
>> Something to do with the compilation of the org-babel-map-src-blocks
>> macro, no doubt. I don't see it with uncompiled files.
>
> Not a solution, but some debugging showed that
> `org-babel-get-src-block-info' fails to get the info of the source
> block when run byte-compiled.
>
> If I change the last sexp of the function
>
> (when info (append info (list name indent)))
>
> to
>
> (if info (append info (list name indent))
> (error "EMPTY INFO"))
>
> And run byte-compiled Org, the EMPTY INFO error is thrown before the
> invalid argument.
>
> Best,
> -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Footnotes:
[1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Problems-with-Macros.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-18 0:07 ` Eric Schulte
@ 2010-11-18 18:58 ` Konrad Hinsen
2010-11-19 7:46 ` Nick Dokos
1 sibling, 0 replies; 13+ messages in thread
From: Konrad Hinsen @ 2010-11-18 18:58 UTC (permalink / raw)
To: Eric Schulte
Cc: David Maus, nicholas.dokos, emacs-orgmode Mailinglist, Ista Zahn
On 18 Nov 2010, at 01:07, Eric Schulte 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.
Yes, nothing has changed: it works fine when I run from source code,
it breaks (same error message as before) if I do a "make" in my org
directory before starting emacs.
Sorry,
Konrad.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-18 0:07 ` Eric Schulte
2010-11-18 18:58 ` Konrad Hinsen
@ 2010-11-19 7:46 ` Nick Dokos
2010-11-19 8:19 ` Eric Schulte
1 sibling, 1 reply; 13+ messages in thread
From: Nick Dokos @ 2010-11-19 7:46 UTC (permalink / raw)
To: Eric Schulte
Cc: David Maus, Konrad Hinsen, nicholas.dokos,
emacs-orgmode Mailinglist, Ista Zahn
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---
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-19 7:46 ` Nick Dokos
@ 2010-11-19 8:19 ` Eric Schulte
2010-11-19 8:48 ` Konrad Hinsen
0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2010-11-19 8:19 UTC (permalink / raw)
To: nicholas.dokos
Cc: David Maus, Konrad Hinsen, emacs-orgmode Mailinglist, Ista Zahn
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
Thanks for the suggestion Nick,
I've moved the macro definition up towards the top of ob.el, and for
good measure I am now autoloading it. After this change I am able to
call both ob-execute-subtree and ob-execute-buffer without error on the
following simple Org-mode file
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example.org --]
[-- Type: text/org, Size: 132 bytes --]
* top
** first
#+begin_src emacs-lisp
(+ 1 1 1 1 1)
#+end_src
** second
#+begin_src emacs-lisp
(message "even more")
#+end_src
[-- Attachment #3: Type: text/plain, Size: 2207 bytes --]
Could you and/or Konrad let me know if this now works on your systems,
and if not could you send me an example file that exercises the error?
Thanks -- Eric
Nick Dokos <nicholas.dokos@hp.com> writes:
> 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:
>
> * 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
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Error when running org-babel-execute-buffer -- Wrong type argument: consp, nil
2010-11-19 8:19 ` Eric Schulte
@ 2010-11-19 8:48 ` Konrad Hinsen
0 siblings, 0 replies; 13+ messages in thread
From: Konrad Hinsen @ 2010-11-19 8:48 UTC (permalink / raw)
To: Eric Schulte
Cc: David Maus, nicholas.dokos, emacs-orgmode Mailinglist, Ista Zahn
On 19 Nov 2010, at 09:19, Eric Schulte wrote:
> Could you and/or Konrad let me know if this now works on your systems,
> and if not could you send me an example file that exercises the error?
It works fine now!
Thanks,
Konrad.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-11-19 8:48 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-11-19 8:19 ` Eric Schulte
2010-11-19 8:48 ` Konrad Hinsen
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).