emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode confusables and reordering characters considered harmful, a


From: Yuri Khan
Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution
Date: Thu, 4 Nov 2021 01:45:17 +0700

On Thu, 4 Nov 2021 at 00:56, Eli Zaretskii <eliz@gnu.org> wrote:

> The problem with these remappings is that you then get to somehow
> discern between the remapped characters and the real characters which
> look identically on display.

Real characters are fontified as whichever syntax unit they belong to.
Remapped characters are fontified as whitespace-space-face or
whitespace-hspace-face depending on whether you add them to
whitespace-space-regexp or whitespace-hspace-regexp. (I’m interpreting
Daniel as wanting to add two more customization points, perhaps
whitespace-bidi-regexp and whitespace-bidi-face, and a new enum value
for use in whitespace-style.)

> Also, this will disrupt alignment

We already have this issue with TABs — when a tab would expand to a
single space, a remapped tab expands to its replacement glyph and a
whole tab-width’s worth of spaces. Yes, it’s slightly annoying.

> and make text using these controls
> much harder to read.  E.g., the few places in TUTORIAL.he which use
> those controls are barely readable after turning the above on.

I tried that and I find it okay. When reading the text, I tune out the
yellow (my whitespace-hspace-face), and when focusing on formatting, I
tune out the gray (default). Same as my mother used to focus on black
Latin or red Cyrillic letters when she was learning to type on a
computer keyboard.

Perhaps a subtler face or glyphs will make the issue less annoying
while keeping its usefulness.

> Anyway, if one wants to be able to highlight certain characters on
> display, one could also use highlight-regexp, I think.

One does not only want to highlight, but also to actually see and
distinguish certain characters, including the case where several
consecutive such characters are present. Unfortunately for alignment,
this requires width.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]