From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: What does it mean: (define-key mode-specific-map [?a] 'org-agenda) Date: Sun, 07 Feb 2010 19:35:49 +0100 Message-ID: <871vgwc2re.fsf@thinkpad.tsdh.de> References: <942B3B793327BB4DA113CF35156A0A480EB112@GCVMAIL2.corp.geze.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NeBzU-00010E-QU for emacs-orgmode@gnu.org; Sun, 07 Feb 2010 13:36:16 -0500 Received: from [199.232.76.173] (port=51384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NeBzU-000104-Fw for emacs-orgmode@gnu.org; Sun, 07 Feb 2010 13:36:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NeBzS-0000ek-2j for emacs-orgmode@gnu.org; Sun, 07 Feb 2010 13:36:16 -0500 Received: from lo.gmane.org ([80.91.229.12]:54698) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NeBzR-0000eC-O7 for emacs-orgmode@gnu.org; Sun, 07 Feb 2010 13:36:13 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NeBzO-0005jn-MX for emacs-orgmode@gnu.org; Sun, 07 Feb 2010 19:36:10 +0100 Received: from p54af358d.dip0.t-ipconnect.de ([84.175.53.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Feb 2010 19:36:10 +0100 Received: from tassilo by p54af358d.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Feb 2010 19:36:10 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org "Krause, Joerg" writes: Hi Jörg, > After examining the manual and serveral sites, I still don't > understand the term [?a] within that statement. Can anybody brighten > my mind? The square brackets say it's a vector, and ?x is the reader-syntax for characters. So it's a vector with exactly one item, the character `a'. So this statement binds the command `org-agenda' to the key `a' in the keymap `mode-specific-map'. You could have written any of the following with equal results: (define-key mode-specific-map "?a" 'org-agenda) (define-key mode-specific-map (kbd "a") 'org-agenda) I prefer the `kbd' version. That understands the keybinding syntax that is displayed in `C-h k', and which is used in all manuals, too. ,----[ C-h f kbd RET ] | kbd is a Lisp macro in `subr.el'. | | (kbd KEYS) | | Convert KEYS to the internal Emacs key representation. | KEYS should be a string constant in the format used for | saving keyboard macros (see `edmacro-mode'). `---- Bye, Tassilo