You will need to install the following packages: clojure-mode, swank-clojure, slime, slime-repl
On 23 November 2011 09:04, Andrew <ach...@gmail.com> wrote:
> I should add that I am starting with a working setup (able to M-x
> clojure-jack-in and compile and execute stuff in the REPL as expected).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
**********************************************************
Andreas Koestler, Software Engineer
Leica Geosystems Pty Ltd
270 Gladstone Road, Dutton Park QLD 4102
Main: +61 7 3891 9772 Direct: +61 7 3117 8808
Fax: +61 7 3891 9336
Email: andreas....@leica-geosystems.com
************www.leica-geosystems.com*************
when it has to be right, Leica Geosystems
Please consider the environment before printing this email.
--
Make sure you have
(require 'ob-clojure)
in your controlling emacs file (mine is <username>.el).
-ck
On Nov 23, 12:00 pm, Andrew <ache...@gmail.com> wrote:
> Here's my attempt at following the steps athttp://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html. *The
> result is org-babel-execute-src-block: No org-babel-execute function for
> clojure *
>
> 1. The recommendation was to follow "Connecting with SLIME" from
> https://github.com/technomancy/swank-clojurewhich involves M-x
> slime-connect, so I looked for that in
> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html...
> It has a section called "Server/Set up Leiningen project.clj file" which
> says add a dev-dependency in my project.clj file for leiningen/lein-swank.
> So I picked [leiningen/lein-swank "1.2.0-SNAPSHOT"]
> 2. lein deps
> 3. lein swank
> 4. It said I should add swank-clojure as a dev-dependency too. So I
> picked [swank-clojure "1.4.0-SNAPSHOT"]
> 5. lein deps
> 6. lein swank
> 7. M-x slime-connect ... connected
> 8. open tmp.org file and place cursor within a block of code and do C-c
> C-c
> 9. Evaluate this block of code on your system? y
...
:dependencies [[org.clojure/clojure "1.3.0"]]
:dev-dependencies [[jline "0.9.94"]
[swank-clojure "1.3.0" :exclusions [org.clojure/
clojure]]]
...
and my current ~/.emacs.d/elpha folder contains
clojure-mode-1.11.4/
clojure-test-mode-1.6.0/
durendal-0.2/
org-20111123/
slime-20100404.1/
slime-repl-20100404/
swank-clojure-1.1.0/
using Phil Hagelberg's emacs-starter-kit (https://github.com/
technomancy/emacs-starter-kit).
I would also like to point to this excellent blog by Nurullah Akkaya
http://nakkaya.com/2010/12/12/using-clojure-with-org-babel-and-inferior-lisp/
for using org-babel-clojure with inferior-lisp.
Hope that helps.
-ck
The swank-clojure elisp package is deprecated and should not be used.
> Why does your elpa directory have 1.1.0 and your project file have 1.3.0?
swank-clojure.el was hard-coded to use Clojure 1.1.0 way back in the
day, which is part of the reason it's deprecated.
-Phil
This requires Org mode version 7.7.
I mostly use inferior-lisp mode instead of SWANK/SLIME.
-S
Tim Daly
It's so old it predates GitHub: http://stuartsierra.com/software/perl-in-lisp
-S
http://hg.bortreb.com/abomination/
http://hg.bortreb.com/aurellem/
http://hg.bortreb.com/cortex/
I use some emacs scripts to automate tangling and weaving.
http://hg.bortreb.com/org-tools/
http://hg.bortreb.com/repl/
sincerely,
--Robert McIntyre
(setq package-archives
'(("original" . "http://tromey.com/elpa/";)
("gnu" . "http://elpa.gnu.org/packages/";)
("marmalade" . "http://marmalade-repo.org/packages/";)))[1] http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00629.html
> I found [1] from Eric Schulte which says to add certain package
> archives such that ELPA finds swank-clojure... But what about the
> swank-clojure elisp package being deprecated?
swank-clojure.el is definitely deprecated, but there could still be code
out there in the wild depending upon it. If that's the case then a bug
should be opened for that package.
-Phil
Yes, clojure-test-mode uses both slime-eval and slime-eval-async; he
should pick one of these like so:
(defun clojure-test-eval (string &optional handler)
(slime-eval-async `(swank:eval-and-grab-output ,string)
(or handler #'identity)))
(defun clojure-test-eval-sync (string)
(slime-eval `(swank:eval-and-grab-output ,string)))
Actually swank:interactive-eval-region and friends are not elisp
functions; they are Clojure functions.
-Phil