unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [RFC] [PATCH] Change default display of variation selectors
@ 2021-09-20 21:04 Robert Pluim
  2021-09-21  8:28 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Pluim @ 2021-09-20 21:04 UTC (permalink / raw)
  To: emacs-devel


etc/TODO says:
*** Consider changing the default display of Variation Selectors

Attached a patch to use 'zero-width for them by default (since theyʼre
frigging annoying). We could use 'thin-space by default I suppose. Do
we need to support VS-16 through VS-32 as well?

Robert
-- 

diff --git i/lisp/international/characters.el w/lisp/international/characters.el
index e08dc27549..5260aa2a24 100644
--- i/lisp/international/characters.el
+++ w/lisp/international/characters.el
@@ -1540,6 +1540,9 @@ update-glyphless-char-display
 	    ((eq target 'c1-control)
 	     (glyphless-set-char-table-range glyphless-char-display
 					     #x80 #x9F method))
+	    ((eq target 'variation-selectors)
+	     (glyphless-set-char-table-range glyphless-char-display
+					     #xFE00 #xFE0F method))
 	    ((eq target 'format-control)
 	     (when unicode-category-table
 	       (map-char-table
@@ -1575,6 +1578,7 @@ glyphless-set-char-table-range
 ;;; Control of displaying glyphless characters.
 (defcustom glyphless-char-display-control
   '((format-control . thin-space)
+    (variation-selectors . zero-width)
     (no-font . hex-code))
   "List of directives to control display of glyphless characters.
 
@@ -1590,6 +1594,9 @@ glyphless-char-display-control
                     such as U+200C (ZWNJ), U+200E (LRM), but
                     excluding characters that have graphic images,
                     such as U+00AD (SHY).
+  `variation-selectors': U+FE00..U+FE0F, used for choosing between
+                         glyph variations (e.g. Emoji vs Text
+                         presentation).
   `no-font':        characters for which no suitable font is found.
                     For character terminals, characters that cannot
                     be encoded by `terminal-coding-system'.
@@ -1607,7 +1614,7 @@ glyphless-char-display-control
 only via a custom `:set'
 function (`update-glyphless-char-display'), which updates
 `glyphless-char-display'."
-  :version "24.1"
+  :version "28.1"
   :type '(alist :key-type (symbol :tag "Character Group")
 		:value-type (symbol :tag "Display Method"))
   :options '((c0-control
@@ -1628,6 +1635,12 @@ glyphless-char-display-control
 		      (const :tag "Display as empty box" empty-box)
 		      (const :tag "Display acronym" acronym)
 		      (const :tag "Display hex code in a box" hex-code)))
+	     (variation-selectors
+	      (choice (const :tag "Don't display" zero-width)
+		      (const :tag "Display as thin space" thin-space)
+		      (const :tag "Display as empty box" empty-box)
+		      (const :tag "Display acronym" acronym)
+		      (const :tag "Display hex code in a box" hex-code)))
 	     (no-font
 	      (choice (const :tag "Don't display" zero-width)
 		      (const :tag "Display as thin space" thin-space)



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC] [PATCH] Change default display of variation selectors
  2021-09-20 21:04 [RFC] [PATCH] Change default display of variation selectors Robert Pluim
@ 2021-09-21  8:28 ` Eli Zaretskii
  2021-09-21  9:50   ` Robert Pluim
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-09-21  8:28 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

> From: Robert Pluim <rpluim@gmail.com>
> Date: Mon, 20 Sep 2021 23:04:10 +0200
> 
> 
> etc/TODO says:
> *** Consider changing the default display of Variation Selectors
> 
> Attached a patch to use 'zero-width for them by default (since theyʼre
> frigging annoying). We could use 'thin-space by default I suppose.

I think thin-space is better.  Emacs doesn't normally hide any
characters entirely from display, so zero-width sounds too radical to
me.

> Do we need to support VS-16 through VS-32 as well?

You mean through VS-256, right?  No, I don't think we should, not
unless we support the sequences with these selectors.

Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] [PATCH] Change default display of variation selectors
  2021-09-21  8:28 ` Eli Zaretskii
@ 2021-09-21  9:50   ` Robert Pluim
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Pluim @ 2021-09-21  9:50 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>>>>> On Tue, 21 Sep 2021 11:28:36 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Date: Mon, 20 Sep 2021 23:04:10 +0200
    >> 
    >> 
    >> etc/TODO says:
    >> *** Consider changing the default display of Variation Selectors
    >> 
    >> Attached a patch to use 'zero-width for them by default (since theyʼre
    >> frigging annoying). We could use 'thin-space by default I suppose.

    Eli> I think thin-space is better.  Emacs doesn't normally hide any
    Eli> characters entirely from display, so zero-width sounds too radical to
    Eli> me.

OK

    >> Do we need to support VS-16 through VS-32 as well?

    Eli> You mean through VS-256, right?  No, I don't think we should, not
    Eli> unless we support the sequences with these selectors.

Hmm, thatʼs a good question. I donʼt know. I mean, we set up
composition rules for them, presumably to cater for IVD, but I have no
idea if those work.

Robert
-- 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-21  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 21:04 [RFC] [PATCH] Change default display of variation selectors Robert Pluim
2021-09-21  8:28 ` Eli Zaretskii
2021-09-21  9:50   ` Robert Pluim

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