The Curse & Cure of Emacs

written by André Gawron, 20. November 2011

As I realized that my favorite IDE dropped Ruby support, I started looking around for a new one which I can use for my private projects (currently written in Ruby) and my work (so far PHP). While I was looking desperately around in the IDE jungle, chopping the bloated software, I got caught in a trap layed out by spartan looking editors - Vim and Emacs. Once I realized what happend, I found myself in the middle of the Holy War between those two. Soon after the discovery I was forced to make a decision - learning both editors is just too time consuming. I tried both and - in the end - sided with Emacs. Why, I hear you ask? They offered me more virgins in the heaven - but seriously, how can you deny that? Anyway, I felt more productive with Emacs. The different modes in Vim did never appealed to me; I never got used to them.

As you might know there are tons of comics on the Holy War and on Emacs itself. Some of them even got implemented in Emacs shortly after they appeared1. I don't care about that kind of stuff. While it's funny to read and follow, it's my productivity that matters in the end.

The cool thing about Emacs2 is that it grows with every day you use it and it will never stop doing that unless you stop growing by yourself. Don't get me wrong, to get started with Emacs is hard, the learning curve is steep and the normal way of doing things doesn't unfortunately apply to Emacs. The key bindings for "easy" stuff like Copy & Paste or saving a file are different than modern conventions. Some of Emacs' key bindings are bogus nowadays and totally uncomfortable but most of them are not3. As soon as I got familiar with configuring Emacs I made up my own bindings which fit me more. This also included mapping arrow keys for buffer-navigation4 and after a couple of tweaks here and there, I really enjoyed using Emacs. I was productive.

Emacs Keybindings

For quite some time though5 I feel bad every time I have to move my right hand to the arrows. Why? I don't care about the time I spent moving my hand back to execute a command, what bothers me though is my increased failure in typing the correct key shortly afterwards. It happens to me all the time: I mistype and have to start all over again. After I gave it some thought, two possibilites to address the problem came to my mind:

The second point will definitively impact my productivity negatively for a while since I have to relearn a lot of things which are basically programmed into my mind. But I planned to redo my current Emacs configuration anyway and start from scratch: personal key bindings, functions found on the internet, required modules etc - everything's currently in my dotemacs. And yea, it's getting messy in there.

There was a post on HackerNews explaining "Why Emacs?" and I liked it. It also mentions a Emacs 246 starter package with some better defaults and improved programming-modes6. The best thing though7: it deactivates the arrow keys. This could help me in getting my head around the Emacs navigating shortcuts.

But things don't stop there. I'm also thinking of incorporating an IRC and mail client into my Emacs configuration8 so I have a proper setup everywhere I go9. I'm not really sure if I should do it though because I might get distracted by IRC and stuff. Have to think about that a little bit more or I could just try it and see how it works. Guess I'll go with the latter. I bet in a couple of days or weeks, I find (or learn) something else about Emacs which I want to include in my configuration. It's just a matter of time. Until then, I'll try to focus on actually doing stuff ... brb, there was some cool mode ...

On a little sidenote: I just found out about

emacs --daemon and emacsclient -c / -t

Awesome. I will make use of that in the future as well. See? There's always something to discover. It feels like birthday all day long and the best of it, you also grow alongside your Emacs knowledge.

  1. go and try it out: M-x butterfly
  2. and Vim as well I guess
  3. actually, they are also wide spread: terminals are making use of them
  4. if the frame is showing more windows
  5. and since I hardly use the mouse anymore
  6. yet to be released
  7. sadly, no improved php-mode which the author says, is one of the worst modes available for Emacs and he's right
  8. reason for this blog post
  9. .emacs and .emacs.d are in a Git-repository