22 October 2004
The EPlugin hackfest is over!
Despite my day being packed with meetings and other interrupt-driven activity, it was pretty exciting for me; I learned the EPlugin architecture, an Eclipse-like system Michael built to allow you to extend Evolution using plugins. EPlugin is wonderfully easy to use overall; almost all of my stumbling blocks were the consequence of not having enough sample code to play with, and after today that shouldn’t be as much of an issue for new developers.

Note with interest the tiny droplets of posole dropping from Miguel’s spoon.
The EPlugin I wrote provides “Automatic Contacts” functionality; the BBDB-alike idea I mentioned yesterday. It does the following:
- Whenever you a respond to an email, new contacts are created in your addressbook for each recipient of your reply for whom a full name is available.
- If an addressbook card for one of your recipients is already available in your addressbook, then any email addresses for this person are automatically added to the contact.
- There is UI in the Mail Preferences dialog (Tools > Settings > Mail Preferences) to enable/disable the plugin, and to select which addressbook gets targeted for automatic contact creation. This probably isn’t the right place for the UI to go, but EPlugin makes it easy to move it somewhere else when I figure that out. Also, the addressbook selection option menu is too wide, and I can’t figure out how to fix that.
You can see the code for my plugin here. After I had Evolution building, the core of the functionality took me about an hour and a half to get working. This initial version was about 95 lines of code (I count newlines). Then, there was about 4 hours to write the UI code and do a little clean up, and now it’s about 300 lines, but still pretty dead simple.
My addressbook is growing now with the names and addresses of all the people I work with. I’m already feeling the benefit as I go to type someone’s email address and Evolution autocompletes it.
I also got my first look at the Evo mail code in about a year, which I have to say is pretty impressive. Extremely clean, extremely readable, very easy to understand. Not at all like it was in the 1.x days.
Now that I know how easy it is to use EPlugin, I’m going to take a look at the other plugin ideas I described yesterday. Michael has really done a beautiful job making Evolution easy for anyone to extend.
Here are a few new ideas:
- There are still bonus points left on the Automatic Contacts EPlugin: parsing the signature of the person whose mail you’re answering and extracting phone number, fax, address, etc, and stuffing those in his contact.
- A EPlugin to keep track of mails you’ve sent which haven’t gotten a reply yet, and which offers a UI to view outstanding mails where you’re expecting a reply. The plugin might have to be smart enough to know that longer mails are more important than shorter ones, or something like that. This would be really handy for me, as a manager.
- A dashboard-like idea from Alex: an EPlugin could extend the addressbook preview pane to show any unread messages from the person whose contact you’re viewing.
JP is going to post a summary of the hackfest, and everyone else’s work, in a bit I think.
Hunter S. Thompson has written up his thoughts on the presidential election for Rolling Stone.