From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: Issue with org-babel-clojure evaluation returning all forms Date: Sat, 23 Sep 2017 09:01:08 +1000 Message-ID: <87377e49u3.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvWwi-0007jT-5i for emacs-orgmode@gnu.org; Fri, 22 Sep 2017 19:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvWwh-00026I-4A for emacs-orgmode@gnu.org; Fri, 22 Sep 2017 19:01:20 -0400 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]:47697) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvWwg-00025l-TX for emacs-orgmode@gnu.org; Fri, 22 Sep 2017 19:01:19 -0400 Received: by mail-pg0-x22e.google.com with SMTP id d8so1310313pgt.4 for ; Fri, 22 Sep 2017 16:01:17 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Matthew Stegall Cc: emacs-orgmode@gnu.org 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