Aquamacs on OSX for Ruby on Rails Development? Yep, we’re going Emacs status.
Published: December 16th, 2008If there’s anything programming geeks have been famous for, it’s ugly wars between programming editors. We’re going to step into this dangerous turf and take a look at the Emacs side of the war.
It’s funny, the Ruby community follows the mentality of “the cool kid” at school that always set the trends. I mean seriously, let’s just take a look at the past really fast… “Hey, I use Textmate in my screencast, look at me”, BAM! Everyone uses Textmate for years. “Hey, look at me, I use GIT - screw SVN!”, everyone starts using GIT. Ruby trend setters are always the best, right? Nginx, Mongrel, and proxying through Apache was never popula… and I’m just a person that happens to blog about cartoons… Ya, no.
Anyway, my point has been proven, and guess what the latest trend is? Every popular Rubyist in the world is starting to use Emacs, and even more apparent is the fact that most of them are on a Mac. I find it funny because previous to the Ruby on Rails development scene, these people most likely did not own a Mac. Heck, I admit it myself, the only reason I bought a Mac over two years ago was just for Textmate1.
Well, since the bandwagon effect is so fun – guess who’s on board? Yep, I’m trying out the Emacs train. Now to retain some of my dignity, I was actually practicing Emacs/VIM about three months ago before the fad hit, so I don’t feel too guilty.
So far, I’ve tried out both Aquamacs and Carbon Emacs and I’m not sure which one to stick with. They both have this “full screen functionality” which I adore so much – if you’re familiar with WriteRoom, think of it like that. Except cooler, because it’s code.
If anyone has any tidbits on the “vs” between those two packages I’d really appreciate it.
Here’s a list of resources that I’ve found to help me so far in my Aquamacs journey to Ruby/Rails/Haml/Javascript and “coolness”.
- Aquamacs - A port of Emacs onto OSX with native key bindings and other native support.
- Full Screen Mode for Aquamacs (hides OSX toolbar, etc)
- Carbon Emacs - similar to Aquamacs but less bloated and apparently ‘purer than Aquamacs’.
- Anything.el - Quicksilver for Emacs, yeah, you just read that right. Check it out. (quicksilver)
- Defunkt’s emacs config’s
- “JS2″ mode by Steve Yegge – nuff’ said.
- Rinari - Ruby on Rails mode for Emacs
- Inline GIT inside Emacs - it’s cool as heck.
- Textmate Snippets for Emacs - 90% compatible with “native typed Textmate snippets”.
- HAML for Emacs
- Textmate mode for Emacs developed by Defunkt. (Awesome stuff you’re used to from Textmate)
That’s what I’ve been playing around with so far. If anyone has any other resources to add, I’ll update the blog post with such.
I’m also trying to figure out how to “theme” my emacs the way I want. So far, I have not had a good run in making it look as good as I want, and of course, the way code looks is vastly the most important thing in the world – ha. I’d really love to see what people have done with their environment. Please share some screenshots if you have the spare minute or two!
p.s I opened a ‘tumblr’ if anyone wants to take a look at my quick thoughts and other personal ramblings. http://afischythought.com
edit 1 hour later: updated with Defukt’s “textmate.el” minor mode.
edit 12 hours later: updated HAML minor mode url

