how to reach the usual “alt-…” keyboard bindings with an emacs from emacsformacosx

OS X and emacs use the “alt” key differently, so how do I achieve on OS X within emacs what I usually achieve with “alt“, like entering “[” through alt-5?

I sacrificed the rightalt” key to work the Mac OS X way (by setting ns-right-alternate-modifier to none), and the leftalt” key to work the emacs way.

Enter this within your emacs (from emacsformacosx.com) on OS X:

M-x customize-group ns

“ns” is the customization group for “GNUstep/Mac OS X specific features”.

bdecaf suggested that in a thread on stackoverflow.com:

Now I can enter “[” on my Austrian/German Mac keyboard through (right) alt-5.

I had waited far to long, before thoroughly investigating this.

Update 2013-01-07:

This article attracted far too much SPAM, so I had to disable commenting.