MailMate and OmniFocus, productive hacking

[Tweet : nvALT]

TL;DR: Enable OmniFocus support in MailMate by turning on Experimental Features in General Preferences. Add Omnifocus.mmBundle to “~/Library/Application Support/MailMate/Bundles/” and edit the “Commands/Add With Summary.mmCommand” plist to change the hotkey.

I’ve been searching for a new email client for a long, long time now. I’ve gone through just about every available option, from Mutt to AirMail, Postbox to MailPlane, and many along the way. I use each one exclusively for a week to see what issues I run into, what problems I need solved and whether or not I think I can stick with it.

This week’s test is MailMate, an email client with Markdown features, advanced rulesets, smart mailboxes and much more. It was recently “crowd-funded” and it was promising enough that I was happy to pledge some cash just to see what would happen.

I’d tried MailMate in the past, but it hadn’t stuck. I was intrigued enough by its powerful features (well-highlighted by Gabe Weatherhead) that I came around and gave it another shot. I’m blown away by both the default functionality and the extensibility of the system.

The one thing I couldn’t get working was integration with OmniFocus. The clipper failed to grab a message URL, and I couldn’t find a way to script or hack what I needed. After some digging and with a little help from my friends, it turned out the solution was already available as a bundle. You just have to enable the “Experimental features” in preferences, and then look under the Commands menu after restarting MailMate.

Here’s where “normal” people can stop reading. For those who want to dig into the power of the underlying system…

The bundle system that gets turned on when you enable this feature is exciting to nerds like me. It closely resembles the system that TextMate uses for building plugins and adding functionality. Each bundle contains commands that can be added to the menu system in MailMate, as well as a “bin” folder which can include tools built in any scripting language available to the system. To see examples of all of this in action, explore the existing bundles in “/Applications/”.

There’s also a mechanism for overriding and extending built-in bundles without touching core files (just like TextMate). If you put a bundle in “~/Library/Application Support/MailMate/Bundles/” which contains the same UUID as the default bundle, it can override any part of the bundle’s settings. Here’s an example bundle for changing the key command for the Add to OmniFocus command.


Unzip and place the OmniFocus.mmBundle into your “USER/Library/Application Support/MailMate/Bundles/” folder. I won’t go into excessive detail on PLIST files and keybindings at this point, but if you dig into the package and open the “Commands/Add With Summary.mmCommand” file in a text editor, you can alter the hotkey for the command. The change below makes F1 open OmniFocus’ quick entry window with the contents of the email embedded1.

    changed = {
        keyEquivalent = "\UF704";
    isDelta       = 1;
    uuid          = '03B35B47-9836-4EE1-9AFF-0D01D6F249F0';

Note that the UUID for the command matches the one found in “/Applications/ With Summary.mmCommand”. Also note the isDelta key, telling the bundle system that this is a finite change to a portion of the existing command with the same identifier. The same key is also found in the info.plist file in the root of the custom bundle (which contains the main bundle UUID).

This is probably more than you wanted to know. I’m just excited about the possibilities for not only replacing my workflows, but making them ten times better. I’m looking forward to seeing what the productivity hacking community comes up with!

  1. The keyEquivalent key can be set to any of the keys/modifiers found in standard OS X keybindings. \UF704 is F1. You can find more details right inside MailMate’s help system, or consult Jacob Rus’ excellent documentation.