Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Allow Command+H to pass through to OS X (Emacs 23 Nightly)

25 views
Skip to first unread message

Brett Hoerner

unread,
Feb 10, 2009, 5:45:38 PM2/10/09
to
I'm using Emacs nightly Cocoa builds, when I check what is bound to
Command+H I get "A-h is undefined". I'd like for Emacs to "pass this
through" to OS X like other commands, so that it hides the
application.

Any ideas?

Thanks.

Peter Dyballa

unread,
Feb 10, 2009, 6:47:41 PM2/10/09
to Brett Hoerner, help-gn...@gnu.org

Am 10.02.2009 um 23:45 schrieb Brett Hoerner:

> I'd like for Emacs to "pass this through" to OS X like other
> commands, so that it hides the
> application.


Did you find the preferences pane?

--
Greetings

Pete

Basic, n.:
A programming language. Related to certain social diseases in
that those who have it will not admit it in polite company.

Brett Hoerner

unread,
Feb 10, 2009, 6:59:01 PM2/10/09
to
On Feb 10, 5:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Did you find the preferences pane?

I've checked it, but I see nothing regarding this ... and I don't have
Command set to anything (I'm using Alt for Meta).

Prefs: http://i39.tinypic.com/n3r7yq.png

Brett

Pascal J. Bourguignon

unread,
Feb 10, 2009, 7:17:36 PM2/10/09
to
Brett Hoerner <bretth...@gmail.com> writes:

Perhaps
(global-set-key (kbd "A-h") 'iconify-or-deiconify-frame)
would do?

Yes,
(global-set-key (kbd "A-h") 'iconify-or-deiconify-frame)
will do!


(global-set-key (kbd "A-h") 'iconify-or-deiconify-frame)
WILL DO!

--
__Pascal Bourguignon__

Brett Hoerner

unread,
Feb 10, 2009, 8:10:14 PM2/10/09
to
On Feb 10, 6:17 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:

> Perhaps
>   (global-set-key (kbd "A-h") 'iconify-or-deiconify-frame)
> would do?

Thanks for the help, but that does the equivalent of "Command +
M" (minimize), not "Command + H" (hide), which do have differences. :/

Brett

Chetan

unread,
Feb 10, 2009, 9:44:22 PM2/10/09
to
Brett Hoerner <bretth...@gmail.com> writes:

I don't use mac, but do make-frame-invisible and make-frame-visible
work?

Chetan

Brett Hoerner

unread,
Feb 11, 2009, 8:32:42 AM2/11/09
to
On Feb 10, 8:44 pm, Chetan <chetan.xs...@xspam.sbcglobal.net> wrote:
> I don't use mac, but do make-frame-invisible and make-frame-visible
> work?

Nope. :/

For some reason, I don't expect this to be an Emacs function, so much
as a way to "hand off" the keypress to OS X. Command+H is a key bound
in every application to 'Hide', but the actual 'Hiding' is done by the
window manager / Finder / whatever OS X calls it. Here you can see in
the Emacs menu it even has Hide (which I can use via the mouse, but
not they keyboard ... Emacs still seems to "grab" it when I press it
and like I said - it says it isn't bound to anything).

http://i43.tinypic.com/2djxbmq.png

Brett

Peter Dyballa

unread,
Feb 11, 2009, 11:43:26 AM2/11/09
to Brett Hoerner, help-gn...@gnu.org

Am 11.02.2009 um 14:32 schrieb Brett Hoerner:

> Emacs still seems to "grab" it when I press it


I have set Command to Command and Alt/Opt to none – because I need
characters like ï or ¡ Then there is still a yellow button to
minimise the frame ...

Maybe it helps to ask the question on this specialised list:

---------------------------- Info -----------------------------
List Post: <mailto:macosx...@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>

--
Greetings

Pete

When people run around and around in circles we say they are crazy.
When planets do it we say they are orbiting.


Xah Lee

unread,
Feb 11, 2009, 12:51:39 PM2/11/09
to

I use the following for Carbon emacs:

; disable the Mac shortcut convention of cmd-h to hide current
application.
(setq mac-pass-command-to-system nil)

Xah
http://xahlee.org/


Ian Eure

unread,
Feb 11, 2009, 1:40:18 PM2/11/09
to Brett Hoerner, help-gn...@gnu.org

If you set "Command Key" to "Command," it works; but you cannot use
the Command key in Emacs at all.

In the Carbon Emacs port, there was a way to pass the Command key
through to the OS if there was no Emacs binding for the pressed chord.
This functionality isn’t available in the Cocoa Emacs port.

- Ian

Brett Hoerner

unread,
Feb 11, 2009, 3:21:15 PM2/11/09
to
I found the function I needed to call,

(define-key map [(alt h)] 'ns-do-hide-emacs)

Thanks,
Brett

0 new messages