emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Issue with org-babel-clojure evaluation returning all forms


From: Tim Cross
Subject: Re: [O] Issue with org-babel-clojure evaluation returning all forms
Date: Sat, 23 Sep 2017 09:01:08 +1000
User-agent: mu4e 0.9.18; emacs 25.3.1

It is quite likely an issue due to changes in cider. Cider from melpa
gets a lot of updates and is a fast moving target.

IMO cider is not the best back end to use with org. You are probably
better off using inf-clojure. The cider back end has a lot of complexity
to support repl driven development which really complicates matters when
your just wanting to get clojure blocks evaluated and results back. The
inf-clojure back end is much simpler and undergoes less change, so is
more stable.

Personally, I'm not using this functionality in org. I found the
complexities of trying to get clojure blocks to work in this way was way
too high once you tried to do anything more than very simple statement
evaluation. I now use a more traditional literate programming approach
where I maintain the code in org files, but tangle the whole file to get
a clj/cljs file, which is what is loaded into the repl. 

regards,

Tim

Matthew Stegall writes:

> 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)
> #+end_src
>
> #+RESULTS:
> : #'user/small-map4
>
> I'm using cider for the back end 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'm also using org-plus-contrib as I the default org installation doesn't
> allow me to evaluate clojure blocks, saying it can't find slime.
>
> 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 it may be something with cider, I'm
> running the latest version from melpa-stable.
>
> If any other information is needed, let me know and thanks in advance for
> any help.


-- 
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]