Delete2Archive – Archive Gmail Messages Using the Delete Key in OS X Mavericks Mail

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.

Delete2Archive Plugin for Mail in Mac OS X Mavericks

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!

Installation Instructions
  1. Quit Mail.

  2. Download the latest version of the plugin (compatible with OS X 10.9.2):


    or download for free.

  3. Extract the Delete2Archive.mailbundle folder from the zip file and move it to

    ~/Library/Mail/Bundles/
    

    (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.

  4. Restart Mail.

Update

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:

  1. Using Finder, navigate to
    ~/Library/Mail/
    

    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.

  2. Open the Terminal app.

  3. 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.

Update 2

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:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Facebook17Twitter35Google+4
11 November 2013
Show Comments