Mac OS X’s Mail: Beware the shortcut for erasing deleted messages

Posted by Pierre Igot in: Mail
September 15th, 2011 • 9:41 am

Sometimes, as a Mac user, I can be my own worst enemy.

As reported earlier, I installed Lion on my main machine last month, and since then I have of course encountered a number of bugs that I have been reporting to Apple through the appropriate channels.

But any major system upgrade can also cause you to encounter problems that you have never encountered before — and mislead you into thinking that they are new problems — simply because it causes you to change some of your behaviours.

Last week, for example, I went to the Trash mailbox in Mac OS X’s Mail for the first time since upgrading to Lion. (I only go there when I think I have mistakenly trashed a message that I wanted to keep.) And I noticed that it was… completely empty, even though I had just trashed a message! I tried again, and sure enough, the other message I trashed also disappeared right away altogether.

Uh oh, I thought. Is this another bug in Lion? I then went to my preferences to check the account settings for my various e-mail accounts and make sure that Lion had not changed them. They were still all set to automatically erase deleted messages either “never” or “after one month.”

I then tried to rebuild the trash mailboxes for the various accounts, to no avail. My deleted messages were most definitely gone. I went to my Mail folder in my home library in the Finder to see if they were there without actually showing up in Mail. The Mail folder has a new file/folder structure in Lion that makes it very painful to find individual e-mail files, but I was able to ascertain that my trashes really did not contain anything.

Figuring it might be some kind of new Mail bug in Lion, I tried the trick that consists of trashing the Envelope Index file to force Mail to reimport all messages (effectively rebuilding the index). Mail now has three Envelope Index files (in a subfolder called “MailData”), so I trashed all three and relaunched Mail. Sure enough, it prompted me to reimport all my messages, and I let it do that, which took a good 15 min.

After this, however, my Trash was still empty, which was not particularly surprising. But I noticed that new messages that I was trashing now were not disappearing right away, so I figured that trashing the Envelope Index files had fixed the problem.

Then a few days later I checked my Trash again, and it was empty again!

I then went to post a note on the AppleSeed discussion forum about this, in order to find out whether other testers had experienced the same problem. (I didn’t find anything on the main discussion forums or elsewhere.) Several people responded, indicating that they were unable to reproduce the problem and making various suggestions.

One of the suggestions was to check that I wasn’t accidentally requesting Mail to erase deleted messages. I first thought it was a silly suggestion, but then I saw that the poster mentioned not only the menu item for this (which I would never trigger by accident), but also the corresponding keyboard shortcut:

Erase Deleted Messages in All Mailboxes

The shortcut is command-shift-Delete. “Bloody hell,” I thought. Could it be that I have been hitting this shortcut by accident? If so, why?

Then I thought about it, and figured the following. In Lion, Mail now has this “conversation” feature that automatically shows discussion threads consisting of the several messages, in both your Inbox and other boxes, that are part of the same back-and-forth e-mail exchange. It’s a pretty nifty feature, and a very convenient one. (It’s much better than the “Organize by Thread” feature of previous versions.)

But there is something about this new feature that maybe makes me subconsciously feel like I have to do more than a simple Delete keystroke when I want to delete a message or a group of messages. And since I am already used to the command-shift-option-Delete shortcut that I use all the time in iTunes to not only delete tracks from the current playlist, but also actually remove them from the library altogether, I think that maybe, since upgrading to Lion, I have unconsciously been using the command-shift-option-Delete shortcut instead of a simple Delete keystroke to delete some messages, especially when I am looking at a conversation.

Now, of course, command-shift-option-Delete is not the exact shortcut for “Erase Deleted Messages › In All Mailboxes” in Mail, but it includes that shortcut (command-shift-Delete shortcut), and that is enough for Mail to treat it as the same.

And sure enough, since this realization, I have been careful not to use the shortcut anymore, and I haven’t experienced any problem with messages disappearing from my trashes.

But is that the whole story? Not quite.

First of all, the shortcut is not new in Lion. The “Erase Deleted Messages › In All Mailboxes” command already had the same shortcut in Snow Leopard.

Then it turns out that there is a difference between command-shift-option-Delete and command-shift-Delete. The difference is that, if you use command-shift-Delete (or manually select the “Erase Deleted Messages › In All Mailboxes” menu command), you get the following confirmation dialog:

Confirm Erase Deleted Messages

If you use command-shift-option-Delete, on the other hand (i.e. the shortcut plus the Option modifier key), there is no confirmation dialog. This is consistent with other similar shortcuts in other applications (such as the shortcut for emptying the trash in the Finder). You can also see the ellipsis at the end of the menu command disappear when you hold the Option down, which indicates that there won’t be a dialog box when you execute the command.

Here again, the behaviour is not new in Lion. The Option key has the same effect in Snow Leopard.

The fact that this is nothing new would appear to suggest that there is indeed something about Lion’s Mail that causes me, subconsciously, to want to use command-shift-option-Delete more than I used to. Again, I suspect that it has to do with the conversation feature, but that’s only speculation about my subconscious here.

I must also point out that I have a very long personal history of using command-shift-option- type shortcuts for various commands in various applications. There’s just something about that particular combination of modifier keys that feels natural to me on my keyboard, and so I end up using this type of shortcut quite a bit. (Ironically, I also believe I like this type of shortcut because it’s easy to memorize, yet difficult to trigger by accident.)

Based on what’s happening to me now in Lion, I cannot afford to be taking any chances about this issue (and risk losing messages that I don’t want to lose). I have now added a macro in Keyboard Maestro that intercepts the command-shift-option-Delete shortcut, and triggers the menu command itself, thereby forcing Mail to display the confirmation dialog.

(Isn’t it wonderful that a tool such as Keyboard Maestro enables you to fix or improve other software without resorting to hacks or other undesirable methods?)

If you are ever tempted to use more than just Delete to delete a message in Mail, I suggest that you look into this and take precautions to avoid accidentally (and irretrievably) emptying your trash in Lion’s Mail, which can happen without giving you a warning about doing something drastic that cannot be undone.


Comments are closed.