From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bidirectional text and URLs Date: Sat, 29 Nov 2014 20:24:32 +0200 Message-ID: <83y4qtamqn.fsf@gnu.org> References: <87a93cngwv.fsf@uwakimon.sk.tsukuba.ac.jp> <837fyfml31.fsf@gnu.org> <874mtio7wh.fsf@uwakimon.sk.tsukuba.ac.jp> <83r3wml8kq.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417285507 18191 80.91.229.3 (29 Nov 2014 18:25:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Nov 2014 18:25:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 29 19:24:56 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XumhT-0005AY-RR for ged-emacs-devel@m.gmane.org; Sat, 29 Nov 2014 19:24:56 +0100 Original-Received: from localhost ([::1]:48433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XumhT-0003Hs-Bx for ged-emacs-devel@m.gmane.org; Sat, 29 Nov 2014 13:24:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XumhJ-0003HZ-G3 for emacs-devel@gnu.org; Sat, 29 Nov 2014 13:24:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XumhC-0007gm-Jm for emacs-devel@gnu.org; Sat, 29 Nov 2014 13:24:45 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:46757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XumhC-0007gY-Bd for emacs-devel@gnu.org; Sat, 29 Nov 2014 13:24:38 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NFT00I00BZJHP00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sat, 29 Nov 2014 20:24:36 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFT00I2CCGWCJ50@a-mtaout20.012.net.il>; Sat, 29 Nov 2014 20:24:32 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178470 Archived-At: > From: Lars Magne Ingebrigtsen > Date: Sat, 29 Nov 2014 18:54:43 +0100 > > Lars Magne Ingebrigtsen writes: > > > So... would a possible solution here be as simple as removing all > > right-to-left indicators in mail and web modes if those right-to-left > > indicators apply to URLs? > > Or even simpler: The URL-finding functions would explicitly place > left-to-right markers over the bits of the URL that have left-to-right > characters if there are any RTL markers in the buffer. > > This would make all the bits that say "http://example.com" etc be > left-to-right, and if there are bits in the URL later that contains, > say, Hebrew, those would still be displayed correctly. Please don't: you will never be able to do that correctly without re-implementing bidi.c in Lisp. The UBA rules are much more complex than what you seem to envision; in particular, a character can be neither RTL nor LTR (so called "weak" and "neutral" characters, like the slash and the period). In any case, I think what you suggest is too drastic. We don't need to change the display of these URLs from their intended one, we just need to make the user aware of the possible phishing. E.g., with your suggestion, a Web page that explain how the URL you posted at the beginning could be dangerous won't be able to make its point clearly visible ;-)