unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Axel Svensson <mail@axelsvensson.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 37530@debbugs.gnu.org
Subject: bug#37530: 26.1; Tack characters translated incorrectly
Date: Fri, 27 Sep 2019 19:19:46 +0200	[thread overview]
Message-ID: <CAJ40yaw0VpTnUZp5fWngijvntNxSwq7ZiRZZXJYMcFxiXDY2hQ@mail.gmail.com> (raw)
In-Reply-To: <83v9tdiwoi.fsf@gnu.org>

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

On Fri, Sep 27, 2019 at 5:33 PM Eli Zaretskii <eliz@gnu.org> wrote:
> I thought that older versions might perhaps assign different mappings
> to the same keysyms.  If they don't assign any mappings, then I agree
> with you.

XKB lists quite a few keysyms as deprecated, but no keysyms we have
discussed here are affected.
I believe this indicates that they have never been used for another
mapping previously, but I haven't checked extensively.

However, it is also stated in xkbcommon-keysyms.h that:
> * Where the correspondence is either not one-to-one or semantically
> * unclear, the Unicode position and name are enclosed in
> * parentheses. Such legacy keysyms should be considered deprecated
> * and are not recommended for use in future keyboard mappings.

This affects four of the keysyms mentioned:
> #define XKB_KEY_signifblank                   0x0aac  /*(U+2423 OPEN BOX)*/
> #define XKB_KEY_leftanglebracket              0x0abc  /*(U+27E8 MATHEMATICAL LEFT ANGLE BRACKET)*/
> #define XKB_KEY_decimalpoint                  0x0abd  /*(U+002E FULL STOP)*/
> #define XKB_KEY_rightanglebracket             0x0abe  /*(U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET)*/

For two of these keysyms, I managed to find at least one application
that agrees with the current Emacs mapping that we now consider
changing:
> {0xabc, 0x2329},
> {0xabe, 0x232a},
See https://fossies.org/dox/putty-src/xkeysym_8c_source.html

I believe that we should consider carefully whether changing these two
mappings could introduce a regression for some use case, e.g.
PuTTY/ssh/emacs.

My proposed changes are attached.

[-- Attachment #2: bug-37530.diff --]
[-- Type: text/x-patch, Size: 2895 bytes --]

diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 56061371fe..17bbbaeb12 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -579,6 +579,7 @@ as returned by `x-server-vendor'."
 	(#x6aa . ?њ)
 	(#x6ab . ?ћ)
 	(#x6ac . ?ќ)
+	(#x6ad . ?ґ) ;; Source: xkbcommon-keysyms.h
 	(#x6ae . ?ў)
 	(#x6af . ?џ)
 	(#x6b0 . ?№)
@@ -594,6 +595,7 @@ as returned by `x-server-vendor'."
 	(#x6ba . ?Њ)
 	(#x6bb . ?Ћ)
 	(#x6bc . ?Ќ)
+	(#x6bd . ?ґ) ;; Source: xkbcommon-keysyms.h
 	(#x6be . ?Ў)
 	(#x6bf . ?Џ)
 	(#x6c0 . ?ю)
@@ -810,6 +812,7 @@ as returned by `x-server-vendor'."
 	(#xaa8 . ? )
 	(#xaa9 . ?—)
 	(#xaaa . ?–)
+	(#xaac . ?␣) ;; Source: xkbcommon-keysyms.h
 	(#xaae . ?…)
 	(#xaaf . ?‥)
 	(#xab0 . ?⅓)
@@ -822,7 +825,15 @@ as returned by `x-server-vendor'."
 	(#xab7 . ?⅚)
 	(#xab8 . ?℅)
 	(#xabb . ?‒)
+	;; In xkbcommon-keysyms.h, the keysyms 0xabc and 0xabe are listed as
+	;; U+27E8 and U+27E9 respectively. However, the parenthesis indicate
+	;; that these mappings are not one-to-one and that these keysyms are
+	;; deprecated. 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: xkbcommon-keysyms.h
 	(#xabe . ?〉)
 	(#xac3 . ?⅛)
 	(#xac4 . ?⅜)
@@ -839,6 +850,7 @@ as returned by `x-server-vendor'."
 	(#xad2 . ?“)
 	(#xad3 . ?”)
 	(#xad4 . ?℞)
+	(#xad5 . ?‰) ;; Source: xkbcommon-keysyms.h
 	(#xad6 . ?′)
 	(#xad7 . ?″)
 	(#xad9 . ?✝)
@@ -883,20 +895,28 @@ as returned by `x-server-vendor'."
 	(#xba8 . ?∨)
 	(#xba9 . ?∧)
 	(#xbc0 . ?¯)
-	(#xbc2 . ?⊥)
+	(#xbc2 . ?⊤)
+	;; Source for #xbc2: xkbcommon-keysyms.h. Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is incorrect.
 	(#xbc3 . ?∩)
 	(#xbc4 . ?⌊)
 	(#xbc6 . ?_)
 	(#xbca . ?∘)
 	(#xbcc . ?⎕)
-	(#xbce . ?⊤)
+	(#xbce . ?⊥)
+	;; Source for #xbce: xkbcommon-keysyms.h. Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is incorrect.
 	(#xbcf . ?○)
 	(#xbd3 . ?⌈)
 	(#xbd6 . ?∪)
 	(#xbd8 . ?⊃)
 	(#xbda . ?⊂)
-	(#xbdc . ?⊢)
-	(#xbfc . ?⊣)
+	(#xbdc . ?⊣)
+	;; Source for #xbdc: xkbcommon-keysyms.h. Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is incorrect.
+	(#xbfc . ?⊢)
+	;; Source for #xbfc: xkbcommon-keysyms.h. Note that the
+	;; `KEYSYM Encoding' appendix to the X protocol definition is incorrect.
 	;; Hebrew
 	(#xcdf . ?‗)
 	(#xce0 . ?א)
@@ -1143,6 +1163,9 @@ as returned by `x-server-vendor'."
 ;; #x0aff	CURSOR	Publish
 ;; #x0dde	THAI MAIHANAKAT	Thai
 
+;; However, xkbcommon-keysyms.h do have mappings for #x0aac and #x0abd,
+;; which are used above.
+
 \f
 ;;;; Selections
 

  reply	other threads:[~2019-09-27 17:19 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAJ40yaw0VpTnUZp5fWngijvntNxSwq7ZiRZZXJYMcFxiXDY2hQ@mail.gmail.com \
    --to=mail@axelsvensson.com \
    --cc=37530@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.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 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).