Aquamacs, swank-clojure: clojure-jack-in returns command not found

150 views
Skip to first unread message

michele

unread,
May 22, 2011, 8:17:38 AM5/22/11
to Clojure
I have tried to find a solution to this problem, but to no avail.

According to https://github.com/technomancy/swank-clojure:

USAGE
The simplest way is to just jack-in from an existing project using
Leiningen:
Install clojure-mode either from Marmalade or from git.
lein plugin install swank-clojure 1.3.1
From inside a project, invoke M-x clojure-jack-in
That's all it takes! There are no extra install steps beyond clojure-
mode on the Emacs side and the swank-clojure plugin on the Leiningen
side.

When running the following command in Aquamacs:
M-x clojure-jack-in

I get this result:
/bin/bash: lein: command not found

I have installed Lein, but what does "From inside a project" mean? I
have a feeling I'm running the command from the wrong place, but I
don't know how to run a command in Emacs from somewhere else. I just
started to learn Emacs, which I really like (even though the
documentation how to install i.e. Clojure could be clearer).

Alex Ott

unread,
May 22, 2011, 8:34:59 AM5/22/11
to clo...@googlegroups.com
I think, that lein isn't in your search path. You can add directory
with lein script explicitly using something like:

(setenv "PATH" (concat "your-lein-dir:" (getenv "PATH")))

> --
> 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

--
With best wishes,                    Alex Ott
http://alexott.net/
Tiwtter: alexott_en (English), alexott (Russian)
Skype: alex.ott

polypus74

unread,
May 22, 2011, 5:53:20 PM5/22/11
to Clojure
although i don't think it applies to your problem,
you might also want to set emac's exec-path. the
below from my init.el, sets both using your shell
environment. i'm on cocoa emacs, not aquamacs,
it should still work for you.

(defun env-var-from-shell (varname)
(replace-regexp-in-string
"[[:space:]\n]*$" ""
(shell-command-to-string (concat "$SHELL -l -c 'echo $" varname
"'"))))

(defun setenv-from-shell (varname)
(setenv varname (env-var-from-shell varname)))

(when window-system
(setenv-from-shell "SOMESHELLVAR")
(setenv-from-shell "SOMEOTHERSHELLVAR")
(let ((path-from-shell (env-var-from-shell "PATH")))
(setenv "PATH" (concat path-from-shell ":" (getenv "PATH")))
(setq exec-path (append exec-path
(split-string path-from-shell path-separator)))))

_c

On May 22, 5:34 am, Alex Ott <alex...@gmail.com> wrote:
> I think, that lein isn't in your search path. You can add directory
> with lein script explicitly using something like:
>
>  (setenv "PATH" (concat "your-lein-dir:" (getenv "PATH")))
>
>
>
>
>
>
>
>
>
> On Sun, May 22, 2011 at 2:17 PM, michele <michelemen...@gmail.com> wrote:
> > I have tried to find a solution to this problem, but to no avail.
>
> > According tohttps://github.com/technomancy/swank-clojure:
> With best wishes,                    Alex Otthttp://alexott.net/

michele

unread,
May 25, 2011, 2:51:36 AM5/25/11
to Clojure
Thanks, that seemed to work so far.

On May 22, 2:34 pm, Alex Ott <alex...@gmail.com> wrote:
> I think, that lein isn't in your search path. You can add directory
> with lein script explicitly using something like:
>
>  (setenv "PATH" (concat "your-lein-dir:" (getenv "PATH")))
>
>
>
>
>
>
>
>
>
> On Sun, May 22, 2011 at 2:17 PM, michele <michelemen...@gmail.com> wrote:
> > I have tried to find a solution to this problem, but to no avail.
>
> > According tohttps://github.com/technomancy/swank-clojure:
> With best wishes,                    Alex Otthttp://alexott.net/

László Török

unread,
May 25, 2011, 2:56:27 AM5/25/11
to clo...@googlegroups.com

I had similar issues with Aquamacs.

It went away when I installed Phil's emacs-starter-kit before trying to install anything else.

Kudos for this great piece of bundle!

Las

sent from my mobile device

Reply all
Reply to author
Forward
0 new messages