From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Re: Re: improving bidi documents display Date: Wed, 02 Mar 2011 20:59:54 +0200 Message-ID: <8339n5xs9h.fsf@gnu.org> References: <837hcpryxr.fsf@gnu.org> <87wrklpzii.fsf@maru.md5i.com> <83aahhnpr3.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1299092539 11216 80.91.229.12 (2 Mar 2011 19:02:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2011 19:02:19 +0000 (UTC) Cc: eli.osherovich@gmail.com, md5i@md5i.com, emacs-bidi@gnu.org, emacs-devel@gnu.org To: James Cloos Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Wed Mar 02 20:02:13 2011 Return-path: Envelope-to: gnu-emacs-bidi@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PurJG-0007zE-2N for gnu-emacs-bidi@m.gmane.org; Wed, 02 Mar 2011 20:02:06 +0100 Original-Received: from localhost ([127.0.0.1]:37489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PurJF-0000Fv-8k for gnu-emacs-bidi@m.gmane.org; Wed, 02 Mar 2011 14:02:05 -0500 Original-Received: from [140.186.70.92] (port=35427 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PurJB-0000Bg-58 for emacs-bidi@gnu.org; Wed, 02 Mar 2011 14:02:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PurJ9-0006m0-R4 for emacs-bidi@gnu.org; Wed, 02 Mar 2011 14:02:00 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:60909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PurJ9-0006lq-KZ; Wed, 02 Mar 2011 14:01:59 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LHG0090023RC700@a-mtaout20.012.net.il>; Wed, 02 Mar 2011 21:01:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.183.216]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LHG009VB277C900@a-mtaout20.012.net.il>; Wed, 02 Mar 2011 21:01:57 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 X-BeenThere: emacs-bidi@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of Emacs support for multi-directional text." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Errors-To: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bidi:856 gmane.emacs.devel:136726 Archived-At: > From: James Cloos > Cc: Michael Welsh Duggan , eli.osherovich@gmail.com, emacs-bidi@gnu.org, emacs-devel@gnu.org > Copyright: Copyright 2011 James Cloos > OpenPGP-Fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6 > Date: Tue, 01 Mar 2011 19:58:44 -0500 > > the UAX is specific to plain text Not entirely true. It's just that in most structured text, the reordering should affect only certain portions of the text. But where we do reorder, UAX#9 should still be in effect. > emacs' modes uses faces to differentiate syntactically different > text runs Not true at all. You are probably thinking about font lock, but faces are also used for other purposes, like region highlight, mouse highlight, hl-line mode, etc. These other uses do cross bidi runs quite easily and frequently. > the latter is essentially the same as (invisible) markup Who is? > then one could conclude that bidi runs always should be intra-face and > never inter-face, yes? No, see above. > How well does >>back to default on face changes<< translate to the level > where emacs' bidi works? Not at all. The reordering engine works on lower level than the face-sensitive code. In a nutshell, reordering is implemented as an abstract "get to next character" operation that is what the display iterator does when it walks the visible portion of the buffer and prepares it for display. Faces and the rest are considered only _after_ getting to the next character. By the time the iterator notices that the next character has a different face, the bidi reordering has effectively already happened.