| « Blog Critical Mass | First, quick Leopard (OS X 10.5) notes » |
I mentioned briefly [1] when I last upgraded my desktop that I wanted to switch away from the dark colour theme I use for coding and terminal use. This is important for my laptop because a light colour theme allows me to reduce the backlight more and save the aging lithium ion battery. It’s less important for my desktop, but it does have a glossy primary screen which sometimes shows reflections in the morning during the long summer days here in the Forzen North. Also, summaries of what studies show suggest that black-on-white text is more readable.
So I did. I switched Emacs and Terminal, which, while they were the only white-on-black configurations I had, are the apps I use the most. Changing Terminal was pretty easy, and the switch wasn’t half as traumatic as I feared, even though I really liked the green matrix-style theme I used. I’ve got an off-white background with very slightly blue text (#00012B). I’m still on Tiger, so I couldn’t save my old theme in case I change my mind, so I wrote it down in my .profile. (I’m planning on upgrading to Leopard in the next week or two now that the 10.5.3 update is out (I am fairly conservative on OS upgrades, in part because I hate to restart))
Emacs was a whole nother animal. Instead of 4 colours to customise, you get 432*. Confronted with this many options, the Emacs developers could have forced plugin developers to choose their colours from a standard list, or limit the work of colour selection to a few theme authors. Actually, I think they tried to do both; most modes use the same colour for comments and keywords. The problem is the edge cases; C has its own colour for preprocessor directives, HTML for headings, and Lisp for symbols, etc, etc. So the fact remains that you have to start with a colour theme created by somebody who has gone through and filled in as many of those edge cases as possible.
Problem number 2 is the way Emacs stores options: s-expressions. If you don’t know Lisp, s-expressions are a cross between XML and JSON. Emacs is an ancient open-source project, so the options GUI is a tacked-on, unusable, unreliable hack. Most people just edit the config file directly. This has the additional benefit that the config file is a convenient place to put short scripts, which you’d have to type anyway.
Normally, Emacs doesn’t even expose the individual colours; you just type (color-theme-comidia), for example. But the Aquamacs wrapper project tries to turn Emacs into a Good Mac Citizen, so it allows you to play with the fonts AND colours individually for each window or each filetype.
Unfortunately, 432 colours is way too much to dump into a human-readable config file. So Aquamacs project adds another file to the startup sequence, one that isn’t intended for human consumption. You absolutely cannot write one of these themes from scratch. Because the Emacs config GUI is still useless, the only easy way to change themes is to run (color-theme-comidia) interactively for one window and then choose “use this theme as the default mode". Easy enough, but extraordinarily unintuitive, even for the Emacs weirdos who are used to writing code in the .emacs config file to change their theme.
The final problem is that if you have syntax errors from manually mucking about this human-unreadable file, the whole thing fails to work and you drop back to the standard colour theme**. I *had* done this, so I went some aggravating trial and error in which I figured out the source of my problem and found the correct syntax. Apparently older versions of Aquamacs even generated some incorrect syntax for fringe-mode, so I had to fix that, too. This went on for hours. On a couple of machines! Emacs is one of the few open-source programs that I depend on so much that I’ll put up with this nonsense. Most programs that give me this much pain get the boot.
I ended up using the Andreas colour theme and switching away from Comidia. (I must have chosen Comidia late at night because it is the darkest, lowest contrast theme on there. Also it sounds like Maridia from Metroid) I considered Pierson, and tried to imitate for my terminal windows. Somebody at CMU has HTMLized the colour themes with example texts from various languages if you want to check out how Lisp or C looks, for example.
And now for something completely different.
Have you ever seen co-stars spelt ‘costars’? I thought it was an obscure eastern word pronounced ‘cóstər’, like Hussar or Tatar, not cóstár, the correct pronunciation. That’ll teach me to read reviews of FF7. Can you believe that game is still out-of-print?
[1] http://www.sandersn.com/journal.html, July 27
*This is specific to my setup; you may have a different number of options depending on the number of modes you have installed.
**In which all the important things are very very light and the unimportant things are bright glowing red.