From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gour Newsgroups: gmane.emacs.bugs Subject: two different internal representations of the key Date: Wed, 21 Nov 2007 15:35:33 +0100 Message-ID: <20071121153533.2a45e4d7@gaura-nitai.dyndns.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/7N01M6rRi7zUiHDCK9ZKLVV"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Trace: ger.gmane.org 1195677040 6885 80.91.229.12 (21 Nov 2007 20:30:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2007 20:30:40 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 21 21:30:47 2007 Return-path: Envelope-to: geb-bug-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 1IuwDe-00015S-Ml for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Nov 2007 21:30:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuwDQ-0006W8-J5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Nov 2007 15:30:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iuqg9-0004Ph-Bs for bug-gnu-emacs@gnu.org; Wed, 21 Nov 2007 09:35:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iuqg8-0004P9-6Z for bug-gnu-emacs@gnu.org; Wed, 21 Nov 2007 09:35:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iuqg7-0004P1-TW for bug-gnu-emacs@gnu.org; Wed, 21 Nov 2007 09:35:48 -0500 Original-Received: from 67.107.78.70.ptr.us.xo.net ([67.107.78.70] helo=mail.bhaktivedantacollege.org) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iuqg7-0002sL-GV for bug-gnu-emacs@gnu.org; Wed, 21 Nov 2007 09:35:47 -0500 Original-Received: from gaura-nitai.dyndns.org (133-166.dsl.iskon.hr [89.164.133.166]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bhaktivedantacollege.org (Postfix) with ESMTP id 3A7262E49F for ; Wed, 21 Nov 2007 09:35:44 -0500 (EST) X-Mailer: Claws Mail 3.1.0 (GTK+ 2.12.1; x86_64-unknown-linux-gnu) X-Face: ),xf-z6dDO\:>YSZI_e=P@?[K_CG; $szx>/iL$UW8e7>n0'$Sg[7U[bx%iw6&z1}%vLroT$ kAJU2B{DVpGqvk$$0lgE6?1""q!+({Gra9j$}y}0VqM+K_d8>[sZf1]_Y`YV X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Wed, 21 Nov 2007 15:30:19 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17035 Archived-At: --Sig_/7N01M6rRi7zUiHDCK9ZKLVV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Please describe exactly what actions triggered the bug and the precise symptoms of the bug: One of the emacs' selling point is ability to rebind the keyboard to suit t= he editor for non-us layout. Based on the hints from #emacs users, I tried to bind C-=C5=A1 to C-a, i.e.= added the following line to my ~/.emacs: (global-set-key (kbd "C-=C5=A1") 'move-beginning-of-line) If I ask help on C-a, C-h k C-a says: It is bound to C-a, C-=C5=A1, . However, C-h k C-=C5=A1 says: C-=C5=A1 is undefined. By reporting the issue in #emacs, i got help from 'fledermaus' who told me = the problem is: "there are two differnet internal representations, and they are not being u= sed consistently."=20 Moreover he hinted me to report "(kbd "C-=C5=A1") is generating one vector = for the key, which shows=20 up when getting the help from the function, but actually pressing the key i= n X generates a different=20 vector." We went further th proof the problem: M-: (kbd "=C5=A1") RET evaluates to: [331937] By modifying ' describe-key' source (credit to fledermaus) with adding the = line (fset 'yank-menu (cons 'keymap yank-menu)))))) =20 + (message "KEY: %S" key) (if (numberp untranslated) and issuing: M-x describe-key RET C-=C5=A1 RET evaluates: KEY: [67111225] otoh, M-: (kbd "C-=C5=A1") RET gives: [67440801] which confirms the problem that "kbd is supposed to be the one thing that t= ells you the canonical internal=20 representation of any symbolic key representation, which is different to e= g. describe-key C-=C5=A1" and therefore wrong. Please, if someone can take a look on this issue, it's one of big advantage= s of emacs over vim for non-US users! Sincerely, Gour In GNU Emacs 22.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.12) of 2007-06-08 on ovide Windowing system distributor `The X.Org Foundation', version 11.0.10400000 configured using `configure '--prefix=3D/usr' '--sysconfdir=3D/etc' '--lib= execdir=3D/usr/lib' '--localstatedir=3D/var' '--mandir=3D/usr/man' '--witho= ut-sound' '-with-x-toolkit=3Dgtk' 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneri= c -O2 -pipe'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: en_US.UTF-8 value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: identity --Sig_/7N01M6rRi7zUiHDCK9ZKLVV Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHREI1sqq4SJjSu8kRApXqAKCqgF3dm2VEApIqXxNdzvMtVOokgACfcvwy VA5MFceb5hDR1fC6t4FhvNk= =WghA -----END PGP SIGNATURE----- --Sig_/7N01M6rRi7zUiHDCK9ZKLVV--