From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Case Newsgroups: gmane.emacs.help Subject: Curiostiy question re: keybinding ?? Date: Mon, 23 Jul 2007 15:32:55 -0400 Message-ID: <1185219175.2883.126.camel@CASE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185219367 1923 80.91.229.12 (23 Jul 2007 19:36:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2007 19:36:07 +0000 (UTC) To: EMACS List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 23 21:36:04 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ID3hL-0003Bh-Cf for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Jul 2007 21:36:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ID3hK-0005be-LB for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Jul 2007 15:36:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ID3h7-0005bN-If for help-gnu-emacs@gnu.org; Mon, 23 Jul 2007 15:35:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ID3h6-0005aX-1Z for help-gnu-emacs@gnu.org; Mon, 23 Jul 2007 15:35:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ID3h5-0005aU-Se for help-gnu-emacs@gnu.org; Mon, 23 Jul 2007 15:35:47 -0400 Original-Received: from smtp101.rog.mail.re2.yahoo.com ([206.190.36.79]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1ID3h5-00022y-Io for help-gnu-emacs@gnu.org; Mon, 23 Jul 2007 15:35:47 -0400 Original-Received: (qmail 56631 invoked from network); 23 Jul 2007 19:35:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:Subject:From:To:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=u2AZeNwwtlrgrVW+I1Eh2FNE1Y/kWnQVsqDFlOyF+TbRIeDwB3ivOnxx0tXsLKP2Qsk87E/Xbaab6/ESGx+QDrjRZylSK/IlZlmlN0SXqJtkYrg41eaeZYm49fxVYFT1m6jkPH6ZZL/cMdJo1zG/vu183WS/9kUaTCT+2VPvCSw= ; Original-Received: from unknown (HELO ?192.168.1.3?) (billlinux@rogers.com@74.104.51.86 with plain) by smtp101.rog.mail.re2.yahoo.com with SMTP; 23 Jul 2007 19:35:46 -0000 X-YMail-OSG: 9bVk0wQVM1l.EsE_EzBWHgT_TkNvdLIEdkLO4QLE2lfi0g4MhlCmObO4bB4hBPd99g-- X-Mailer: Evolution 2.10.3 (2.10.3-1.fc7) X-detected-kernel: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45895 Archived-At: Hi; Found the following hint in the emacs FAQ. "To interactively bind keys for all modes, type `M-x global-set-key KEY CMD ' Use the following "trick": First bind the key interactively, then immediately type `C-x 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