From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution Date: Fri, 5 Nov 2021 01:00:59 -0700 Message-ID: References: <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> <83ee7vdped.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25801"; mail-complaints-to="usenet@ciao.gmane.io" Cc: db48x@db48x.net, cpitclaudel@gmail.com, yuri.v.khan@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 05 09:02:54 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 1miuBa-0006Re-Tf for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 09:02:54 +0100 Original-Received: from localhost ([::1]:52852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miuBZ-00018Z-18 for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 04:02:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miu9r-0008V1-ST for emacs-devel@gnu.org; Fri, 05 Nov 2021 04:01:07 -0400 Original-Received: from mail-pf1-f181.google.com ([209.85.210.181]:40806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miu9m-0007UP-4b; Fri, 05 Nov 2021 04:01:07 -0400 Original-Received: by mail-pf1-f181.google.com with SMTP id g11so8204486pfv.7; Fri, 05 Nov 2021 01:01:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=HFwRW8PEGVSTe7UDMFkA8U4+Av3LD93SdQBShERgnxk=; b=VuPSJtXKSW8Yi74yvpMqTTOP9XVCN2Ip+hlrt1vVWs/uS/4T5tM10Pp5zWumIlc/JJ TOOcxzN69BCYxF5gBauN9u1GzNqSh+jH2sQlTMfuofl21rFMp60/V/DtgoV1qsTHv0Mp 0/FjO9/O8WPBXWqpcZH6S97IfIBPEv9eJ6Gu800+/zLQruA//0bOSvfgFn0loQm6TWL9 f5I4ygJzqc+gb9fAFYeNmSRzlyIpO/wdO29NSSRuXHmdNbtu57rN32mVL4qgvSk9wn8v 7VoOK+Rn0/4fg6yfWv+tspCJMsCI48NyToBe1SfTx3kg5O9Ky9CTF/UYmZQLfGjUTslc mzHA== X-Gm-Message-State: AOAM532/uXAp5Na74a4vq0jZcvTDFVGxFqVesYTYOaOOSAYv9cfa04jG 6xEayclU9pyVksjkFJnjJ6y6TQZgliV4MF/LZpXvfBZU X-Google-Smtp-Source: ABdhPJygoAL6Is/vckh4rvRHVtZ/9YTcLJk3ygpVMAgFaq17e3FK3wUdJeHdhrYBdRBzbmhqugyDGG34PPCUyx9+N44= X-Received: by 2002:a05:6a00:244d:b0:44d:c279:5155 with SMTP id d13-20020a056a00244d00b0044dc2795155mr57107843pfj.0.1636099260247; Fri, 05 Nov 2021 01:01:00 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 5 Nov 2021 01:00:59 -0700 In-Reply-To: <83ee7vdped.fsf@gnu.org> Received-SPF: pass client-ip=209.85.210.181; envelope-from=stefankangas@gmail.com; helo=mail-pf1-f181.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:278745 Archived-At: Eli Zaretskii writes: >> 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. We would need to mark those uses as okay, of course. >> 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? The idea is to make the programmer explicitly say yes to using these characters. (Or at the very least give them a way to say no, but I'd much prefer the former.)