News for hackers. Stuff that matters.
Re:Mastering Key Bindings in Emacs by silentbicycle on Tuesday February 08, 2011 @10:25PM (#2196135)
The simplest way I've found to format the keyboard shortcuts is to type "C-h k [your keyboard combination]" (which is C-h for help, k for keybinding), and then when it says e.g. "C-x M-. is undefined", plug the key description into the following:

    (global-set-key (kbd "keybinding") 'function-you-want-it-to-call)
The article goes into the significance of global-set-key vs. local-set-key; until you have more specific intentions, global-set-key is probably what you want.

I've done a couple sessions teaching developers in using Emacs, and one point I always stress is that the Emacs help system is exhaustive, but you have to learn how it's organized. (It uses funny terminology sometimes.)

There are no comments on this comment yet.