I tried updating org alone, but I evidently caused a mishmash of old and
new elisp file versions that didn't work. So I built Emacs from the trunk
branch (emacs-version 24.3.50.1), and blended Org from the master branch to
get Cider. According to package-list-packages, I am using cider 20140125.
(1) Is it still possible for a Clojure code block to accept an org table as
an argument?
#+tblname: columnar-stuff
| State | Bird |
| New York | Eastern Bluebird |
| New Jersey | Eastern Goldfinch |
| Connecticut | Penguin |
#+name: read-columnar-s(rows=columnar-stuff)
#+begin_src clojure :exports both :results pp
(let [headings (first rows)]
(map #(zipmap headings %) (rest rows)))
#+end_src
#+RESULTS: read-columnar-s
: CompilerException java.lang.RuntimeException: Unable to resolve symbol:
rows in this context, compiling:(NO_SOURCE_PATH:1:165)
(2) There was a thread last March about emitting nice Org tables from code
blocks. (https://groups.google.com/d/msg/clojure/71MEGeYiUKA/tf6rYdfvXrwJ)
Is it still possible to emit a nice Org table from a Clojure code block? I
copied from the March example, but the results section does not look right,
and after M-x org-latex-export-to-latex, LaTeX gets stuck on an "Undefined
control sequence":
#+begin_src clojure :exports both :results value raw
(with-out-str (print-table [{:a 1 :b 2 :c 3} {:b 5 :a 7 :c "dog"}]))
#+end_src
#+RESULTS:
"\n| :a | :c | :b |\n|----+-----+----|\n| 1 | 3 | 2 |\n| 7 | dog | 5
|\n"
(3) I would also like to pretty-print expressions, so the results would fit
in LaTeX margins. How can I do that with ob-clojure? ":results pp" gives
a result reminiscent of the above flattened table.
#+begin_src clojure :exports both :results pp
(def birds [["State","Bird"]
["New York", "Eastern Bluebird"]
["New Jersey", "Eastern Goldfinch"]
["Connecticut", "Penguin"]])
birds
#+end_src
#+RESULTS:
: "[[\"State\" \"Bird\"]\n [\"New York\" \"Eastern Bluebird\"]\n [\"New
Jersey\" \"Eastern Goldfinch\"]\n [\"Connecticut\" \"Penguin\"]]\n"
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.