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: Fri, 05 Nov 2021 09:37:14 +0200 Message-ID: <83ee7vdped.fsf@gnu.org> References: <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> <831r3xgfz3.fsf@gnu.org> <87v918qx37.fsf@db48x.net> <83o870fjqg.fsf@gnu.org> <87k0hnqr1v.fsf@db48x.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30863"; mail-complaints-to="usenet@ciao.gmane.io" Cc: db48x@db48x.net, cpitclaudel@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, yuri.v.khan@gmail.com To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 05 08:38:13 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 1mitnf-0007oy-TN for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 08:38:12 +0100 Original-Received: from localhost ([::1]:33838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mitnd-0003tU-PY for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 03:38:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mitn4-0003DE-QH for emacs-devel@gnu.org; Fri, 05 Nov 2021 03:37:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mitn2-0004hN-Le; Fri, 05 Nov 2021 03:37:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YFHAue5DAJCyTAVS6PzuzGqMV7ob8bQUyjilvm4Y1Ok=; b=obFLNdFa8EzN dPyGMuKihf/8wl0ZxPxfGBMA55tI0RHBpARhEGC1zUm32yJJHMLI+U6ar3cttZKmGKTxmnCQXrmdQ IWvRuEL3ITWBTfMEJSr3aZj3Ee9945W9WlIPPxMJcUZxN/IJvMvNgpNybz2chmCWEyj3okQw+T6yE W1Yqr3dg1RgG0CJp1vn7ERDb5oahshQc44c3p7/OsT4j7T3rn+LCUVs3eQ043h7BorrT3ZT7v/3Ho k6yYVvA37IzGymcG7F7rCLaqP84/3Xt67n+Y4j2gQaguY47KNJRME9t2mM8ZzpT21tEKqbaczp81m u/clVOWo0/Q0EvmDZh/ltQ==; Original-Received: from [87.69.77.57] (port=4198 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 1mitn2-0007Vm-6g; Fri, 05 Nov 2021 03:37:32 -0400 In-Reply-To: (message from Stefan Kangas on Thu, 4 Nov 2021 20:52:21 -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:278743 Archived-At: > From: Stefan Kangas > Date: Thu, 4 Nov 2021 20:52:21 -0700 > Cc: cpitclaudel@gmail.com, yuri.v.khan@gmail.com, monnier@iro.umontreal.ca, > emacs-devel@gnu.org > > In any case, the above leads me back to the simple idea to raise > byte-compiler (or even `read'?) warnings for the problematic control > characters unless a specific variable is set to t, or unless the piece > of code using them is wrapped in some `with-suppressed-warnings' call. That would flag our own code, because we sometimes wrap strings in these directional format control characters, to avoid confusing display. Those are exactly the valid uses of these characters, ones against which it makes no sense to issue a warning. > Or we do it the other way around: users mark a source code file to say > that "this file will never contain RTL characters" (but RTL scripts in > ELisp code is pretty uncommon, I think). So now everyone is suspect unless certified otherwise? How does this make sense? > > Instead I think that Emacs should adopt a similar fast > > strategy. Anything we do today can be refined later. > > FWIW, I tend to agree with this. I don't. FWIW, I should probably say, because it seems my opinions in these matters aren't worth much here, the years I spent studying them and coding for them in Emacs notwithstanding.