Go check it out, it's got other stuff that's important, will walk you through the basics of developing with Emacs and Cider, etc.Technologies must be operated and maintained in accordance with Federal and Department security and NOW, go check out the tutorial on clojure-docs.įinally, you're at a point where the TUTORIAL from clojure-doc should work just fine. If everything worked out, you should see a clojure repl buffer open in Emacs. So long as it doesn't error out, give it some time. Likely there will be a long delay while everything boots up. Now to test that everything is working correctly. Ensure that everything works by attempting to start Cider Repl This should open GUI Emacs with your projects clj file loaded. Now using the terminal, cd into your projects directory, close Emacs if you have it open, and then enter: Test Launch GUI Emacs with the script from within your Project Folder, with a File Argument The chmod command makes the script executable. The script launches the GUI version of Emacs, adding to it whatever file parameter you enter after it. Now, in the terminal, (assuming your in the directory /usr/local/bin) enter the follwing: usr/local/Cellar/emacs/24.4/Emacs.app/Contents/MacOS/Emacs it to /usr/local/bin (I saved it as emacsw as I said), so, /usr/local/bin/emacsw. I named it emacsw and it uses the exact installation of Emacs that brew created: They don’t offer this in their Emacs tutorial, but work with me, you’ll be glad to have everything run the way it’s supposed to. I found it was necessary to do this, despite the “fix” they gave on clojure-docs (which didn’t work). So, what we’re going to do is create an executable shell script to launch the GUI version of Emacs, from the command line (which will need to be cd’d into our Clojure Projects directory when we launch it). The correct PATH is not transferred, and if you try to run cider it will tell you as much (it won’t be able to find lein). There’s an issue with starting Emacs from the Applications folder, and then opening a project. The next bit will save you some aggrivation, and make life easier. As of this writing, version 0.8.1 is current. While this won’t keep things from working, you’ll get a warning as to what version of cider is current, and how the version number for cider-repl doesn’t match it. I found that clojure-doc was a bit behind the times, showing a cider-nrepl as 0.7.0. We need to add a line below it, so modify project.clj to the following: Note the last line with the keyword :dependencies. (defproject command-line-args "0.1.0-SNAPSHOT" This should create something like the following project.clj file: The one they use is as good as anything else, so, using leiningen: With this done, you’ll need a basic project to test with. Remembering, of course that on the Mac, the Meta-key is OPTION.Ĭreate a Basic Leiningen Project to test with If you happen to be editing the file in Emacs, after you’ve got it entered, evaluate the buffer: #Aquamacs emacs license installInside the file init.el enter, or add the following:Įssentially, what this does is first add an additional package repository, then install the packages for using Clojure, if they aren’t already installed. If you don’t, create it (directory too, if it is’t in your home directory (mind the leading dot.). Next: Check to see if you have: ~/.emacs.d/init.el. Clicking it will open the GUI version of Emacs. After it successfully runs, you’ll have a link in your Applications folder called, “Emacs”. To make sure we’re on the same page, just rename Emacs.app to something else, like EmacsCocoa.app or whatever, then re-run the second brew command to link the Emacs distribution you just installed with brew to your Applications folder. NOTE If you already have Emacs in your Applications folder, the second brew command will fail. I might mess with Aquamacs at some future point, but for now, let’s just stick with Emacs proper. Frankly, I lost interest after the initial try, and just went with the emacs build for OSX. I was not able to easily get Aquamacs to work. I had mixed results following The clojure-doc tutorial for Emacs, and found I had to do a few modifications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |