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 20:12:21 +0000 Message-ID: <11d5fecb440d9c4d0e6a@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24586"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , Eli Zaretskii , Andreas Schwab , 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 21:13:27 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 1miMdS-0006Dx-LS for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 21:13:26 +0100 Original-Received: from localhost ([::1]:52304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miMdR-0002D9-NY for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Nov 2021 16:13:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMcU-0001X8-Hf for emacs-devel@gnu.org; Wed, 03 Nov 2021 16:12:26 -0400 Original-Received: from heytings.org ([95.142.160.155]:51668) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miMcS-0005T8-C9; Wed, 03 Nov 2021 16:12:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1635970341; bh=gQaM+Xvg3+DxFcyNOSCkEamXNb3wujGdQ1fgslJPH4E=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Elz0qAqEr93CXrMPETKp2eV+ep67JDr3u5Mj2zahSGYeFVi3syPSm2Wv9fx8OupP+ ozoZxrUnPW5ol1dpBFfKG5tU0kKA3H0T55LYz+jAy7cBDlrEwG+d9xSn0cw0Sq6HNU 0D4wA0oIIF4agJUbi4awgw7sGSfqKc8G7ColfeDT4gbQ4M6dfT2gcuLxMP+uMeTjKT LntFqvIaPSq8apgm5J7nW8qU1ZX0mabpDlvON5EALEK/aoLPSIpCmd7LdV4AYEJUOF NWK3KuMUuUm68iRU2mg4WXYoTAILEKG2o1cUDTtPgmWr/p0PFrBD/qtxAxZ+UZ6x13 vnrsy0P2TTyug== In-Reply-To: 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:278625 Archived-At: >> + '(("\N{LEFT-TO-RIGHT EMBEDDING}\\|\N{RIGHT-TO-LEFT EMBEDDING}\\|\ >> +\N{LEFT-TO-RIGHT OVERRIDE}\\|\N{RIGHT-TO-LEFT OVERRIDE}\\|\ >> +\N{LEFT-TO-RIGHT ISOLATE}\\|\N{RIGHT-TO-LEFT ISOLATE}\\|\ >> +\N{FIRST STRONG ISOLATE}\\|\N{POP DIRECTIONAL FORMATTING}\\|\ >> +\N{POP DIRECTIONAL ISOLATE}" . (0 'font-lock-warning-face t))))) > > A [...] would be a lot more efficient than this "...\\|...\\|...\\|...". > >> +(defun bidi-reordering-character-toggle-visibility () >> + "Toggle the visibility of bidi reordering characters." >> + (interactive) >> + (setq bidi-reordering-characters-visible >> + (not bidi-reordering-characters-visible)) > > Aka > > (define-minor-mode bidi-reordering-characters-visible > "Make the bidi reordering characters visible." > :global t > ...) > (define-obsolete-function-alias > 'bidi-reordering-character-toggle-visibility > #'bidi-reordering-characters-visible "...") > Thanks for your comments! Indeed and indeed. I did not spend enough time tweaking that code, given that Eli already said he doesn't want it.