Archive for April, 2007

Emacs 22

This weekend I upgraded to Emacs 22 from rawhide. This was painless — and thank goodness, since the new gnus updated my setup, so there is no going back. So far it looks awesome.

Gnus is noticeably faster. That alone was worth the upgrade.

Now that emacsclient supports --eval I went ahead and configured Mozilla to use Emacs for mailto: URLs — no more avoiding those. There’s a HOWTO here.

There’s a new image-viewing dired-like mode. That’s kind of silly but I imagine I will end up using it.

diary-from-outlook-gnus looks like a cute addition. There’s also some icalendar code in there. I don’t calendar much, and I doubt that anybody sends me outlook-formatted appointments. Too bad, really; machine-readable things like this are, one supposes, part of the basic promise of computers.

These are just a few random things I noticed… the NEWS file is 200k, and this is a major release. I haven’t really had an opportunity to use it in anger.

Emacs Update

I know you couldn’t possibly get bored by another Emacs post.

Emacs is really the one thing I come back to when I want to hack joyfully. Other things are interesting or relevant, but I find Emacs fun.

How could I have missed goto-address for so long? This command will buttonize URLs in a buffer; I enable it by default in change-log-mode, but I’m considering just enabling it globally. It isn’t perfect — it doesn’t recognize URLs as you type. But this is probably fairly easy to fix, and in the meantime it is still handy.

Second, my calendar (really appointment) code to use the notification area worked for the first time today. This is still a bit fragile, I don’t quite know what is going on. But, it does mean I am very close to not ever using Evolution. (Speaking of which I finally set things up so I can easily send email from my various personal accounts via Gnus. This was an incredible pain, involving writing elisp functions, etc. No wonder this stuff is so unpopular.)

I wrote a little hack over the weekend to emulate the Gnome sticky notes applet. This was pretty simple, a couple hundred lines of lisp. But, I didn’t like the result very much. Instead I think I am going to finally upgrade to Emacs 22 (which is something of a pain since I’m using some RPMs that aren’t updated) and use linkd, which looks pretty cool.

Work proceeds on package.el, but it isn’t quite ready for the next release.

I’ve been working steadily on project.el, a way to encapsulate project-specific settings in a simple data structure. The idea is, a project like GCC can publish a set of settings, and when you hack on that project, Emacs will automatically set the correct C style, correct new-file copyright template, correct tabs setting, etc. I’ve seen various projects do this already — they publish little .el files, usually bad ones, for their users. I really don’t understand why this functionality isn’t already in Emacs… right now everyone has to roll their own.

ELPA Update

I rewrote the ELPA web page the other day. Now it should be clearer about how to get your Emacs Lisp packages into the archive. I’ve also added a news section and uploaded a few more useful major modes.

Emacs Lisp package authors, please send me your code. I will upload it right away (I have an Emacs macro to upload a single .el file to ELPA directly from Gnus :-).

This code has already made my life nicer… I installed modes for javascript and CSS (for my js game) on both my machines in a few seconds.

Cool GCC Patch

This is the most intruiging GCC patch I’ve seen for a while. It adds a customizable static checker to GCC, based on the mygcc work. I haven’t read the patch yet, or tried it out, and it went by on the list with little fanfare… much less than it deserves. Static analysis in the compiler has great potential.

Cool Emacs Trick

I looked around for valgrind integration into Emacs recently but I didn’t see anything out there. I had a great idea! — compilation-mode should integrate with shell-mode so I can run valgrind and then next-error will walk through the problems.

Well, it turns out this idea is so great that it has been implemented already. Yay Emacs! Unfortunately the feature is rather obscure; I had to dig around in the source to find it, and it wasn’t obvious that it handled valgrind — it does, but the valgrind error regexp is the same as one for the JVM, so it is misleadingly named “java”.

To enable this, enable compilation-shell-minor-mode in your shell-mode buffer. It will automatically start highlighting the appropriate messages, and mouse-2 will go to the source file.

I’m pretty happy about this idea of using shell mode in this way. It has that nice, integrated, “plastic” feeling I’ve come to associate with the joy of Emacs. I’ve always liked the idea of a “notebook-like” shell, where commands and structured, or even graphical, output are intermixed; this feels a little like that

What’s left? Two things I think… first, Emacs should automatically enable this minor mode when you type “make”, “valgrind”, “ant”, etc, in a shell mode buffer; meanwhile I’m just going to enable this from the mode hook.

