I'm trying to set up babel for use with Clojure according to http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html#org85bc1ec and I can evaluate code but when I evaluate a block with multiple forms in it it outputs all of the form like so

#+begin_src clojure :results value
  (def small-map {:a 2 :b 4 :c 8})
  (:b small-map)

: #'user/small-map4

I'm using cider for the back as given in the tutorial and I'm not getting any errors just unwanted input.

I don't think anything in my Emacs config should effect this but I can post if needed.

I've used the debugging tools to go through cb-clojure.el and found that the nrepl-sync-request:eval result dictionary list the output of all of the form in value without any separator so I'm guessing that its something with the nrepl tools. I'm running the most up to date version of cider from melpa.

1 Answer 1


To get the result of the last sexp in a block use the following argument in the header: :results value pp.

To evaluate using cider withing the code block, bind cider-eval-last-sexp within org in your .emacs as follows:

(org-defkey org-mode-map "\C-x\C-e" 'cider-eval-last-sexp)

further more for documenation use:

(org-defkey org-mode-map "\C-c\C-d" 'cider-doc)

Look at Frederick Giasson's blog for a great walkthrough, including 'async' and tangling code. There are a couple more entries about cider in org mode there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.