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:47:26 +0200 Message-ID: <83vblxaloh.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> <83zjb9an0q.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417286868 5369 80.91.229.3 (29 Nov 2014 18:47:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Nov 2014 18:47:48 +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:47:41 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 1Xun3U-0007rt-TP for ged-emacs-devel@m.gmane.org; Sat, 29 Nov 2014 19:47:41 +0100 Original-Received: from localhost ([::1]:48488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xun3U-00089j-Ix for ged-emacs-devel@m.gmane.org; Sat, 29 Nov 2014 13:47:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xun3N-00089b-3J for emacs-devel@gnu.org; Sat, 29 Nov 2014 13:47:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xun3H-0006Ai-8j for emacs-devel@gnu.org; Sat, 29 Nov 2014 13:47:33 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:34815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xun3G-00069U-RZ for emacs-devel@gnu.org; Sat, 29 Nov 2014 13:47:27 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NFT00300D4W9S00@mtaout24.012.net.il> for emacs-devel@gnu.org; Sat, 29 Nov 2014 20:39:43 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFT00OWXD67YF20@mtaout24.012.net.il>; Sat, 29 Nov 2014 20:39:43 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 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:178473 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Sat, 29 Nov 2014 19:33:47 +0100 > > Eli Zaretskii writes: > > > I think instead of removing them it is better to display them > > prominently, e.g., by changing their entry in the > > glyphless-char-display char-table. The advantage is that you don't > > accidentally harm the display where these controls are used > > legitimately, and OTOH make their presence acutely evident. > > Yeah, isn't that a bit too intrusive if done generally? I didn't suggest to do that generally, just in Web pages. These format controls are discouraged in Web pages anyway; the use of HTML bidi markup dir="rtl" etc. is advised instead. > If we display these markers very visibly, then buffers where they > are legitimately used would be kinda ugly. I don't know why it would be "ugly". The text will still be displayed correctly, so it will be as legible as with our current bidi display. > And I don't think users would necessarily know that the URL is > displayed the wrong way around just because there's an ugly control > character displayed before or after the URL... I think the existence of a strange unprintable character in or around a URL should attract attention, which is all we need to accomplish. > >> But currently Emacs doesn't really have a mechanism for querying the > >> directionality of a buffer region, I think? > > > > What do you mean by "directionality of a buffer region"? At least > > under some definitions of that, I can think of a very easy > > implementation. > > When hitting RET on an URL, the function that handles that could ask > Emacs "is the http://domain.com bit displayed RTL or LTR"? If it's RTL, > then that function could "are you sure?" the user. You just replaced one not well-defined term with another. So now my question becomes what do you mean by "displayed RTL or LTR"? And mind you: the "domain" part can legitimately consist of RTL characters, if my reading of the respective RFCs is correct.