emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Matthew Stegall <mstegall928@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Issue with org-babel-clojure evaluation returning all forms
Date: Sat, 23 Sep 2017 09:01:08 +1000	[thread overview]
Message-ID: <87377e49u3.fsf@gmail.com> (raw)
In-Reply-To: <CAGtWEAdoDwkM8s217uFXzXW0ZPyCVO45khGQ13LwGYVZ6V96Gw@mail.gmail.com>


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	other threads:[~2017-09-22 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  2:04 Issue with org-babel-clojure evaluation returning all forms Matthew Stegall
2017-09-22 23:01 ` Tim Cross [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87377e49u3.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mstegall928@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).