Second, I think it would be awesome if running gdb in shell mode somehow auto-started Emacs’ gdb mode. I generally find it a pain to start (but not use) gdb in Emacs, since typically I have a complicated setup on the command line — a particular directory, command line, sometimes an environment; Emacs could simplify this. I wrote a minor mode last night that will recognize when you type “gdb” in the shell and will automatically run it in Emacs instead… I’ll post it soon, or send email if you want it.


Last week was the Conference on World Affairs. I generally try to make it to a few sessions, but this year it overlapped with other plans. I even missed the movie (Chinatown), though Ebert was out sick, so it probably wasn’t as entertaining as usual.

Still, I did manage to make it to a few of the bigger sessions on Friday.

First I saw Tim Wirth (former senator from Colorado) talk about global warming. Usually this topic depresses me and makes me want to gaze carefully at the several colors of angst. Wirth did a reasonable job of reframing the topic from depression and powerlessness to opportunity. One practical thing he mentioned was getting state legislatures to let local utility companies get the same RoI for efficiency efforts that they do for building new power plants; he said Idaho has the model program here.

After leaving the senate, Wirth stayed involved in politics, pursuing various things, like global warming, that seemed important to him. I wonder what that sort of career must be like.

Next was Joe Biden. He gave what I would describe as a stump speech. I thought he did a pretty good job (he had the best speaking skills of the people I saw), and was even inspiring toward the end. He also answered a bunch of questions; that was pretty interesting. Also, he quotes Seamus Heaney.

Finally came Paul Krugman, giving the Molly Ivins memorial lecture (she was a regular at CWA). He was interesting and entertaining, though I think he didn’t really say much that you couldn’t read in his columns.

In all it was a great way to spend an afternoon; the content was ok, but also just getting out into a non-electronic community for a while was nice. Also I’ve been needing a change of scenery as a way to stretch a bit and reinvigorate my creativity. This helped.

Lost in La Mancha

Elyn doesn’t really enjoy documentaries, so I don’t watch them as often as I’d like. However, Steve and Chrissy came over the other night, and as far as I can tell they only watch documentaries, so we ended up watching Lost in La Mancha.

This movie records Terry Gilliam’s attempt to film his version of Don Quixote. It turns out to be a comedy of errors, and most of the emotional hooks in the movie are laughs at the absurdity of their situation; otherwise the movie failed to connect.

Content-wise what impressed me the most was the seeming lack of knowledge that Gilliam had about his own enterprise. He didn’t know the status of contracts, there was a huge oversight in location choice, etc… I would have liked to have seen more about how these failures came to be.

In sum this was an interesting — but not gripping — behind-the-scenes look at a failed film.

Web App Musings

Recently I’ve been tinkering with my little Javascript game (not quite ready for public release, sorry), and other web apps.

While aspects of Javascript suck, and the platform variance definitely sucks, it is a reasonable language overall. Given current implementations I think it still would not be my language of choice for writing a big application — even my customized Google home page makes the web browser crawl — but I suppose with the commoditization of JIT technology this can be fixed.

Offline access seems like a new frontier for these apps, and I was pleased to read about the Dojo Offline Toolkit via Dan Moore’s blog.

I’m also interested, somewhat independently, in this idea of running applications on local web proxies. I suppose the cool kids all do this kind of thing with greasemonkey instead, though.

Unfortunately web apps seem like a step backward for free software. As far as I know most of the existing ones aren’t really open source — and since in large part they are running on my computer, they really ought to be.

Whither Movies?

Benjamin has been asking me about my mini movie reviews, and I’ve been basically ignoring him.

The sad truth is, the movie situation in Boulder sucks right now. They’re building a new movie theater at 29th Street (which is what replaced the old mall), but it won’t be done for months and months. However, anticipating this, one of the two remaining theaters shut its doors. The theater that is left only plays “art house” movies, which ordinarily aren’t what I’m interested in — I mean, I enjoy them, but in times of flux like this one, I am going to the theater to escape, not to plumb the depths of my ongoing existential crisis. Call me shallow.

IFS is still open but for some reason I never quite manage to read their schedule on time. I’m still hoping to get them to publish an ical feed (I seem to have gotten KGNU to do this… yay!).

When I was sick and couch-ridden a couple weeks ago I tried to watch old Stephen Chow movies. I forced myself through both volumes of Royal Tramp, but couldn’t watch Chinese Odyssey… both of these movies really sucked, I’m sorry to say.

Next week is the Conference on World Affairs, and even though Ebert called in sick, I will probably drop by to watch the movie straight through. They’re showing Chinatown this year — not exactly escapism, but I haven’t seen it on the big screen.