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: Eli Zaretskii
Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution
Date: Wed, 03 Nov 2021 15:30:55 +0200

> From: Daniel Brooks <db48x@db48x.net>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,  cpitclaudel@gmail.com,
>   stefan@marxist.se,  emacs-devel@gnu.org
> Date: Tue, 02 Nov 2021 14:28:16 -0700
> 
> > That's what bidi-find-overridden-directionality already does, albeit
> > not yet for the specific examples in that paper.  But Someone™ should
> > write a minor mode or an optional display feature which uses that
> > function to highlight the problematic stretches of text on display,
> > using the function's output for finding such stretches of text.
> 
> We already have it; it is called whitespace-mode. It’s not perfect, but
> this morning I customized mine to make these characters more obvious:

The idea of detecting these problems is not just highlight specific
characters, because those characters are generally harmless when used
for valid purposes.  Blindly highlighting them will just distract
people and sometimes annoy them, which in some cases will cause them
to turn off the annoying feature.

Here, try your customizations on the following completely innocent
text:

   abcd ‮⁧⁩‬xyz

or on this:

   Char: ‮‬‎ (8238, #o20056, #x202e, file ...) point=2080 of 4903 (42%) column=8

(The latter is what "C-x =" produces in Emacs, and for a good reason.)

Why would we want such legitimate uses of these characters light up on
display like a Christmas tree?

The idea is to identify the suspicious uses of these formatting
controls, and highlight only those suspicious uses.  That would give
our users a much more reliable tool that could perhaps even be turned
on by default in most, if not all, buffers.

Let's not settle for a simplistic implementation just because it's
easier.

> I suggest that we include something along these lines in Emacs, and turn
> on whitespace-mode by default in all programming modes.

Sorry, no.  We have a much better facility implemented already, so
let's use it instead.



reply via email to

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