unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* two different internal representations of the key
@ 2007-11-21 14:35 Gour
  2007-11-25  1:22 ` Michael Schierl
  0 siblings, 1 reply; 3+ messages in thread
From: Gour @ 2007-11-21 14:35 UTC (permalink / raw)
  To: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 2816 bytes --]

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 the editor for non-us layout.

Based on the hints from #emacs users, I tried to bind C-š to C-a, i.e. added the following line to my ~/.emacs:

(global-set-key (kbd "C-š") 'move-beginning-of-line)

If I ask help on C-a, C-h k C-a says: It is bound to C-a, C-š, <home>.

However,  C-h k C-š says:  C-š 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 used consistently." 

Moreover he hinted me to report "(kbd "C-š") is generating one vector for the key, which shows 
up when getting the help from the function, but actually pressing the key in X generates a different 
vector."

We went further th proof the problem:

 M-: (kbd "š") RET evaluates to: [331937]

By modifying ' describe-key' source (credit to fledermaus) with adding the line

    (fset 'yank-menu (cons 'keymap yank-menu))))))  
+  (message "KEY: %S" key)
    (if (numberp untranslated)

and issuing:

M-x describe-key RET C-š RET

evaluates:  KEY: [67111225]

otoh, M-: (kbd "C-š") RET

gives:  [67440801]

which confirms the problem that "kbd is supposed to be the one thing that tells you the canonical internal 
representation of any symbolic key representation,  which is different to eg. describe-key C-š" and therefore wrong.

Please, if someone can take a look on this issue, it's one of big advantages 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=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--mandir=/usr/man' '--without-sound' '-with-x-toolkit=gtk' 'CFLAGS=-march=x86-64 -mtune=generic -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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2007-11-29 10:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 14:35 two different internal representations of the key Gour
2007-11-25  1:22 ` Michael Schierl
2007-11-29 10:14   ` Gour

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).