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

From: Robert Pluim <[email-masked]>
Date: Thu, 26 Mar 2020 17:35:52 +0100

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