From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution Date: Wed, 03 Nov 2021 22:08:00 +0200 Message-ID: <831r3xgfz3.fsf@gnu.org> References: <875ytag0hb.fsf@yahoo.com> <87zgqmd5np.fsf@mat.ucm.es> <83wnlqk3rn.fsf@gnu.org> <72dd5c2a-42c7-b12e-05ed-e93adbd89727@gmail.com> <83ilxajyhw.fsf@gnu.org> <83fssejxf8.fsf@gnu.org> <835ytajsv2.fsf@gnu.org> <831r3yjqo9.fsf@gnu.org> <83v91aibe7.fsf@gnu.org> <87o872s0wf.fsf_-_@db48x.net> <83lf25gm1j.fsf@gnu.org> <83ee7xgio2.fsf@gnu.org> <87fssdrp54.fsf@db48x.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9224"; mail-complaints-to="usenet@ciao.gmane.io" Cc: cpitclaudel@gmail.com, emacs-devel@gnu.org, stefan@marxist.se, monnier@iro.umontreal.ca, yuri.v.khan@gmail.com To: Daniel Brooks Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 03 21:10:12 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miMaJ-0002DR-V5 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 21:10:12 +0100 Original-Received: from localhost ([::1]:46436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miMaH-0006IA-Gl for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 16:10:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMYI-0003WL-Or for emacs-devel@gnu.org; Wed, 03 Nov 2021 16:08:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMYE-0002sJ-MH; Wed, 03 Nov 2021 16:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0rz4Oi2mYPgUDxY5z7E36HKBGdN6wJKC/PDIgv4kUtI=; b=QvZ+YgnJ9I+4xhNlXeYK 583ck5vM1FkfPGJIQuwP0fEcXzKkPcYNXaEJVth/Z+Dl7jGn2wUgoKUBX/YH1TjfqU/7TVt2Zps/6 ENuSs1bXQSShZUivGibybpg7qVecjj04cfQU6Te1Rx0RR1Qm2qt73rOOGCajNHIkQFNJdnxbX0Unx TyTGZw85OETI7ToaRFHzv2Wjx71r32hpqdFrC70GZMYC6IMQrIuVRkARnWHWSXM2/ZlZG427t/QU4 vyvNvQK8G6nEzekKsNMmRWiMfzvxRYiPvG8EhsT/0APdkmN62R+JZU0TBjRP9nnQkAIoYTWWdP+4G jSpYncWLasgSKw==; Original-Received: from [87.69.77.57] (port=1367 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMYE-0000Sr-50; Wed, 03 Nov 2021 16:08:02 -0400 In-Reply-To: <87fssdrp54.fsf@db48x.net> (message from Daniel Brooks on Wed, 03 Nov 2021 12:54:31 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278624 Archived-At: > From: Daniel Brooks > Cc: Yuri Khan , cpitclaudel@gmail.com, > stefan@marxist.se, monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Wed, 03 Nov 2021 12:54:31 -0700 > > > Do you read Hebrew? Those characters look like line noise there, > > whereas the text with the default display is perfectly readable, and > > most people won't even know these controls are there (as intended). > > My suggestion is to only enable it by default in _programming modes_. It > should remain disabled in ordinary prose like a TUTORIAL file. What about comments and strings? Are we going to pretend that RTL scripts aren't used in those? > > What for? The absolute majority of people won't have any idea what is > > the effect of each of these controls, and how it differs from others. > > Even I many times need to talk myself through their effect on display. > > The UBA spec weighs in at more than 30 pages of highly technical text, > > and I don't expect people to memorize it by heart. > > I totally agree, but I think that this is not very relevant. The whole > point is for a programmer who is unaware of BiDi in general to go “WTF‽” > when these characters show up in a source file one day, so that they can > have something to ask questions about. > > `what-cursor-position' will show the face, once a face is available, and > it also shows the name of the character. Both are good ways for the user > to find more information, and in principle we could have it show other > information as well. We could pull a description from the Unicode > database perhaps, or just add extra help messages for individual > characters. Now that I think about it, maybe we should just show the > docstring for the face right there next to the name. That would save me > a step from time to time, if nothing else. You are welcome to make such customizations in your Emacs. My point is that for a useful feature that doesn't get in the way when those controls are used for legitimate purposes, and only highlights _text_ (NOT the controls!) whose appearance may have been altered by them for questionable or suspicious reasons -- for such a useful feature what you propose is not enough for having it in Emacs for everyone. It is a blunt weapon that I would be ashamed to install.