From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: Looking for the "best" notation for key-binding Date: Fri, 21 Sep 2012 11:24:35 +0200 Message-ID: References: <505BA2B4.7090906@me.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1348219500 21595 80.91.229.3 (21 Sep 2012 09:25:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Sep 2012 09:25:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: clh@pobox.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 21 11:25:04 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TEzTr-0000YF-TU for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 11:25:04 +0200 Original-Received: from localhost ([::1]:43567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEzTn-0000Iu-4t for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Sep 2012 05:24:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEzTe-0000Hs-MA for help-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:24:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEzTZ-0001hD-0m for help-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:24:50 -0400 Original-Received: from mout.web.de ([212.227.17.12]:61535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEzTY-0001h9-MH for help-gnu-emacs@gnu.org; Fri, 21 Sep 2012 05:24:44 -0400 Original-Received: from sumac.fritz.box ([95.222.201.211]) by smtp.web.de (mrweb101) with ESMTPA (Nemesis) id 0LnjFb-1ThRjX3UgJ-00hUKh; Fri, 21 Sep 2012 11:24:36 +0200 In-Reply-To: <505BA2B4.7090906@me.com> X-Mailer: Apple Mail (2.1084) X-Provags-ID: V02:K0:rFTfHVmaAIbyvrcKU1Ahu5zzXYN/kur+9qSTs1DBJv0 D46mj7LHsRerfQMJfqYSW7HvC7UGRgRwaolKiRfq44KQuXDiTA X7pkJ+0YC2CexSYVlFx53BAw0nhJXxUggshjZnpVxGw0DxO6YG UT10rXwUX2KjijfXxJ2EMEGzOIXFQNbzCQnluVX7ZaefT5vpS+ O9tHeyV6DA9vvFp+StOZQ== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86863 Archived-At: Am 21.09.2012 um 01:11 schrieb Chap Harrison: > Isn't there a single, simple, consistent way to create key bindings = that will always work? I think the vector notation is a good choice: (global-set-key [C-=E2=88=AB] 'backward-sexp) ; A-C-b (global-set-key [M-S-return] 'other-window) (global-set-key [f1 f5] 'apropos-variable) (global-set-key [f3] 'compare-windows) (global-set-key [A-f1] 'replace-string) The commands you bind in your examples the keys are some macros (for f10 = for example) or different syntax: (quote help-for-help) =3D 'quote help-for-help (quote [f1]) =3D [f1] Entries in this syntax are usually created when using global-set-key = interactively and saving the resulting bind commands. Trying to bind the Lisp comment character ";" to anything can become = tricky=E2=80=A6 In my Emacsen (23.4, 24.2.50) this works: (global-set-key [67108923] 'comment-indent) The number value can be found by typing, for example in *scratch* = buffer, C-q C-;. This produces a record in the *Messages* buffer you can = use. -- Greetings Pete There's no sense in being precise when you don't even know what you're = talking about. =E2=80=93 John von Neumann