[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] bug in org-babel emacs-lisp output?
From: |
John Kitchin |
Subject: |
[O] bug in org-babel emacs-lisp output? |
Date: |
Fri, 22 Aug 2014 12:35:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] bug in org-babel emacs-lisp output?,
John Kitchin <=