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: Sun, 30 Nov 2014 17:27:23 +0200 Message-ID: <83a938aeuc.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 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1417361275 23486 80.91.229.3 (30 Nov 2014 15:27:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Nov 2014 15:27:55 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 30 16:27:48 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 1Xv6Pa-0000Vw-L8 for ged-emacs-devel@m.gmane.org; Sun, 30 Nov 2014 16:27:47 +0100 Original-Received: from localhost ([::1]:50730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv6Pa-0005Ly-7v for ged-emacs-devel@m.gmane.org; Sun, 30 Nov 2014 10:27:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv6PH-0005LQ-Sz for emacs-devel@gnu.org; Sun, 30 Nov 2014 10:27:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xv6PB-0004E4-W4 for emacs-devel@gnu.org; Sun, 30 Nov 2014 10:27:27 -0500 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:50993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv6PB-0004Dm-J1; Sun, 30 Nov 2014 10:27:21 -0500 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NFU00800YM2C700@mtaout27.012.net.il>; Sun, 30 Nov 2014 17:22:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFU00N8QYQ9IK90@mtaout27.012.net.il>; Sun, 30 Nov 2014 17:22:57 +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.183 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:178519 Archived-At: > Date: Sun, 30 Nov 2014 04:38:14 -0500 > From: Richard Stallman > Cc: emacs-devel@gnu.org >=20 > > It seems pretty clear that stuff like >=20 > > http://myspace.com/#/segami/moc.koobecaf//:sptth >=20 > This is the first time I've observe RTL display in Emacs. I don't = see > any way to detect the magic character that specifies it. That's because there isn't one, in the citation you provided. The original example was this: =E2=80=AEhttp://myspace.com/#/segami/moc.koobecaf//:sptth where there is a u+202e character at the rightmost (visual) edge of the line. If you move point with C-f from the beginning of that line= , you should see it jump to the right edge of the line after the leadin= g whitespace, and then continue to "advance backwards", i.e. to the lef= t. You can search for this character by typing C-s C-x 8 RET 202e RET After typing this, you should see the offending character highlighted in some reddish background. > (I am using a terminal as usual.) These characters are by default displayed as spaces on a TTY, and as = a very thin (1-pixel) space on GUI frames. > I think we need to provide a way to make them visible. We already have it: the glyphless-char-display char-table. > Perhaps it should even be the default. I don't think so: these controls should normally be all but invisible= . The Unicode Standard actually recommends to remove them from display, but when I worked on the bidi display engine, I decided that removing characters by infrastructure is un-Emacsy, so I left them alone. Lis= p programs and specialized major modes can make them invisible by using text properties, if they want. Making these controls visible by default will uglify the display for no good reason. These controls are perfectly valid in email messages with RTL text, for example. > Also, is there a way to disable bidi in the current buffer? > If not, I think we need one. There is a way, but it is not meant for Lisp programs, only for debugging the display engine. In any case, I don't think disabling display reordering is the right solution for the problem at hand. It's a cure that is worse than the disease, since Web pages and email messages with RTL text will be displayed incorrectly, and be almost illegible. > > But currently Emacs doesn't really have a mechanism for queryin= g the > > directionality of a buffer region, I think? >=20 > I think we need to add this. We are still discussing what that means, exactly. When we reach conclusions, we can start working on implementing whatever is needed.