One of the new features in the Mail app in OS X Mavericks is better integration for Gmail accounts. Although the so-called enhancements got off to a shaky start, Apple released a patch to fix a majority of the issues. After adjusting my Gmail settings to show my All Mail folders, things seem to be working pretty well for my Gmail accounts in Mail on OS X Mavericks – except for one nagging issue.
I am an email hoarder and prefer to archive my Gmail messages rather than delete them. Prior versions of Mail were great for this, as hitting the delete key would simply remove the Inbox label from any message that was selected – in other words it would archive the message. Unfortunately, in OS X Mavericks, the delete key now behaves differently, moving selected messages to the Trash.
I searched high and low for a solution to this annoyance, and found a reasonable solution that relies on a program called Keyboard Maestro. The only problem with this solution is that Keyboard Maestro charges $36 USD for a license. That isn’t too unreasonable if you plan to use its other powerful features, but all I wanted was my delete-to-archive behaviour back in Mail. Frustrated with the lack of affordable options, I did some research into Mail plugins and created a simple solution to my problem.
Introducing Delete2Archive, a plugin for Mail in OS X Mavericks that brings back the old delete key behaviour for Gmail accounts, archiving messages instead of moving them to the trash!
- Quit Mail.
Extract the Delete2Archive.mailbundle folder from the zip file and move it to
(where ~ indicates your home folder). To open the Library folder in Finder (it is hidden by default), hold down the Option key while selecting the Go menu, then select the Library menu item. If you don’t have a Bundles folder, see the additional instructions below.
Some users have had issues installing the plugin because they don’t have a Bundles folder as described in step 3 of the installation instructions. If you have never installed a Mail plugin before, you may need to follow these additional steps prior to installing the Delete2Archive plugin:
- Using Finder, navigate to
and create a new folder called Bundles. To get to the Library folder (it is hidden by default), hold down the Option key while selecting the Go menu, then select the Library menu item.
Open the Terminal app.
Enter the following two commands, hitting the enter key after each one. This step adjusts some behind-the-scenes settings in Mail so that it checks for plugins each time it launches.
defaults write ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail.plist EnableBundles -bool true defaults write ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail.plist BundleCompatibilityVersion -int 4
The plugin is very simple – it listens for delete key events and translates them into archive actions (the equivalent of selecting Message > Archive in the Mail menu) – so there are no preferences or customization options. If you decide you don’t want to use the plugin down the road, simply move the Delete2Archive.mailbundle folder to the trash and restart Mail. As this is my first attempt at a Mail plugin, it might not work perfectly for everyone. If you run into any issues, please leave a comment below or get in contact with me.
The plugin must be updated for compatibility with each update to OS X. The current version can be downloaded above (see the Installation Instructions) and prior versions of the plugin are listed below for reference:
- Delete2Archive-10.9.1b.zip for OS X 10.9.1 (All languages)
- Delete2Archive-10.9.1.zip for OS X 10.9.1 (English only)
- Delete2Archive.zip for OS X 10.9.0