In the sentence “Every popular Rubyist in the world is starting to use Emacs”, the last person you linked to was Jamis Buck. Jamis actually switched over to vim and wrote some code for it to ease the transition from TextMate.
I wrote the Git article that probably got the most Rubyists up onto Git months before Github was a twinkle in the eyes of its beholders.
I also am just trying out Emacs because…
A) Mr. Peepcode presented a great case
B) Its the only *nix editor I haven’t tried or mastered
C) The control is just insane.
I also don’t sport a fancy emo hair style, listen to “Rock” music or vote Democrat…. Thanks for the great article Mr. Obvious.
I just posted a WikiVS comparison at .
And here I was, thinking that every popular Rubyist was turning back to vim… I guess Emacs is the new Textmate.
And for the vim users out there, there’s [MacVim](http://code.google.com/p/macvim/)!
The latest haml-mode is bundled in the Haml git repo at http://github.com/nex3/haml/tree/master/extra/haml-mode.el.
I’d agree with you there is a little bit of a cattle-herd mentality at times within the community. However one of the things that really drew me to Ruby, Rails and the people involved, was the earnest desire to simply get stuff done. I think it’s always worthwhile to occasionally re-evaluate your methods and tools to see if there’s a better way.
Cheers,
Alex
Hrmm. I tried emacs in 1997. Didn’t like it.
Ha: “Every popular Rubyist in the world is starting to use Emacs” is made of 6 links, 2 of which are to people declaring their intention to use vim.
Is this a test to see if we actually read what you wrote? :-)
you should post some video examples of the awesomeness of which you claim
Wait… it’s cool to use emacs? And I thought I was being counter-counter-culture :(
It’s nice to see the Ruby community selecting a tool that is not mac-only. I have almost bought a mac several times because I thought I was missing something not being able to run textmate on linux.
I too have been using emacs for the past few weeks after seeing Topfunky’s preview. I think he’s over-customized emacs and so I didn’t use his dotfiles, but I’ve been loving it so far… great for RSI prevention b/c of the elimination of track-pad usage most of the time.
I’m glad there are more users to the Emacs scene. I just hope there isn’t a flood of articles by Ruby bloggers about how Emacs > vi or whatever like there was for git vs. svn.
Just use the tool you enjoy, you don’t need to evangelize it for the rest of the world.
Well, I knew about the VIM posts, however I still thought it’d be interesting to share – mainly because they of the common theme of diverging from Textmate.
And although those people decided to use VIM, they DID play with Emacs.
Thanks for the update on the HAML mode, I’ll update the post now.
it’s cool that more people are starting to use emacs…maybe we’ll start to see some of the functionality that makes SLIME so awesome for coding lisp popping up for ruby. with more ruby coders hacking emacs, I think we’ll end up with a far more powerful coding environment then is possible with textmate (closed source, only one or two people who can really extend the core platform etc)
It may be getting a little out of date now, but I wrote a few posts about getting up and running with Emacs for Rails a while back. It was aimed at a total newbie which I was at the time in both Rails and Emacs - http://sodonnell.wordpress.com/the-emacs-newbie-guide-for-rails/
Nimai, exactly. I’m excited for Emacs being adopted just for the fact that if it does become the standard, it’s an open source standard that can turn into a pretty awesome environment.
Great collection of links. I think I am going to jump onto the bandwagon unless TextMate 2.0 is released soon.
I was the 577th person to purchase textmate, so I think to I am entitled to some bandwagon jumping this time round :)
Actually, I was arguing against using old editors like Emacs. TextMate is my jam.
That “following the latest fad” thing has an ungood resemblance with the PHP community. And, how small are your projects that you can live with a Text Editor (be it Textmate, VIM, Emacs, etc.)?
I still prefer an IDE with step-through debugging, refactoring, etc. to any text editor, and with Netbeans, we have a very usable, well-maintained IDE for Rails.
http://afischythought.com/post/65516356/carbon-emacs-vs-emacs-app
Beware of installing Carbon Emacs. It’s the lame version of Emacs.app
*sigh*.
It’s really refreshing to see people using tools that they can actually hack on a deep level. The way rubyists have accepted the hands-off-you-only-get-to-touch-the-bundles-section mentality of Textmate is pretty disturbing.
As for your question of implementations, I don’t use OS X, but I would recommend trying out the Cocoa build of Emacs 23. I don’t know if it has full-screen features (IMHO that should be handled by your WM, but not much you can do about that on a Mac) but it’s got tons of new features over the Carbon version, and it’s compatible with the vast majority of elisp libraries out there, unlike Aquamacs.
Funny you say that Phil, I was spending about 5 hours last night figuring out how to use your starter script properly. Haha, I went through so many issues it’s ridiculous.
One thing was that I couldn’t get the blackboard theme to load from the submit-to-elpa directory, so eventually I just manually loaded it in my user.el (which I didn’t even realize you could do initially) I would recommend putting that in the Installation read me or FAQ. I believe Jeff Hodges may have committed some patches towards you. We were talking a long time about Emacs for OSX on the #emacs channel.
I really *do* want the full screen. That’s why I initially went with Aqua and or Carbon Emacs. Hopefully Emacs.app (Cocoa Build) can support it…
[...] a comment » So it seems the Rails community is looking at alternative editors. This post by Daniel Fischer gives a pretty good overview. I have to say I approve. Not that TextMate isn’t good. It is. But it’s very cool for [...]
Thanks for the feedback. I kind of tossed blackboard in there for kicks; I think it’s missing the requisite autoloads. I will definitely expand the readme to mention user and system specific configs.
As for full-screen, Emacs doesn’t provide it normally because that’s something a WM should do, but I guess it is necessary sometimes to work around the shortcomings of the host OS.
I have used Emacs for Ruby/Rails programming, and I think that is really awesome! I have some customization and modes for Rails programming at http://github.com/tchandy/emacs-rails/tree/master, if you can take a look :-)
Cheers
Hi Daniel! How have you beeN?
[...] Fischer’s blog post did quite a bit to pique my curiosity and upon return from my holiday, I bought and watched the [...]
If there’s one Emacs feature that bugged me in TextMate, it would be file navigation.
Yes, this sounds like a simple thing, but as Rails developers we’re always working with a couple dozen files. Command-T was a big step in that direction, but it only works with filenames, not paths. If you type index.html, you end up with a list of 20 index files and no way to quickly get to the one you want.
Ditto with opening a bunch of tabs and moving between them.
I don’t deny that Emacs has some rough edges and is hard to learn at first. But I love being able to easily get to any file with a few keystrokes.
Add in the ability to customize or override nearly any keypress and it’s not hard to understand why it’s still around 30+ years later.
Emacs’ navigation doesn’t just shine when finding files or buffers, but when generating text as well. When I am using a web page text area like this one, doing things like reformatting a paragraph, changing the order of some words, capitalizing a word, recasting an entire paragraph because the last thing should, I now realize, be the first thing, etc. — all of this can be accomplished w/o taking my fingers from the keyboard. Oh, and auto-abbreviations save me from a lot of teh misspellings.
Until recently, support for new programming languages has been a little slow in coming, but that’s been remedied significantly in the last year or so.
As long as *I* can use emacs, you can use whatever you want. And actually, I quite *like* Carbon Emacs, what specific gripes are there about it? I’ve forgotten now why I didn’t like Aqua-emacs, but I do remember using it for a bit before switching to Carbon Emacs.
Ready. Set. Go.
In terms of the formatting, you're allowed to use markdown, textile, or basic html; it's truly up to you -- what strikes your fancy?
You don't have to worry about your e-mail address being sold to a russian-spam-mafia. I'm only going to use it for my own weird needs; like asking you out for a date on a lonely night of coding.