From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Unicode confusables and reordering characters considered harmful Date: Wed, 03 Nov 2021 22:03:42 +0000 Message-ID: <11d5fecb4446d054126b@heytings.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> <11d5fecb44af1d388b7f@heytings.org> <11d5fecb449846dc0851@heytings.org> <875yt932ar.fsf@igel.home> <11d5fecb441e697317f0@heytings.org> <11d5fecb440d9c4d0e6a@heytings.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="M12t8BfkT4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16128"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andreas Schwab , Eli Zaretskii , Stefan Kangas , cpitclaudel@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 03 23:13:00 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 1miOVA-0003xg-5X for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 23:13:00 +0100 Original-Received: from localhost ([::1]:51156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miOV8-0005eY-N9 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 18:12:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miOMG-0007j5-6i for emacs-devel@gnu.org; Wed, 03 Nov 2021 18:03:48 -0400 Original-Received: from heytings.org ([95.142.160.155]:51848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miOMD-0003QO-Cy; Wed, 03 Nov 2021 18:03:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1635977022; bh=Z0kZSGKUpOsl62a/B1vqDEiNuiR2Q59Vj3YReWtrML8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=pWx+mf+ZSYJVFEyC6c+5FQ9IztHMYHxo/W/pewEVGFKuZHDEjrBMknnnreGm1E1kp wpIfz31VSxHTpBExLxBufupKbah1bKjoWAQYQWAtseG6UQI8IDgLs99Z0RwcdIW77D zZEIHvU7J2CmCVKMrJPS0huDHOWq5EYrqCCtdCjGhcmeIMTIaeVL/tmdoQNZ8iSbFP SHvRRQwy00/0ZDExtIjqcAIR6VTtQGXSmSWFE8if4SthOWFrBqszrLA0LP0Pr4YODM FaAQgi+EovLZcpo5pLscMJ71sJJ4EZsviuBPPSHghKhAGtv4YpdBRX5/O341ms7c7r i5CRCS9CeQezA== In-Reply-To: <11d5fecb440d9c4d0e6a@heytings.org> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org 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, SPF_HELO_PASS=-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:278635 Archived-At: --M12t8BfkT4 Content-Type: text/plain; charset=us-ascii; format=flowed > > I did not spend enough time tweaking that code, given that Eli already > said he doesn't want it. > But I could not resist, I implemented your suggestions anyway ;-) Thanks again! --M12t8BfkT4 Content-Type: text/x-diff; name=Make-bidi-reordering-characters-visible.patch Content-Transfer-Encoding: base64 Content-ID: <11d5fecb445a300f96ac@heytings.org> Content-Description: Content-Disposition: attachment; filename=Make-bidi-reordering-characters-visible.patch RnJvbSA4YTRlZGEyZTQxN2MwZDdkNGNhNDQ4OWI5YzAyNTI1OGQ1M2YyMGMx IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBXZWQsIDMgTm92 IDIwMjEgMjE6NTQ6MDMgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gTWFrZSBi aWRpIHJlb3JkZXJpbmcgY2hhcmFjdGVycyB2aXNpYmxlDQoNCiogbGlzcC9w cm9nbW9kZXMvcHJvZy1tb2RlLmVsIChiaWRpLXJlb3JkZXJpbmctY2hhcmFj dGVycy12aXNpYmxlKToNCk5ldyBtaW5vciBtb2RlLg0KKGJpZGktcmVvcmRl cmluZy1jaGFyYWN0ZXJzLXZpc2libGUtLWZvbnRpZnksDQpiaWRpLXJlb3Jk ZXJpbmctY2hhcmFjdGVycy12aXNpYmxlLS10b2dnbGUpOiBOZXcgaGVscGVy IGZ1bmN0aW9ucy4NCihwcm9nLW1vZGUpOiBFbmFibGUgdGhlIG5ldyBtaW5v ciBtb2RlLg0KLS0tDQogbGlzcC9wcm9nbW9kZXMvcHJvZy1tb2RlLmVsIHwg NDMgKysrKysrKysrK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