Clojure in Emacs Seemingly Impossible
Greetings, I would greatly appreciate any guidance on where to find a working and complete set of instructions for how to set up Emacs with swank- clojure. I am in Ubuntu. I have followed exactly every step of the instructions on this page http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and also (with a fresh install of Emacs) the version using Git in the comment on that page by Martin Blais. With both methods, when I execute "M-x clojure-jack-in", the message "Starting swank server" appears and hangs. Swank never starts, the message never changes, and I don't see any error messages anywhere (not sure where to look, maybe I'm missing them?). I really would like to use Clojure for a significant project, but if I can't get the dev environment working I'm hosed. Also, if I can't get Emacs going, would anyone suggest an alternative development tool? (I know there are lots, but I don't know which to try first). Thank you very much. Best regards, Curran -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
This was quite helpful for me. http://technomancy.us/149 On Sat, Sep 10, 2011 at 1:29 PM, Curran wrote: > > Greetings, > > I would greatly appreciate any guidance on where to find a working and > complete set of instructions for how to set up Emacs with swank- > clojure. I am in Ubuntu. > > I have followed exactly every step of the instructions on this page > http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > also (with a fresh install of Emacs) the version using Git in the > comment on that page by Martin Blais. With both methods, when I > execute "M-x clojure-jack-in", the message "Starting swank server" > appears and hangs. Swank never starts, the message never changes, and > I don't see any error messages anywhere (not sure where to look, maybe > I'm missing them?). > > I really would like to use Clojure for a significant project, but if I > can't get the dev environment working I'm hosed. > > Also, if I can't get Emacs going, would anyone suggest an alternative > development tool? (I know there are lots, but I don't know which to > try first). > > Thank you very much. > > Best regards, > Curran > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@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+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Follow these instructions, it will work.. http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html On 11 September 2011 10:15, Brian Mosley wrote: > This was quite helpful for me. > http://technomancy.us/149 > > On Sat, Sep 10, 2011 at 1:29 PM, Curran wrote: > > > > Greetings, > > > > I would greatly appreciate any guidance on where to find a working and > > complete set of instructions for how to set up Emacs with swank- > > clojure. I am in Ubuntu. > > > > I have followed exactly every step of the instructions on this page > > http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > > also (with a fresh install of Emacs) the version using Git in the > > comment on that page by Martin Blais. With both methods, when I > > execute "M-x clojure-jack-in", the message "Starting swank server" > > appears and hangs. Swank never starts, the message never changes, and > > I don't see any error messages anywhere (not sure where to look, maybe > > I'm missing them?). > > > > I really would like to use Clojure for a significant project, but if I > > can't get the dev environment working I'm hosed. > > > > Also, if I can't get Emacs going, would anyone suggest an alternative > > development tool? (I know there are lots, but I don't know which to > > try first). > > > > Thank you very much. > > > > Best regards, > > Curran > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@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+unsubscr...@googlegroups.com > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@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+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- *"Know everything about something, and something about everything" -- Dame C.V. Wedgwood, English historian (1910-1997)* -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
There should be an initiative to built own ide, look at Java history, it become popular when good ide with debugers, docs, highlighting and refactoring appeared. Clojure should have such ide, my vote right now is for clooj, since this is the only one ide written in supported language itself. Just combine your achivments like paraedit, syntax hihglighment, debbuger to put it in clooj. Look at #F also is a nice languge and it is still evloving but one think it is already ahead, it has good ide. On commercial grounds #F seems to be more mature. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Hi Curran, I made this video for hacking Overtone with Emacs: http://vimeo.com/25190186 However, Overtone can just be viewed as an example project - it's really just a description of how to get a working Clojure/Emacs setup. Sam --- http://sam.aaron.name On 10 Sep 2011, at 18:29, Curran wrote: > Greetings, > > I would greatly appreciate any guidance on where to find a working and > complete set of instructions for how to set up Emacs with swank- > clojure. I am in Ubuntu. > > I have followed exactly every step of the instructions on this page > http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > also (with a fresh install of Emacs) the version using Git in the > comment on that page by Martin Blais. With both methods, when I > execute "M-x clojure-jack-in", the message "Starting swank server" > appears and hangs. Swank never starts, the message never changes, and > I don't see any error messages anywhere (not sure where to look, maybe > I'm missing them?). > > I really would like to use Clojure for a significant project, but if I > can't get the dev environment working I'm hosed. > > Also, if I can't get Emacs going, would anyone suggest an alternative > development tool? (I know there are lots, but I don't know which to > try first). > > Thank you very much. > > Best regards, > Curran > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@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+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
As an avid Emacs user - don't bother. If you just want a no hassle environment that supports Clojure development use Clooj. Steps - 1) Download 2) Double-click https://github.com/arthuredelstein/clooj David On Sat, Sep 10, 2011 at 1:29 PM, Curran wrote: > Greetings, > > I would greatly appreciate any guidance on where to find a working and > complete set of instructions for how to set up Emacs with swank- > clojure. I am in Ubuntu. > > I have followed exactly every step of the instructions on this page > http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > also (with a fresh install of Emacs) the version using Git in the > comment on that page by Martin Blais. With both methods, when I > execute "M-x clojure-jack-in", the message "Starting swank server" > appears and hangs. Swank never starts, the message never changes, and > I don't see any error messages anywhere (not sure where to look, maybe > I'm missing them?). > > I really would like to use Clojure for a significant project, but if I > can't get the dev environment working I'm hosed. > > Also, if I can't get Emacs going, would anyone suggest an alternative > development tool? (I know there are lots, but I don't know which to > try first). > > Thank you very much. > > Best regards, > Curran > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@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+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
+1 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
I don't know why an error message doesn't show, but the swank clojure readme explains a fallback method (lein swank + M-x slime-connect) that you could try. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
I use Emacs for virtually everything, but have found that Emacs +Clojure is less than idea when working with multiple threads (like hosting and running a Jetty server). I believe this is mostly related to how Java and Emacs+Slime handles input/output redirection. I went crazy trying to figure out what output went where, and have settled with running Clojure outside of Emacs for the cases where I need to do server like / threading like things where I need to log to stdout/ stderr. In my case, outside Emacs means a simple "lein repl". YMMV. Thanks, Marius K. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On 11 Sep 2011, at 16:37, kjeldahl wrote: > I use Emacs for virtually everything, but have found that Emacs > +Clojure is less than idea when working with multiple threads (like > hosting and running a Jetty server). I believe this is mostly related > to how Java and Emacs+Slime handles input/output redirection. I went > crazy trying to figure out what output went where, and have settled > with running Clojure outside of Emacs for the cases where I need to do > server like / threading like things where I need to log to stdout/ > stderr. In my case, outside Emacs means a simple "lein repl". In Overtone we have threads coming out of our ears. However, I don't really have a problem with monitoring output. I use Emacs + cake, and all output for the current REPL process end up in the REPL within Emacs and the output for all other threads ends up in .cake/cake.log which I just simply tail in a separate (tiled) terminal. I'm pretty sure lein has a similarly sensible approach for dealing with output from the non-REPL threads. Sam --- http://sam.aaron.name -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Yes, I had better success with cake (when I used it). But with the lein setup, I believe most of it goes into a swank buffer of some sort, which also contain a lot of other (non-related) output, and exactly where in that buffer it also ends up seems a bit undeterministic. But again, just my experiences, in case others experience similar issues. Thanks, Marius K. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On Sun, Sep 11, 2011 at 9:09 AM, kjeldahl wrote: > with the lein setup, I believe most of it goes into a swank buffer of some > sort, which also contain a lot of other (non-related) output, and > exactly where in that buffer it also ends up seems a bit > undeterministic. I think it's consistent. It should always go to the stdout of the lein swank process if it's from a thread other than the one hooked into the slime repl. If you started it with M-x clojure-jack-in, that will be the *swank* buffer. It sounds like this isn't really what you want though. Would it be better if every time a new connection opened from Emacs it caused the root value of *out* to change? -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Have you looked at the *swank* buffer? Maybe your's is looking differently than mine, but there's lots of stuff that I did not but there, and which I would not have there. My issues with this is related to running servers and catching debug output from it while it is running (yeah, I really should use a log file, but that's another topic). When I tried doing this from within Emacs, it became a detective hunt trying to figure it all out (and I probably never did). When I run it in a normal shell (lein repl), everything works as expected, and all threads output to the console they way I would expect. I wrote more details about it in the following post to this list: http://groups.google.com/group/clojure/browse_thread/thread/55849f0296530de8/9f2ca18530a4e28c?lnk=gst&q=kjeldahl#9f2ca18530a4e28c I'm no expert, but if I had to choose between getting all output in a file, or some output in the repl buffer and some in *swank*, I would prefer the former (which is what I believe cake actually does). Having said all this, I'm still thankful for your work, and my mention of this issue is just to try to help others who are just getting started. Thanks, Marius K. On Sep 11, 11:23 pm, Phil Hagelberg wrote: > On Sun, Sep 11, 2011 at 9:09 AM, kjeldahl > > wrote: > > with the lein setup, I believe most of it goes into a swank buffer of some > > sort, which also contain a lot of other (non-related) output, and > > exactly where in that buffer it also ends up seems a bit > > undeterministic. > > I think it's consistent. It should always go to the stdout of the lein > swank process if it's from a thread other than the one hooked into the > slime repl. If you started it with M-x clojure-jack-in, that will be > the *swank* buffer. > > It sounds like this isn't really what you want though. Would it be > better if every time a new connection opened from Emacs it caused the > root value of *out* to change? > > -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On 11 Sep 2011, at 22:42, kjeldahl wrote: > > I'm no expert, but if I had to choose between getting all output in a > file, or some output in the repl buffer and some in *swank*, I would > prefer the former (which is what I believe cake actually does). Used from within Emacs, cake places all output from the REPL thread into the Slime REPL buffer and output from all other threads into .cake/cake.log So perhaps this isn't exactly what you want… Sam --- http://sam.aaron.name -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On Sun, Sep 11, 2011 at 2:42 PM, kjeldahl wrote: > Have you looked at the *swank* buffer? Maybe your's is looking > differently than mine, but there's lots of stuff that I did not but > there, and which I would not have there. Everything in there is output from lein jack-in. Much of it is elisp, since Leiningen spits out the elisp that's needed to bootstrap a connection. But it is consistent. (In 1.3.3 it will need a lot less elisp.) On top of the root value of *out* (which is always stdout of lein), each swank thread necessarily must bind *out* to a writer connected to the slime socket, otherwise the repl wouldn't get hooked up. > My issues with this is related to running servers and catching debug > output from it while it is running (yeah, I really should use a log > file, but that's another topic). When I tried doing this from within > Emacs, it became a detective hunt trying to figure it all out (and I > probably never did). When I run it in a normal shell (lein repl), > everything works as expected, and all threads output to the console > they way I would expect. > > I wrote more details about it in the following post to this list: > > http://groups.google.com/group/clojure/browse_thread/thread/55849f0296530de8/9f2ca18530a4e28c?lnk=gst&q=kjeldahl#9f2ca18530a4e28c > > I'm no expert, but if I had to choose between getting all output in a > file, or some output in the repl buffer and some in *swank*, I would > prefer the former (which is what I believe cake actually does). Putting *all* output in a file (so nothing is visible in the repl) is never going to be the default behaviour. The question is whether swank should use alter-var-root instead of binding to change the value of *out*. I don't personally work with any multithreaded programs that don't use a logging framework, so I haven't run into this myself, but it seems like as long as you're not relying on the stdout of the process it might be better to use the alter-var-root approach, at least when swank is launched via lein. Does that sound helpful? -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On Sat, Sep 10, 2011 at 10:29, Curran wrote: > I would greatly appreciate any guidance on where to find a working and > complete set of instructions for how to set up Emacs with swank- > clojure. I am in Ubuntu. > > I have followed exactly every step of the instructions on this page > http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > also (with a fresh install of Emacs) the version using Git in the > comment on that page by Martin Blais. With both methods, when I > execute "M-x clojure-jack-in", the message "Starting swank server" > appears and hangs. Swank never starts, the message never changes, and > I don't see any error messages anywhere (not sure where to look, maybe > I'm missing them?). I do believe that is the same error I recently hit. To use `clojure-jack-in` you need a quite recent version of the `lein-swank` plugin. You *also* need to make sure that nothing else on the load path has an older version. That means anything in your current project, *and* any either leinengein plugins. (I got bitten be the later.) You need to see ";;; proceed to jack in" output from `lein jack-in 1234` for that all to work together. This was tricky to diagnose, and the bundled version in the other plugin stumped me for quite some time. Daniel -- ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Hi Curran, I'm in the process of learning Clojure and emacs as well and have run into a bit of difficulty as well, though I have a slightly different problem. I grabbed the 23.3 version of emacs from their ftp site and did NOT use the emacs starter kit. I discovered that the version of package.el that came with the emacs starter kit (at least the non git pulled one) was not playing nice with a few things. So instead, I just copied the package.el from the marmalade website and followed the instructions there (http://marmalade-repo.org). Once package.el and marmalade were set up (package.el in my ~/.emacs.d folder, and the appropriate load code in my ~/.emacs file), I was ready to load clojure-mode. Just do: M-x package-refresh-contents M-x package-install And when prompted, type in clojure-mode and hit enter. That should install clojure-mode for you. And then finally, if you want to use clojure-jack-in, make sure you have both leiningen and the swank- clojure plugin installed. Leiningen was pretty easy to install, just go to https://github.com/technomancy/leiningen and follow the instructions. Once leiningen is installed and set in your $PATH, then you can install the swank-clojure plugin. lein plugin install swank-clojure "1.3.2" Now that you have leiningen, you can create a simple project with 'lein new my_clj_project', and it will generate a skeleton project for you. Since leiningen uses some Maven under the covers, it uses the maven-style convention of putting your source code under the src folder, and your namespaces are named starting from that path directory. Once you have a simple clojure file, you can try out the swank server. In emacs, you "visit" a file: C-x C-f And in the minibuffer, you can type the path to your file (it has some nifty code completion). Or if you prefer, you can hit C-F10 to open the menu bar (if it's not there already), and just click Open and browse to your file. Once the file is open in a buffer in emacs, now you can try to connect to swank. M-x clojure-jack-in If all goes well, you should see the swank server start up on port 4005 and you will have a REPL to play in. There should be a buffer called *swank* with messages from the swank server if it connected or not. My problem however is that I can't seem to load my namespace(s) into the swank REPL. I tried C-c C-l, but that only seemed to load some definitions from my namespace (it didn't load any of my (defrecords ...) I noticed). I tried in the REPL to do a (use 'my_project.myfile), but that still didn't appear to load anything from my namespace. Not being able to load namespaces from my leiningen project makes the swank REPL nearly useless to me. I can easily start a REPL through the command line with just the clojure jar or with the clojure plugin for jEdit. I suppose I could highlight all my code and eval it, but that seems silly. But anyway, hope that helps some. And, now a shameless plugfeel free to drop by my little blog site http://underaboddhitree.blogspot.com. It's a little of everything, but mostly geared towards python and my learning experience with clojure. I think that most blogs you see come from the Clojure masters...but sometimes I think they may have lost sight of a new clojurian's experience. I have no lisp background, except a 3 week crash course on lisp in my AI class in college several years ago. I also have zero experience with emacs except the last 2 weeks or so. Nor am I a functional master in any regard, and Clojure is the first functional language I have started to learn. But for me, the reward is worth the challenge. On Sep 10, 11:29 am, Curran wrote: > Greetings, > > I would greatly appreciate any guidance on where to find a working and > complete set of instructions for how to set up Emacs with swank- > clojure. I am in Ubuntu. > > I have followed exactly every step of the instructions on this > pagehttp://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > also (with a fresh install of Emacs) the version using Git in the > comment on that page by Martin Blais. With both methods, when I > execute "M-x clojure-jack-in", the message "Starting swank server" > appears and hangs. Swank never starts, the message never changes, and > I don't see any error messages anywhere (not sure where to look, maybe > I'm missing them?). > > I really would like to use Clojure for a significant project, but if I > can't get the dev environment working I'm hosed. > > Also, if I can't get Emacs going, would anyone suggest an alternative > development tool? (I know there are lots, but I don't know which to > try first). > > Thank you very much. > > Best regards, > Curran -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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 c
Re: Clojure in Emacs Seemingly Impossible
Greetings, Wow, thank you all so much for the insightful responses to my inquiry! I really appreciate the supportive community. I developed a small web app in Clooj over the weekend and was very impressed by it! A very cool idea to write the IDE for the language, in the language, with the essential powerful and useful features and no cruft at all. Nice tool! @Michael Jaaka I like your attitude toward this - that when there is an effective IDE tailored to the language, then the language will flourish, and that Clooj in the future could play the same role for Clojure as Eclipse and Netbeans did for Java (in making it accessible and usable for a generation of programmers). I haven't touched Clojure for about a year and I am so impressed with all that has happened in it's development since then. It is a technology with a bright future for sure! I will keep battling with the Emacs setup, thanks again for the support. Best, Curran On Sep 11, 5:13 am, Sean Toner wrote: > Hi Curran, > > I'm in the process of learning Clojure and emacs as well and have run > into a bit of difficulty as well, though I have a slightly different > problem. I grabbed the 23.3 version of emacs from their ftp site and > did NOT use the emacs starter kit. I discovered that the version of > package.el that came with the emacs starter kit (at least the non git > pulled one) was not playing nice with a few things. So instead, I > just copied the package.el from the marmalade website and followed the > instructions there (http://marmalade-repo.org). > > Once package.el and marmalade were set up (package.el in my ~/.emacs.d > folder, and the appropriate load code in my ~/.emacs file), I was > ready to load clojure-mode. Just do: > > M-x package-refresh-contents > M-x package-install > > And when prompted, type in clojure-mode and hit enter. That should > install clojure-mode for you. And then finally, if you want to use > clojure-jack-in, make sure you have both leiningen and the swank- > clojure plugin installed. Leiningen was pretty easy to install, just > go tohttps://github.com/technomancy/leiningen and follow the > instructions. Once leiningen is installed and set in your $PATH, then > you can install the swank-clojure plugin. > > lein plugin install swank-clojure "1.3.2" > > Now that you have leiningen, you can create a simple project with > 'lein new my_clj_project', and it will generate a skeleton project for > you. Since leiningen uses some Maven under the covers, it uses the > maven-style convention of putting your source code under the src > folder, and your namespaces are named starting from that path > directory. > > Once you have a simple clojure file, you can try out the swank > server. In emacs, you "visit" a file: > > C-x C-f > > And in the minibuffer, you can type the path to your file (it has some > nifty code completion). Or if you prefer, you can hit C-F10 to open > the menu bar (if it's not there already), and just click Open and > browse to your file. Once the file is open in a buffer in emacs, now > you can try to connect to swank. > > M-x clojure-jack-in > > If all goes well, you should see the swank server start up on port > 4005 and you will have a REPL to play in. There should be a buffer > called *swank* with messages from the swank server if it connected or > not. > > My problem however is that I can't seem to load my namespace(s) into > the swank REPL. I tried C-c C-l, but that only seemed to load some > definitions from my namespace (it didn't load any of my > (defrecords ...) I noticed). I tried in the REPL to do a (use > 'my_project.myfile), but that still didn't appear to load anything > from my namespace. Not being able to load namespaces from my > leiningen project makes the swank REPL nearly useless to me. I can > easily start a REPL through the command line with just the clojure jar > or with the clojure plugin for jEdit. I suppose I could highlight all > my code and eval it, but that seems silly. > > But anyway, hope that helps some. And, now a shameless plugfeel > free to drop by my little blog sitehttp://underaboddhitree.blogspot.com. > It's a little of everything, but mostly geared towards python and my > learning experience with clojure. I think that most blogs you see > come from the Clojure masters...but sometimes I think they may have > lost sight of a new clojurian's experience. I have no lisp > background, except a 3 week crash course on lisp in my AI class in > college several years ago. I also have zero experience with emacs > except the last 2 weeks or so. Nor am I a functional master in any > regard, and Clojure is the first functional language I have started to > learn. > > But for me, the reward is worth the challenge. > > On Sep 10, 11:29 am, Curran wrote: > > > > > > > > > Greetings, > > > I would greatly appreciate any guidance on where to find a working and > > complete set of instructions for how to set up Emacs with swank- > > clojure. I am in Ubun
Re: Clojure in Emacs Seemingly Impossible
> > Also, if I can't get Emacs going, would anyone suggest an alternative > development tool? (I know there are lots, but I don't know which to > try first). > > I use IntelliJ IDEA with La Clojure and Leiningen plugin. I usually create a skeleton project with leiningen on the command line, then create an empty project from scratch in IntelliJ IDE and you're ready to go. It is really neat and IntelliJ has also Emacs keybinding if you want. - Finn -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
My recollection of how cake did it was probably wrong. As for how I would like to have it, I would like to have all output from all threads appear in the emacs repl buffer, similar to how it behaves in "console" mode, and that is what I haven't figured out how to do or found any workaround for, except not running it from an emacs repl. Assuming that is not easy, or even possible, right now, I'll stick with a simple repl console for the server/threaded stuff. Thanks, Marius K. On Sep 12, 12:06 am, Phil Hagelberg wrote: > Putting *all* output in a file (so nothing is visible in the repl) is > never going to be the default behaviour. The question is whether swank > should use alter-var-root instead of binding to change the value of > *out*. I don't personally work with any multithreaded programs that > don't use a logging framework, so I haven't run into this myself, but > it seems like as long as you're not relying on the stdout of the > process it might be better to use the alter-var-root approach, at > least when swank is launched via lein. Does that sound helpful? > > -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
+1 On Sep 11, 4:04 pm, David Nolen wrote: > As an avid Emacs user - don't bother. If you just want a no hassle > environment that supports Clojure development use Clooj. Steps - > > 1) Download > 2) Double-click > > https://github.com/arthuredelstein/clooj > > David > > > > On Sat, Sep 10, 2011 at 1:29 PM, Curran wrote: > > Greetings, > > > I would greatly appreciate any guidance on where to find a working and > > complete set of instructions for how to set up Emacs with swank- > > clojure. I am in Ubuntu. > > > I have followed exactly every step of the instructions on this page > >http://dev.clojure.org/display/doc/Getting+Started+with+Emacs, and > > also (with a fresh install of Emacs) the version using Git in the > > comment on that page by Martin Blais. With both methods, when I > > execute "M-x clojure-jack-in", the message "Starting swank server" > > appears and hangs. Swank never starts, the message never changes, and > > I don't see any error messages anywhere (not sure where to look, maybe > > I'm missing them?). > > > I really would like to use Clojure for a significant project, but if I > > can't get the dev environment working I'm hosed. > > > Also, if I can't get Emacs going, would anyone suggest an alternative > > development tool? (I know there are lots, but I don't know which to > > try first). > > > Thank you very much. > > > Best regards, > > Curran > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@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+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/clojure?hl=en- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On Sep 10, 9:48 pm, Kugathasan Abimaran wrote: > Follow these instructions, it will > work..http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html > Sadly, the instructions break right where it says: Add the following: (defproject test-project "0.1.0" :description "Test Project" :dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]] :dev-dependencies [[swank-clojure "1.2.1"]]) It isn't clear to me if that should be added *after* the (defproject... at the beginning of project.clj, or in place of the default (defproject..., but in any case I tried both ways. I always get the following error: Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0- master-SNAPSHOT.pom from clojars Downloading: org/clojure/clojure-contrib/1.2.0-SNAPSHOT/clojure- contrib-1.2.0-SNAPSHOT.pom from clojars Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0- master-SNAPSHOT.jar from clojars Downloading: org/clojure/clojure-contrib/1.2.0-SNAPSHOT/clojure- contrib-1.2.0-SNAPSHOT.jar from clojars An error has occurred while processing the Maven artifact tasks. Diagnosis: Unable to resolve artifact: Missing: -- 1) org.clojure:clojure:jar:1.2.0-master-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.clojure - DartifactId=clojure -Dversion=1.2.0-master-SNAPSHOT -Dpackaging=jar - Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.clojure - DartifactId=clojure -Dversion=1.2.0-master-SNAPSHOT -Dpackaging=jar - Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.apache.maven:super-pom:jar:2.0 2) org.clojure:clojure:jar:1.2.0-master-SNAPSHOT 2) org.clojure:clojure-contrib:jar:1.2.0-SNAPSHOT Try downloading the file manually from the project website. ... I'm brand new to clojure and really want to get it working according to this tutorial, and its a shame to have to stop after I've gotten this far. I'd really appreciate any advice on how to get this working. TIA. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On Sat, Oct 29, 2011 at 10:54 PM, mdave wrote: > On Sep 10, 9:48 pm, Kugathasan Abimaran wrote: >> Follow these instructions, it will >> work..http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html >> > > Sadly, the instructions break right where it says: Those instructions are badly out of date. Please try the official documentation: https://github.com/technomancy/swank-clojure -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Definitely take Phils advice and use the instructions on the github site. I just setup a fresh emacs install from scratch (using Phils starter-kit http://technomancy.us/153 and it works flawlessly; and I'm new to emacs this week). mdave - Your dependencies are way old, try this instead. (defproject test-project "0.1.0" :description "Test Project" :dependencies [[org.clojure/clojure "1.2.1"]] :dev-dependencies [[swank-clojure "1.3.3"]]) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
Which is exactly the problem with Clojure in Emacs. There are N sets of instructions out there, and N-1 of them are out of date. And even the Nth one is incomplete. "Step 1: Install clojure-mode either from Marmalade or from git." What if you don't know how to do that? So you click through to the 'Marmelade' site. Step 1: "First install package.el" with a link to package.el and no other info. Initially I ran into issues trying to get it set up, and finally I just decided to run 'lein repl' and just edit in emacs. This is a little inconvenient though. I finally got it working yesterday, and then after about five minutes of using it, it just sort of stopped working. No clue why. Back to 'lein repl' in an attempt to get something useful done for the afternoon. Step 1: In case anybody reads this; I think I did this, although this will no doubt become out of date. ;-) Download package.el from the marmelate site. Do not download the other one. Create an .emacs.d directory under your home dir, and save package.el there. Then add the following to your .emacs file in your home dir. (add-to-list 'load-path "~/.emacs.d/") (require 'package) (add-to-list 'package-archives '("marmalade" . "http://marmalade- repo.org/packages/")) (package-initialize) On Oct 30, 5:34 pm, Phil Hagelberg wrote: > On Sat, Oct 29, 2011 at 10:54 PM, mdave wrote: > > On Sep 10, 9:48 pm, Kugathasan Abimaran wrote: > >> Follow these instructions, it will > >> work..http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html > > > Sadly, the instructions break right where it says: > > Those instructions are badly out of date. Please try the official > documentation: > > https://github.com/technomancy/swank-clojure > > -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
On Sun, Oct 30, 2011 at 5:43 PM, Bill Robertson wrote: > Which is exactly the problem with Clojure in Emacs. There are N sets > of instructions out there, and N-1 of them are out of date. And even > the Nth one is incomplete. "Step 1: Install clojure-mode either from > Marmalade or from git." Do you find the clojure-mode readme sufficient? https://github.com/technomancy/clojure-mode/blob/master/README.md Maybe Clojure wiki should just point to that so it's all in one place. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure in Emacs Seemingly Impossible
I've never seen that. Good stuff there. Yes, I agree that the wiki should refer to that page. Thanks! On Oct 30, 8:47 pm, Phil Hagelberg wrote: > On Sun, Oct 30, 2011 at 5:43 PM, Bill Robertson > > wrote: > > Which is exactly the problem with Clojure in Emacs. There are N sets > > of instructions out there, and N-1 of them are out of date. And even > > the Nth one is incomplete. "Step 1: Install clojure-mode either from > > Marmalade or from git." > > Do you find the clojure-mode readme sufficient? > > https://github.com/technomancy/clojure-mode/blob/master/README.md > > Maybe Clojure wiki should just point to that so it's all in one place. > > -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en