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 considered harmful Date: Sat, 06 Nov 2021 14:20:26 +0200 Message-ID: <83a6ihbhmd.fsf@gnu.org> References: <83bl2ycqvc.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16563"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Vasilij Schneidermann Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 06 13:21:56 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 1mjKhn-00045h-8g for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 13:21:55 +0100 Original-Received: from localhost ([::1]:56268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjKhl-00065C-U9 for ged-emacs-devel@m.gmane-mx.org; Sat, 06 Nov 2021 08:21:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjKgd-00052C-2o for emacs-devel@gnu.org; Sat, 06 Nov 2021 08:20:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42368) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjKgb-0004Fj-Ll; Sat, 06 Nov 2021 08:20:41 -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=hjcv2znHTPDqWzB+BOvzSgs6JdUS7MQRXpBGEO2QKmo=; b=WTDJSoEhm92n Hy/qoGqh4oS5edQnWi+zhUqw/lviNYa2kqCgjm5bM4s55Kgxp7qpMtdFj/CZGqeYe0DAzG4Q0mtz+ ZRjzYuGLUdKDhk9W/nNTx71t7i32a/ar99fqRm5HppdoN6m2CC+MXFMqUNIYztZXayFmyYsEcD8Fv 5Gi23lj/Q9xGztR0feQ1OZxI3xOhWI9w6WVc9ySLzoa+ZURznaw4tFtXnnQFMZAICmpgtpTeX5Rgu h1W5MaQCJJC6QRB6IStrsEOO8rR7m6tN6ZhZ3kVNFh/zb/jJueAcqKm6y3EVtaStjVypP3X3IdFv/ wa/XFZrCehKArYYI2HAkjQ==; Original-Received: from [87.69.77.57] (port=2550 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 1mjKgb-0005q9-4H; Sat, 06 Nov 2021 08:20:41 -0400 In-Reply-To: (message from Vasilij Schneidermann on Sat, 6 Nov 2021 12:56:29 +0100) 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:278864 Archived-At: > Date: Sat, 6 Nov 2021 12:56:29 +0100 > From: Vasilij Schneidermann > Cc: emacs-devel@gnu.org > > > Disabling bidi in Emacs is asking for trouble because one cannot do > > that and rely on the display engine to still work correctly in all > > cases. Bidirectional support is nowadays hardwired into the display > > engine and cannot be disabled completely. > > If it works correctly in all the cases not using RTL scripts, that's > fine by me. That's not something I can say. It's unreliable because some parts of the display engine assume that bidi reordering always happens. I didn't try to find in which cases the result is OK, and don't intend investing any time in doing so. > And I'm far from the only one thinking like that. If there are volunteers interested in adding such a feature to Emacs, let them send patches. The Emacs development team decided long ago to make the reordering an inherent feature that doesn't need to be turned off, and the development in the display engine since then didn't bother to keep 2 separate code paths, one each for every value of bidi-display-reordering. And that's what we have now. > > Please try the new command highlight-confusing-reorderings (available > > on master), it is supposed to be the way to detect suspicious > > reorderings without falsely flagging any legitimate ones. (I can > > easily understand how mentioning it could drown in the sea of the > > other messages in this thread; sorry about that.) > > I'm specifically not talking about reordering characters, but > confusables, that is, characters that look visually identical. See > https://unicode.org/reports/tr39/#Confusable_Detection for further > elaboration on the topic. Hence the change of the subject line. That's supposed to be the subject of uni-confusables in ELPA, I think. It has nothing to do with bidirectional reordering, AFAIU. If uni-confusables doesn't do its job well enough, please submit bug reports.