[OS X Emacs] Org mode keymap problem

David Reitter david.reitter at gmail.com
Wed Jan 18 06:13:38 EST 2012

On Jan 18, 2012, at 4:00 AM, Alan Schmitt wrote:
> 	    (define-key org-mode-map [home] 'org-metaleft)
> 	    (define-key org-mode-map [end] 'org-metaright)
> 	    ))
> This allows me to use "fn" as my alt key and bypass the fact, for instance, that "fn up" is actually the "prior" key.
> Unfortunately, for some reason, some of these key bindings do not work in org mode: the "prior" and "next" one are correctly bound, but the "home" and "end" one remain bound to "beginning-of-buffer" and "end-of-buffer".

Alan, in Emacs, minor-mode maps override major-mode key maps.   If Home/End are bound in a minor-mode map, then they will be prioritized over your settings.  And this is indeed the case.  `osx-key-mode' (where most key bindings are made that are specific to Aquamacs) sets home and end, and it does precisely because some major modes redefine elementary navigation keys (and they shouldn't do it for UI consistency).

Now, one solution would be for you to simply bind your keys in osx-key-mode-map (see also the Aquamacs FAQ), but the better way could be to set `ns-function-modifier' to an unused modifier like `super', and bind that.  Here, the problem is that Aquamacs does not yet recognize function key combinations with arrow keys (this may be a system limitation, IIRC).

Hope that helps.

http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20120118/16817a30/attachment.asc>

More information about the MacOSX-Emacs mailing list