Recover deleted email (Control-H)

While in Apple Mail, I attempted to invoke the app Hook by pressing Control-H. Hook didn’t launch, so I tried Control-H again, but still no Hook. I then realized that 2 emails that were previously in my mailbox were no longer there. I searched Mail for the missing emails, but couldn’t find them anywhere. I then did a DuckDuckGo search for Apple Mail “Control-H”, and learned that pressing “Control-H” deletes the current message, and can be undone with Command-Z. Supposedly the email is just moved to the Trash folder.

Back in Mail, pressing Command-Z did nothing. Searching through the Trash, I still wasn’t able to find the deleted email.

The email was important, and I’d really like to recover it. Help!?

Sometimes when I undo a deletion in Mail it takes a little time for the undo to work — I think it has something to do with IMAP (eg, the delete command gets processed, then the I delete, then your client has to retrieve the message again). Sometimes the retrieval gets hung up. In those cases, usually the command to Get All Mail (or whatever it’s called) works. If not, rebuilding your mailbox could work.

As a faster option in this instance, consider using your Mail provider’s web interface to pull it from the trash, or just to reassure yourself that it still exists.

And good to know about Cmd-H! You might consider making your Hook command something less likely to be used by apps, eg with multiple modifier keys.

That’s odd. I’ve never set any custom keyboard shortcuts for Mail, and over here, in Monterey, “Delete” is command-backspace. The control-H invocation of Hook works just fine.

You can, of course, use System Preferences > Keyboard > Shortcuts to change “Delete” in mail to whatever shortcut you want.

@anon41602260, remember that MacOS is built on UNIX, and in UNIX there are several key combinations that are bound to the system, including Control-H which is Delete. If you were to quit Hook, and invoke Control-H in any app, it may delete a single character, or in Mail’s case, the active message.

There are a few more UNIX keyboard shortcuts you can use in pretty much any app that uses the Cocoa text framework.

Ctrl + A takes you to the start of the line.
Ctrl + E takes you to the end.
Ctrl + K deletes the rest of the line after the insertion point.
Ctrl + O is line feed without moving the insertion point.
Ctrl + D is forward delete.
Ctrl + V is go to end of page.
Ctrl + N is next line.

1 Like

Most definitely remapping Hook!

Thank you for the instruction.

As I said, in Mail on Monterey, over here, ^H does not delete a message. UNIX notwithstanding. I have no idea how anyone else’s machine is configured or operating.

1 Like

No, it is not.

Those keybindings originated in emacs.

1 Like

This isn’t Hook’s default shortcut, is it? If so, I’d submit your case as feedback. “H is for Hook” and all, but as a dev I’d change my app’s default shortcut if I found out it conflicted with a common delete shortcut.

Edit: Yeah, I see from their homepage that ⌃H is their default. Really, send them some feedback.

IIRC control-h is the backspace character, therefore perhaps not the best choice for a keyboard shortcut.

Yes, it really isn’t. Clearly wasn’t intentional, and changing your app’s established default shortcut is annoying, but as far as bugs go, it doesn’t get more serious than data loss. I’d even extend the umbrella of what “data loss” includes to deleting a single character, not noticing just as the OP didn’t notice his first deleted email, and paying for that deleted character later.

FWIW, on my Monterey without Hook installed ⌃H does delete selected message in Mail.app

Is too, is too, is too, nah, nah, nah.

macOS is UNIX 03 certified.

https://www.opengroup.org/openbrand/register/brand3668.htm

Research UnixBSDNeXTSTEPOPENSTEPMac OS X, OS X, macOS

You misspelled TECO :slightly_smiling_face:

1 Like

The Wikipedia article says:

If an operating system is submitted to The Open Group for certification, and passes conformance tests, then it is deemed to be compliant with a UNIX standard such as UNIX 98 or UNIX 03.

So, although it is currently compliant with that standard, macOS was not “built on UNIX". It (OSX) began with a Mach kernel plus a BSD “subsystem” and the Aqua UI. I was never able to discover precisely what “subsystem” meant in this context but I believe it might mean “non-kernel”. It is this component that gives macOS its UNIX-iness (what’s left of it).

Point taken.   

It’s surprising how many apps trample over existing MacOs editing shortcuts in this way. It’s such a simple check to make, after all.

At least Hook allows you to get rid of Ctl-h easily – you can untick it in Preferences > Shortcuts, and they provide an alternative shortcut: some programs don’t even do that. For example, Tinderbox hard codes opt-tab into ‘change panel’, overwriting the built-in ‘start bullet list’, which is a ridiculous thing to do in a note taking app…

It’s a good thing that Mail allows you to use the built-in ‘Emacs’ shortcuts, because you can then use ctl-n/p to navigate instead of having to reach for the awkwardly placed arrow keys.

1 Like