all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Axel Svensson <mail@axelsvensson.com>, 37530@debbugs.gnu.org
Subject: bug#37530: 26.1; Tack characters translated incorrectly
Date: Fri, 27 Sep 2019 15:03:19 +0200	[thread overview]
Message-ID: <87r241q4bs.fsf@gnus.org> (raw)
In-Reply-To: <83zhiqjom4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Sep 2019 08:26:59 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> Isn't the output of "C-h l" evidence that Emacs actually received the
> codepoints it displayed?  IOW, how do we know this is a problem in
> Emacs and not in the keyboard configuration and/or driver software?

I've always wondered how Emacs actually does this thing, but have never
had a peek, so I rummaged around in keyboard.c for a bit.  If I'm
reading the code right, we get an event, and then pick out the
symbol_num from that (and that's probably they keycode in X parlance),
and then we end up here (under X):

/* Convert a keysym to its name.  */

char *
get_keysym_name (int keysym)
{
  char *value;

  block_input ();
  value = XKeysymToString (keysym);
  unblock_input ();

  return value;
}

But I'm a bit lost in how that name is translated into a character.
Uhm...  OK, there's a hash table called x-keysym-table.

(format "%x" (gethash #x0bc2 x-keysym-table))
=> "22a5"

> > #define XKB_KEY_downtack                      0x0bc2  /* U+22A4 DOWN TACK */
> > #define XKB_KEY_uptack                        0x0bce  /* U+22A5 UP TACK */
> > #define XKB_KEY_lefttack                      0x0bdc  /* U+22A3 LEFT TACK */
> > #define XKB_KEY_righttack 0x0bfc /* U+22A2 RIGHT TACK */

And that's wrong, according to the bug reporter.  Now where does that
come from?  Some grepping shows w-win.el:

;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
;; appendix to the X protocol definition.
(dolist
...
	(#xbc2 . ?⊥)

Oh, there it is.

Character code properties: customize what to show
  name: UP TACK
  general-category: Sm (Symbol, Math)
  decomposition: (8869) ('⊥')

So we've got some wrong data in x-win.el?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2019-09-27 13:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 21:31 bug#37530: 26.1; Tack characters translated incorrectly Axel Svensson
2019-09-27  5:26 ` Eli Zaretskii
2019-09-27 10:37   ` Axel Svensson
2019-09-27 13:15     ` Eli Zaretskii
2019-09-27 13:17       ` Axel Svensson
2019-09-27 13:03   ` Lars Ingebrigtsen [this message]
2019-09-27 13:32   ` Lars Ingebrigtsen
2019-09-27 13:44     ` Eli Zaretskii
2019-09-27 13:50       ` Lars Ingebrigtsen
2019-09-27 13:59         ` Eli Zaretskii
2019-09-27 14:03           ` Lars Ingebrigtsen
2019-09-27 14:18           ` Axel Svensson
2019-09-27 14:10     ` Axel Svensson
2019-09-27 14:19       ` Lars Ingebrigtsen
2019-09-27 14:57         ` Axel Svensson
2019-09-27 14:25       ` Eli Zaretskii
2019-09-27 14:48         ` Axel Svensson
2019-09-27 15:30           ` Eli Zaretskii
2019-09-27 17:19             ` Axel Svensson
2019-09-27 18:35               ` Eli Zaretskii
2019-09-27 20:05                 ` Axel Svensson
2019-09-28  6:18                   ` Eli Zaretskii
2019-09-28 13:44                     ` Axel Svensson
2019-09-28 14:12                       ` Eli Zaretskii
2019-09-28 14:30                         ` Axel Svensson
2019-09-28 14:48                           ` Eli Zaretskii

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=87r241q4bs.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=37530@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=mail@axelsvensson.com \
    /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.