* bug in org-babel emacs-lisp output?
@ 2014-08-22 16:35 John Kitchin
0 siblings, 0 replies; only message in thread
From: John Kitchin @ 2014-08-22 16:35 UTC (permalink / raw)
To: emacs-orgmode
I have noticed a possible bug in the output of src blocks, especially
for emacs-lisp blocks.
This block works fine.
#+BEGIN_SRC emacs-lisp :results raw
'(nil ("a" . "b"))
#+END_SRC
#+RESULTS:
(nil (a . b))
This block however, gives me an error that is due to nil being the first
element of the list.
#+BEGIN_SRC emacs-lisp
'(nil ("a" . "b"))
#+END_SRC
#+RESULTS:
gives this error:
org-babel-insert-result: Args out of range: #<killed buffer>, 0, 1
A traceback shows:
Debugger entered--Lisp error: (args-out-of-range #<buffer *temp*> 0 1)
orgtbl-to-orgtbl((nil ("a" . "b")) (:fmt (lambda (cell) (format "%s" cell))))
org-babel-insert-result((nil ("a" . "b")) ("value" "replace") ("emacs-lisp" "'(nil (\"a\" . \"b\"))" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "replace value") (:session . "none") (:hlines . "yes") (:colnames . "no") (:result-type . value) (:result-params "value" "replace") (:rowname-names) (:colname-names)) "" nil 0 #<marker at 95 in test.org>) nil 0 "emacs-lisp")
org-babel-execute-src-block(nil)
org-babel-execute-src-block-maybe()
org-babel-execute-maybe()
org-babel-execute-safely-maybe()
run-hook-with-args-until-success(org-babel-execute-safely-maybe)
org-ctrl-c-ctrl-c(nil)
funcall-interactively(org-ctrl-c-ctrl-c nil)
call-interactively(org-ctrl-c-ctrl-c nil nil)
command-execute(org-ctrl-c-ctrl-c)
Another example that fails:
#+BEGIN_SRC emacs-lisp :results value
'('(nil nil) ("a" . "b"))
#+END_SRC
orgtbl-format-line: Wrong type argument: listp, "b"
But, this works
#+BEGIN_SRC emacs-lisp :results value
'((nil . "c") ("a" . "b"))
#+END_SRC
#+RESULTS:
| (nil . c) | (a . b) |
It seems like the issue is that the output does not go into a table too
well, and the error is a formatting one. Maybe this error should be
caught, and a default of raw should be output when a table cannot be
made? right now my workaround is specifying the :results raw when I hit
these situations, but it doesn't seem right.
--
-----------------------------------
John Kitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-22 16:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 16:35 bug in org-babel emacs-lisp output? John Kitchin
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).