From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Unicode confusables and reordering characters considered harmful, a simple solution Date: Thu, 4 Nov 2021 00:41:07 +0700 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11423"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Emacs developers , Stefan Kangas , =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= , Stefan Monnier To: Daniel Brooks Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 03 18:46:20 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 1miKL4-0002al-B0 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 18:46:18 +0100 Original-Received: from localhost ([::1]:36182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miKL2-0002hv-8q for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 13:46:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miKGJ-0006KW-8w for emacs-devel@gnu.org; Wed, 03 Nov 2021 13:41:25 -0400 Original-Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]:36705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miKGG-00075G-PW; Wed, 03 Nov 2021 13:41:22 -0400 Original-Received: by mail-vk1-xa2e.google.com with SMTP id f126so1708670vke.3; Wed, 03 Nov 2021 10:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=34kQL6UjZcoo8AONWuibGyQpgFILk7e8JrFkhQgY2hE=; b=nI3TWD6+X2owVOBoCfN05iJ8HOF2Muqc6EJN0dIqEIn+A6z0GOx3HxsJFk38R6cYsI LAhma/RBVv2wYcyDfK80GXoP8whWnv1s4ky/mDlmlZ9FoIIFca+iUBW3UtWsXJUo4Bu6 7rYkdEQM5fowYYG+dVEbGdbJYMYsSL48QS6rm4L1foLmB4EQuI0LI2WI8iOncE8pubwS L6HVIGBelOX7qWvI7zCMNa4hi+w/3r7IXFb54qakpAJXTArOToPZ1LXhMpoBDcd8Y5s7 vI+IPdcVkCakUZmuD26/66xanBQAF7Xmx13eDWSLds4ncO92DZybAw9piTlEbEiHXSyQ 5i2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=34kQL6UjZcoo8AONWuibGyQpgFILk7e8JrFkhQgY2hE=; b=HV4b4UXqQU4ELoJZ7YOS+rClnuhjbiCuvwMEgG8CWZBCsvZAzngxI/azvIPKoJvy/h O5hoDdLV+f/SCPLE0E2CfxIyKmHQ/li9Q+MKm1n0fuUbI2mWuMkkVJfUzfYDuk3N0Z2e 8suLC+fiEJlfgVo2CbhFKjP0A1FifOfWJc8Mb6dfTgg9+Vf0zEPaLpeA9zjlMuyjSqUf strT8c4kxg8aMCkmBa3pfLb8U5BLniqQT2fnlPny7hCdsUeNmq3YzA7ThoBmuZgwo4zH yXFPCaKVzoCYj4W5GOkzFDvWJuFdJAyuhu2wlN/PbFFDHgo/N+aiShWQtBedcj1aHiIx GHqw== X-Gm-Message-State: AOAM530wepA5DrVGolWwv4fHoTf//IDzRNxMJ3WuKRGvB67YnXXz749a XK2OJyPC3GosvxtVHVcaJ11+tDwomSHEkhcWDmQ= X-Google-Smtp-Source: ABdhPJxQmKor2ec7p3VpbupqmkPRVOdC0hRkVxMFkQLZK+ozE8O1Hft8c3Q11Zid+H8dGNsJK1AiC1pk8boPG7En+rs= X-Received: by 2002:a05:6122:d07:: with SMTP id az7mr6435338vkb.22.1635961278879; Wed, 03 Nov 2021 10:41:18 -0700 (PDT) In-Reply-To: <87o872s0wf.fsf_-_@db48x.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::a2e; envelope-from=yurivkhan@gmail.com; helo=mail-vk1-xa2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:278593 Archived-At: On Wed, 3 Nov 2021 at 04:29, Daniel Brooks wrote: > We already have it; it is called whitespace-mode. It=E2=80=99s not perfec= t, but > this morning I customized mine to make these characters more obvious: > > (custom-set-variables > '(whitespace-display-mappings > '((space-mark 32 [183] [46]) > (space-mark 160 [164] [95]) > (newline-mark 10 [36 10]) > (tab-mark 9 [187 9] [92 9]) > (space-mark #x202A [#x21D2]) ; =E2=87=92 LEFT-TO-RIGHT EMBEDDING > (space-mark #x202B [#x21D0]) ; =E2=87=90 RIGHT-TO-LEFT EMBEDDING > (space-mark #x202D [#x2192]) ; =E2=86=92 LEFT-TO-RIGHT OVERRIDE > (space-mark #x202E [#x2190]) ; =E2=86=90 RIGHT-TO-LEFT OVERRIDE > (space-mark #x2066 [#x21E5]) ; =E2=87=A5 LEFT-TO-RIGHT ISOLATE > (space-mark #x2067 [#x21E4]) ; =E2=87=A4 RIGHT-TO-LEFT ISOLATE > (space-mark #x2068 [#x21A7]) ; =E2=86=A7 FIRST STRONG ISOLATE > (space-mark #x202C [#x21D1]) ; =E2=87=91 POP DIRECTIONAL FORMATTING > (space-mark #x2069 [#x2912]) ; =E2=A4=92 POP DIRECTIONAL ISOLATE > ))) I like! I already enable whitespace-mode in prog-mode and text-mode (and that leaves out read-only modes such as Info and Dired where I don=E2=80=99t want visible whitespace, and various unclassified modes such = as conf-mode where I do but haven=E2=80=99t gotten around to setting them all up).