Tag: emacs


Emacs vs Eclipse

Steve Yegge has yet another very long, but hugely informative post up: The Pinocchio Problem. It’s all about what makes great software. Or at least, less-bad software.

One of the things he touches on is Emacs and Eclipse extensions, when compared to Firefox.

The very best plug-in systems are powerful enough to build the entire application in its own plug-in system. This has been the core philosophy behind both Emacs and Eclipse.

Recently (the last 6 months), I’ve been doing almost exclusively Java work, and pretty much exclusively in Eclipse. Before that, I was a die hard Emacs user. Why switch? Well, trying to develop Java code without the help of an IDE is like pulling teeth, basically. Eclipse is an astonishing piece of software, but I’d hesitate to call it “good”. Least-bad is a far better moniker.

But I’m really concerned about the extensions. In Emacs, when you want to extend it, you have to write some lisp code. It sounds scary, but Emacs goes out of its way to make this as easy as possible. Whenever you ask for help on a keystroke, there’s a little link to the source code. You can quickly learn how something works by reading the code for how similar things work. Then, when it comes to actually writing some code, Emacs has a handy interactive mode where you can type code in, run it and see what it does. It’s a real pleasure to use.

Eclipse, being based on Java, goes out of it’s way to make your life difficult. When you want to write an add-on, there is no simple way to see the source code for any of the existing bits. First you have to create a plugin-project. Then diddle the classpath to see which bits of Eclipse you want to extend (Which bits do you need? It’s probably documented on the vast and rambling eclipse.org website somewhere).

Then it’s code writing time. Eclipse tries very hard to make Java palatable by compiling as you type. But it’s still ugly. And what code to write? Well, the “New plugin project” wizard probably made you some examples, if what you were doing was close enough to one of the seven or eight things that the authors thought of.

And how do you run this code you’ve written? Fire up a second copy of eclipse, along with a new workspace. Yes, that’s right, another several hundred Mb of memory just to test-run an extension. Genius, folks. Sheer genius.

Not that this situation has me annoyed at all. I even bought a book to try and understand the process (side note: what is it with all the frames, eclipse people? Pay a designer already). I got about a third of the way through before realising that I wasn’t prepared to even contemplate the herculean effort involved in writing plugins.

The whole experience has left me realising quite how powerful Emacs is. Sure it has it’s flaws (no lexical variables in elisp), but it’s just so much easier to use than Eclipse, it’s scary.

A Month of Mac

It’s now been a month since my shiny new Mac arrived. Overall, I’m still really, really happy with it. I’ve bought NetNewsWire for feed reading and textmate for editing. I’m a little concerned that I don’t have the source code for my editor, but we’ll see how that goes.

I’m normally a devout Emacs or Vim user, but Aquamacs turned out to be just too different, despite what Tim Bray says about it. Carbon Vim was a bit better, but still felt a little clunky. TextMate just felt right, and after the recommendations from the rails people, it seemed like a good idea.

The main irritation that I’ve been having is with the keyboard. Apple keyboards don’t come easily to UK Unix users. The tilde is in the wrong position to start with (it’s been swapped with backslash), and I find myself continually hitting the wrong one. Worse is the fact that there’s no hash key on the keyboard in the UK layout. Oh all right, you can hit ⌥-3, but that pastes into the shell as UTF-8 meaning that you can’t comment things out properly in Vim. Why? I have no idea. But it’s meant that I’ve stuck to the US keyboard layout for now, which sucks.

By far and away the worst problem, though is the simple fact that you can’t copy CDs easily. The damned machine comes with a CD burner. It should be a piece of cake to say “take the bits off of this one, then right them on to this blank disk instead”. But no. The only option is to import into iTunes (converting into MP3) and then write the low-fi tracks out from iTunes again. With a 2-second gap between tracks. That really, badly sucks. Particularly when I found out that a previous version of OSX used to come with a “disk copy” utility. Thanks a bunch, Apple.


TRAMP is a tool for Emacs to let you edit files on another computer, using only an ssh connection. It rocks, as it lets me edit files at work from my laptop at home. Behind the scenes, there’s some serious voodoo going on, encoding and decoding files on the fly, transferring them to the appropriate place and so on. But it’s all 100% transparent.

But what’s really made my jaw drop is that it integrates correctly with vc-mode. I have a file that’s checked in to RCS on the remote machine. Without thinking I hit the checkout button to start editing the file. And it worked! I totally wasn’t expecting that. But it’s damned useful.

In summary, if you use Emacs, you need TRAMP.


I’ve just opened up a new command shell, without thinking about it. Inside an Emacs session. Which is running inside GNU screen. Which is running inside Putty. Transparent? Clear as mud.