unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Curiostiy question re: keybinding ??
@ 2007-07-23 19:32 William Case
  2007-07-24 20:51 ` Nikolaj Schumacher
  0 siblings, 1 reply; 3+ messages in thread
From: William Case @ 2007-07-23 19:32 UTC (permalink / raw)
  To: EMACS List

Hi;

Found the following hint in the emacs FAQ.  "To interactively bind keys
for all modes, type `M-x global-set-key <RET> KEY CMD <RET>'
Use the following "trick": First bind the key interactively, then
immediately type `C-x <ESC> <ESC> C-a C-k C-g'". Then I yanked
to .emacs.

Used it; it works.  However, I get the following;

(global-set-key "^Cc" 'compile)  ;; Ctrl-c
(global-set-key "\363" 'shell-command)  ;; Meta (Alt)-s 
(global-set-key (quote [8388723]) (quote shell))  ;; Super (Win)-s
(global-set-key (quote [8388631]) (quote kill-whole-line))  ;;
Ctrl-Super-w

I replaced the (quote "command") with 'compile and 'shell-command in the
first and second line. It reads even easier.  I like the formulation of
the keys as "^Cc"; they are simple to understand and make common sense.
But why did emacs generate the various numerical forms. Is this the
best/fastest way to do a binding?

It would be hard to remember what the numbers mean with out some
comments or a lot of memorization.

Is the first line binding style going out of use (replaced by the kbd
keyword) or coming in?  What would be the ^C (Ctrl) equivalent for Meta
-- ^M; and, Super -- ^s; and, Shift -- ^,?  What about Fx keys and
others?

This is not a complaint, nor I am I looking for a big dissertation.  I
have been to all the info, wiki and tidy sites.  Just wondering.

-- 
Regards Bill

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-24 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 19:32 Curiostiy question re: keybinding ?? William Case
2007-07-24 20:51 ` Nikolaj Schumacher
2007-07-24 21:10   ` William Case

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).