Using the GNOME Evolution address book with Mutt

For a while I’ve been using the GNOME Evolution address book with Mutt, my favorite email client. I use a script called mutt-eds-query, which consults the default evolution-data-server (EDS) address book to find contacts whose name or email address match a substring. I have a couple thousand contacts still stored in my EDS address book, so it’s really useful for me to be able to consult them. When I type an address in Mutt’s To: field, for example, I give a few letters and then hit Ctrl+T to see a list of completions.

Unfortunately, the script stopped working when I moved to Fedora 18, because the new release contains the newest Evolution and EDS (3.6 versions). The new EDS cleans up a number of deprecated functions and has a more regular interface for querying data sources. Obviously that means the mutt-eds-query needed changing too. I used the extensive GNOME developer documentation to find out what had changed, and updated the script I found on the Mutt wiki.

So I hacked in some changes today. I’m not a born C programmer, so I’m sure there are bad style uses and other stupidities in what I did. Nevertheless, I posted the results alongside the original on the Mutt wiki page. I’ve also put my files up on my Fedora People space. Feel free to grab and try it, and let me know if it helps you. (You’ll need the evolution-data-server development libraries to compile it.)

In the future I’d like to update this script to aggregate and query my GNOME online accounts as well. There’s a very robust set of functions for doing that, and documentation, so if I could just find the spare cycles, I think I could probably make this happen. Alternately, I wonder if that might make a good addition to the folks-tools package?