Is there a quick way to connect clojure swank and slime to quickly replace emacs?

I have a question:

When I use emacs with clojure and elein (leiningen extension), I write my code inside the file, then I need to connect to swang, I type "elein swank" and open conexion ... 2 step) I open a repl ... 3 ) I print slime-connect (and press y twice) 4) this step is really annoying: I need to use my file or change the namespace ...

so far so good .. the problem is that there is a small error inside my file (maybe parentheses), now I insult my code and I repeat all the steps ... again !!

it is really annoying for me, I really like emacs, I used it for a long time and the best editor, but compare it to netbeans (I try it today ... It's nice, but its repl suck ...) with netbeans I need just one click to complete all these steps ...

I can click "upload file" and it will upload my file inside repl ... seriously !! and if I click the alias / file link in NS, open repl and change the namespace ... so good

now..my the question is, if it is possible to create a command inside emacs, than to do everything..maybe, and it would be very nice .. command, than open a replica and upload my file or my ns ... it would be great ... it's possible ? ... does someone do this? .. thanks

Thanks so much for a nice day!

+4
source share
3 answers

elein-swank should automatically connect to the backup database after starting it for you. Recently, a bug was fixed that prevented this for some versions of swank-clojure, so you can upgrade your version of elein.el to the latest version.

You can use elein-reswank to restart the server and connect to it if necessary.

Once it starts, Cc Ck will compile and load the .clj file into the backend. Cc Cz flip you to REPL from any source clojure source.

We hope that these tips will help simplify your experience. Emacs / slime is a really good working environment, so hold on to it if you can !:-)

+6
source

Why do you need to restart everything if you made one typo? You just need to run lein swank once and connect to swank using slime-connect ... And then you can download and evaluate your code as you wish. To (reload) a file, you can use the slime-load-file command, which is bound to Cc Cl ...

You can also watch the Mx clojure-jack-in command from the new clojure -mode ...

PS I personally spent amazing sessions all day (and sometimes several days) without leaving it, writing down new code, evaluating it, etc.

+2
source

You might want to try swank-clojure if you haven't already.

With swank-clojure, you simply Mx clojure-jack-in and load the REPL. If you call it from the project.clj file, it makes all the namespaces of your project accessible. It takes a few seconds to get started, but after that it is very simple, and you do not need to reboot.

+2
source

All Articles