all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gour <gour@mail.inet.hr>
To: bug-gnu-emacs@gnu.org
Subject: two different internal representations of the key
Date: Wed, 21 Nov 2007 15:35:33 +0100	[thread overview]
Message-ID: <20071121153533.2a45e4d7@gaura-nitai.dyndns.org> (raw)

[-- 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 --]

             reply	other threads:[~2007-11-21 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 14:35 Gour [this message]
2007-11-25  1:22 ` two different internal representations of the key Michael Schierl
2007-11-29 10:14   ` Gour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071121153533.2a45e4d7@gaura-nitai.dyndns.org \
    --to=gour@mail.inet.hr \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.