Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm using GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-01-29 on bob.porkrind.org on a MacBook Air.

Can I set Command-H to hide Emacs? I currently use M-x customize-group ns and set Command Modifier to no value. I already have a standard key binding to iconify-frame, but that is different from hiding; I'd rather use the native OS X hide capability so I can unhide by clicking on the Emacs icon in the dock.

share|improve this question

2 Answers 2

If emacs is built with Cocoa (e.g via brew install emacs --cocoa), by default s-h (Cmd+h) should be bound to ns-do-hide-emacs

If somehow it is not, you can do this manually with:

(global-set-key [(super h)] 'ns-do-hide-emacs)
share|improve this answer

I'm trying to solve the same problem. The best I've been able to come up with is the following, which will iconify (like CMD+M) the frame:

(global-set-key (kbd "M-h") 'iconify-frame)

Not ideal, but better than nothing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.