6 ms·
I use Emacs for coding, wanderlust mail, rcirc and jabber-el. All which are provided as packages in the distros I run. I've been trying to get into clojure wh
by parfe 15y ago
I use Emacs for coding, wanderlust mail, rcirc and jabber-el. All which are provided as packages in the distros I run.
I've been trying to get into clojure which entails installing clojure-mode, swank-clojure, leiningen (which brings the pain of maven) and slime. This is where emacs has always broken down for me. Once I step outside the distro provided packages I find broken tutorials, unspecific versions, and instructions written like:
First install package.el.
Add to your .emacs: (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
C-x C-e to evaluate it, and you're good to go!
http://marmalade-repo.org/ http://marmalade-repo.org/
Except that didn't work in two of the three emacs installs I have. Any time I need to download an elisp file I dread reading the instructions. Too often the author forgot that he loads some other required package in his 1000 line .emacs/init.el file. Then you end up with half a set of instructions.
I think the only solution to the problem would be package maintainers providing instructions for how to install their package in a specific vanilla version of emacs from scratch with no other changes. But if they have to give up their custom emacs configs they won't be able to write up an explanation.
- astine 15y agoWhenever installing software for Emacs, it's usually worth checking ELPA http://tromey.com/elpa/ http://tromey.com/elpa/ (which comes installed on Emacs by default now,) to see if the package is there already. The ELPA provide both slime and clojure-mode and they work out of the box with swank-clojure. You'll still need to install Leiningen/Cake with swank-clojure separately, but there isn't much Emacs can do to help there.
- parfe 15y agoAh, but now you're not following the instructions provided by swank clojure which says to use marmalade (which is an elpa extension/replacement/clone/additional repository?) The clojure-mode available through elpa ( clojure-mode 1.7.x) is not new enough to deal with swank-clojure which needs 1.9.x (specifically I was after M-x clojure-jack-in) Plus, the elpa instructions don't include emacs23 because it allegedly comes with 23 (even though the elpa website does not say this). But elpa is not included in emacs 23 on Gentoo. And thus an evening of mine is lost to trying to get the same emacs environment running on my Gentoo desktop and Ubuntu laptop. Obviously my problems could be from a lack of experience with Emacs, but I hate that using a text editor is so hard. And another example is the pain of trying to build wanderlust from scratch which requires apel, flim and semi. Some of which were ONLY hosted on abandoned FTP servers. Luckily Dave Abrahams recently moved those scattered and abandoned packages to a single place https://github.com/wanderlust https://github.com/wanderlust
- eeperson 15y agoEmacs 23 does not come with ELPA installed. The next version of Emacs (24) is going to have a package manager included by default (it is based on ELPA) that will allow you to use Marmalade. If you are using Emacs 23 (which you probably are if you installed from your distro's package manager) then you should use ELPA. If you installed Emacs from a nightly build then you can use Marmalade.
- parfe 15y agoSorry, you're right. I was confused by the ELPA page which lists instructions only for emacs 21 and 22, but says elpa will be included in the next version of Emacs. (edit: now I can't find where I read this. I'm incredibly confused.) Now I'm confused about how my other installs have it working.
- evangineer 15y agoI've suffered from the same confusion, on finding that ELPA no longer worked for me with Aquamacs 2.0, I tried using the Marmalade repo with no joy. Quite frustrating as I was using ELPA in my fork of the Aquamacs Emacs Starter Kit: https://github.com/evangineer/aquamacs-emacs-starter-kit https://github.com/evangineer/aquamacs-emacs-starter-kit
- technomancy 15y agoFWIW, things go a lot more smoothly if you use GNU Emacs rather than a fork. For most elisp maintainers it's not even possible to test with Aquamacs.
- astine 15y ago"Ah, but now you're not following the instructions provided by swank clojure which says to use marmalade (which is an elpa extension/replacement/clone/additional repository?)" They seem to have changed the instructions again. The folks developing swank-clojure seem to keep changing their install strategy. Boo on them. Near as I can tell, installing from ELPA, installing swank-clojure through Leiningen, running swank-clojure through Leiningen, and calling 'M-x slime-connect' should still work. "But elpa is not included in emacs 23 on Gentoo." Holy crap, I just checked this and you're right. (The Gentoo package maintainers seem to have a problem with letting other package managers compete with their precious portage however, so I'm not surprised.) In this case, I'd suggest that the Gentoo devs should be the ones to warn you. "Obviously my problems could be from a lack of experience with Emacs, but I hate that using a text editor is so hard." I don't know what to tell you. The problems you listed aren't your fault and they're Emacs' I'd blame the package maintainers in the Gentoo episode but the Clojure stuff is because the Clojure developers still can't decide how they want their stuff to work. I can't blame them much for that. Experience would help, but I doubt that I have that much more than you. I've had similar episodes installing plugins for Eclipse.
- technomancy 15y agoELPA is no longer accepting new uploads; the maintainer has requested that everyone switch to Marmalade.
- cema 15y agoRegarding Clojure on Emacs, just use the up-to-date stuff by technomancy. The following is based on my notes from a recent talk by Phil Hagelberg at a Boston Clojure Meetup. 1. Download lein from https://github.com/technomancy/leiningen/raw/stable/bin/lein https://github.com/technomancy/leiningen/raw/stable/bin/lein 2. Launch lein (self-install) from the command line. 3. Run lein plugin install swank-clojure 1.3.0 on the command line. 4. When you first run swank, it may complain you do not have project.clj or something like that, because it expects to be launched form inside a project directory. You may create a dummy project directory (cd; lein new dummy; cd dummy). You need to run the above steps once, to install. Run the following at the beginning of a clojure session: 5. Run lein swank on the command line. 6. In emacs, run slime-connect (with the default parameters, most likely). In case I have garbled the above, I am sure someone will correct me. Although I did it both on Windows and MacOs and it worked. (On Windows, I use bash shell form the MinGW project, but I see no reason for the standard Windows shell not to work.) Separately, you may want to install clojure-mode from the same repository. Happy hacking!
- technomancy 15y agoActually the week after that meetup I realized the process could be simplified dramatically: http://technomancy.us/149 http://technomancy.us/149 Now once you have Leiningen and clojure-mode installed it's a single M-x clojure-jack-in to get started. Wish I had thought of that a week earlier! Could have saved us a lot of time at the meetup. (The way you posted still works fine, so if you've already got it set up there's no need to switch.)
- cema 15y agoI set it up twice (once at the meetup), and it was not a big deal, but only because I had had prior experience in setting up clojure environments. A single emacs function to update/start clojure seems a good way to go, however I had it in the past and as soon as the dependencies broke I had to go in and figure out what was going on under the hood and how to fix it. Which is educational but distracting. Will your setup still work in 12 months? Thanks for all the effort in bringing Clojure to the masses! :-) P.S. Got an error -- will submit a bug report. EDIT: wrote a blog comment instead.