Subject: bug#40240: closed (Re: bug#40240: 26.3; Wrong symbol inserted from keyboard: left tack instead of turnstile.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 26 Mar 2020 16:37:02 +0000

Your bug report

#40240: 26.3; Wrong symbol inserted from keyboard: left tack instead of turnstile.

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
40240: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40240
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#40240: 26.3; Wrong symbol inserted from keyboard: left tack instead of turnstile.
From: Robert Pluim <[email-masked]>
To: Ignat Insarov <[email-masked]>
Cc: [email-masked]
Date: Thu, 26 Mar 2020 17:35:52 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

>>>>> On Thu, 26 Mar 2020 12:29:39 +0300, Ignat Insarov <[email-masked]> said:

    Ignat> When I type `⊢` (Unicode right tack, also called «turnstile»), the left
    Ignat> tack symbol appears instead. I can insert the turnstile with other
    Ignat> methods without problem.

Hi, this issue has been fixed already in emacs-27, under
bug#37530. You can try out emacs-27, or if you want to stick to
emacs-26 you can apply the patch from the bugfix to your local emacs.

Here it is:

>From 471ce18ae8890ab3444654fd7ac49950044f60d1 Mon Sep 17 00:00:00 2001
From: Axel Svensson <[email-masked]>
Date: Sat, 28 Sep 2019 15:44:01 +0200
Subject: [PATCH] Update X keysym mapping
To: [email-masked]

* lisp/term/x-win.el (x-keysym-table): Update the mappings
using current Xorg data.  (Bug#37530)

Copyright-paperwork-exempt: yes
---
 lisp/term/x-win.el | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 56061371fe..d71bb34525 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -302,7 +302,11 @@ vendor-specific-keysyms
     (setq i (1+ i))))
 
 ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
-;; appendix to the X protocol definition.
+;; appendix to the X protocol definition.  As indicated, some of these
+;; have been corrected using information found in keysymdef.h which on
+;; a typical system is installed at /usr/include/X11/keysymdef.h.  The
+;; version used here is from xorgproto version 2019.1 found here:
+;; https://gitlab.freedesktop.org/xorg/proto/xorgproto/blob/e0bba743ae7c549c58f92677b239ec7878548228/include/X11/keysymdef.h
 (dolist
      (pair
       '(
@@ -579,6 +583,7 @@ vendor-specific-keysyms
 	(#x6aa . ?њ)
 	(#x6ab . ?ћ)
 	(#x6ac . ?ќ)
+	(#x6ad . ?ґ) ;; Source: keysymdef.h
 	(#x6ae . ?ў)
 	(#x6af . ?џ)
 	(#x6b0 . ?№)
@@ -594,6 +599,7 @@ vendor-specific-keysyms
 	(#x6ba . ?Њ)
 	(#x6bb . ?Ћ)
 	(#x6bc . ?Ќ)
+	(#x6bd . ?Ґ) ;; Source: keysymdef.h
 	(#x6be . ?Ў)
 	(#x6bf . ?Џ)
 	(#x6c0 . ?ю)
@@ -810,6 +816,7 @@ vendor-specific-keysyms
 	(#xaa8 . ? )
 	(#xaa9 . ?—)
 	(#xaaa . ?–)
+	(#xaac . ?␣) ;; Source: keysymdef.h
 	(#xaae . ?…)
 	(#xaaf . ?‥)
 	(#xab0 . ?⅓)
@@ -822,7 +829,17 @@ vendor-specific-keysyms
 	(#xab7 . ?⅚)
 	(#xab8 . ?℅)
 	(#xabb . ?‒)
+	;; In keysymdef.h, the keysyms 0xabc and 0xabe are listed as
+	;; U+27E8 and U+27E9 respectively.  However, the parentheses
+	;; indicate that these mappings are deprecated legacy keysyms
+	;; that are either not one-to-one or semantically unclear.  In
+	;; order to not introduce any incompatibility with possible
+	;; existing workflows that expect these keysyms to map as they
+	;; currently do, to 0x2329 and 0x232a, respectively, they are
+	;; left as they are.  In particular, PuTTY is known to agree
+	;; with this mapping.
 	(#xabc . ?〈)
+	(#xabd . ?.) ;; Source: keysymdef.h
 	(#xabe . ?〉)
 	(#xac3 . ?⅛)
 	(#xac4 . ?⅜)
@@ -839,6 +856,7 @@ vendor-specific-keysyms
 	(#xad2 . ?“)
 	(#xad3 . ?”)
 	(#xad4 . ?℞)
+	(#xad5 . ?‰) ;; Source: keysymdef.h
 	(#xad6 . ?′)
 	(#xad7 . ?″)
 	(#xad9 . ?✝)
@@ -883,20 +901,29 @@ vendor-specific-keysyms
 	(#xba8 . ?∨)
 	(#xba9 . ?∧)
 	(#xbc0 . ?¯)
-	(#xbc2 . ?⊥)
+	;; Source for #xbc2: keysymdef.h.  Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is
+	;; incorrect.
+	(#xbc2 . ?⊤)
 	(#xbc3 . ?∩)
 	(#xbc4 . ?⌊)
 	(#xbc6 . ?_)
 	(#xbca . ?∘)
 	(#xbcc . ?⎕)
-	(#xbce . ?⊤)
+	;; Source for #xbce: keysymdef.h.  Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is
+	;; incorrect.
+	(#xbce . ?⊥)
 	(#xbcf . ?○)
 	(#xbd3 . ?⌈)
 	(#xbd6 . ?∪)
 	(#xbd8 . ?⊃)
 	(#xbda . ?⊂)
-	(#xbdc . ?⊢)
-	(#xbfc . ?⊣)
+	;; Source for #xbdc and #xbfc: keysymdef.h.  Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is
+	;; incorrect.
+	(#xbdc . ?⊣)
+	(#xbfc . ?⊢)
 	;; Hebrew
 	(#xcdf . ?‗)
 	(#xce0 . ?א)
@@ -1143,6 +1170,9 @@ vendor-specific-keysyms
 ;; #x0aff	CURSOR	Publish
 ;; #x0dde	THAI MAIHANAKAT	Thai
 
+;; However, keysymdef.h does have mappings for #x0aac and #x0abd, which
+;; are used above.
+
 
 ;;;; Selections
 
-- 
2.25.0.232.gd8437c57fa

Subject: 26.3; Wrong symbol inserted from keyboard: left tack instead of turnstile.
From: Ignat Insarov <[email-masked]>
To: [email-masked]
Date: Thu, 26 Mar 2020 12:29:39 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

When I type `⊢` (Unicode right tack, also called «turnstile»), the left
tack symbol appears instead. I can insert the turnstile with other
methods without problem.

Note that I have a key bound on my keyboard layout directly to this
symbol. It works across my system, with the sole exception of Emacs.

I suppose the volunteer will have to put the turnstile symbol onto their
keyboard layout. Try to insert turnstile directly from keyboard layout.
* Expected behaviour: a turnstile appears.
* Observed behaviour: left tack appears.

In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
 of 2019-08-29 built on juergen

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix