From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Re: Bidi Emacs: R2L paragraphs and the direction of glyph_row Date: Sat, 28 Nov 2009 13:44:09 +0900 Organization: Aoyama Gakuin University Message-ID: <4B10AA99.90805@it.aoyama.ac.jp> References: <83y6nagz4p.fsf@gnu.org> <78ae59bf0911260658q5cecc350k22392b01bbff98bd@mail.gmail.com> <4B0FB3F3.5050804@it.aoyama.ac.jp> <83r5rkm9z3.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259387932 14420 80.91.229.12 (28 Nov 2009 05:58:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Nov 2009 05:58:52 +0000 (UTC) Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Sat Nov 28 06:58:44 2009 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.50) id 1NEGKQ-0001si-KL for gnu-emacs-bidi@m.gmane.org; Sat, 28 Nov 2009 06:58:43 +0100 Original-Received: from localhost ([127.0.0.1]:40782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEGKP-00026s-Tz for gnu-emacs-bidi@m.gmane.org; Sat, 28 Nov 2009 00:58:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEGKK-00024r-Mk for emacs-bidi@gnu.org; Sat, 28 Nov 2009 00:58:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEGKE-0001yA-Ly for emacs-bidi@gnu.org; Sat, 28 Nov 2009 00:58:35 -0500 Original-Received: from [199.232.76.173] (port=59394 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEGKE-0001xk-CT for emacs-bidi@gnu.org; Sat, 28 Nov 2009 00:58:30 -0500 Original-Received: from scmailgw01.scop.aoyama.ac.jp ([133.2.251.41]:58764) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NEGKD-0003N4-Kv for emacs-bidi@gnu.org; Sat, 28 Nov 2009 00:58:30 -0500 Original-Received: from scmse01.scbb.aoyama.ac.jp (scmse01.scbb.aoyama.ac.jp [133.2.253.158]) by scmailgw01.scop.aoyama.ac.jp (secret/secret) with SMTP id nAS5wOUa018886 for ; Sat, 28 Nov 2009 14:58:25 +0900 Original-Received: from (unknown [133.2.206.133]) by scmse01.scbb.aoyama.ac.jp with smtp id 6c37_0a8a7a6a_dbe3_11de_959f_001d096c566a; Sat, 28 Nov 2009 14:58:24 +0900 Original-Received: from [IPv6:::1] ([133.2.210.1]:47337) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id for from ; Sat, 28 Nov 2009 14:54:38 +0900 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090902 Eudora/3.0b3 In-Reply-To: <83r5rkm9z3.fsf@gnu.org> X-MIME-Autoconverted: from 8bit to quoted-printable by scmailgw01.scop.aoyama.ac.jp id nAS5wOUa018886 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:434 gmane.emacs.devel:117896 Archived-At: Hello Eli, Many thanks for your comments. I very much agree with what you say,=20 namely that good display for HTML/XML (and similar stuff) should be at a=20 level above the basic bidi support, and that it may be implemented by=20 somebody else than you. Nevertheless, I very much look forward to hear from Gregg (and others)=20 about what they see as the current problems with bidi editing (such as=20 the issue with carret placement that Gregg mentioned). Regards, Martin. On 2009/11/27 21:24, Eli Zaretskii wrote: >> Date: Fri, 27 Nov 2009 20:11:47 +0900 >> From: "Martin J. D=C3=BCrst" >> CC: Gregg Reynolds, emacs-bidi@gnu.org, emacs-devel@g= nu.org >> >> On 2009/11/27 1:10, Eli Zaretskii wrote: >>>> Date: Thu, 26 Nov 2009 08:58:39 -0600 >>>> From: Gregg Reynolds >> >>>> It's also a major pain to edit XML in a bidi editor. And I do mean >>>> major. >>> >>> Again, an explicit list of main problems would be useful (although I >>> deliberately decided not to handle bidirectional editing for meta >>> documents yet, so this specific class of problems is still a long way >>> from being dealt with). >> >> This is a well-known problem. For some more background and some attemp= t >> at a solution, please see: >> >> http://www.sw.it.aoyama.ac.jp/2005/pub/IUC28-bidi/ and >> http://www.sw.it.aoyama.ac.jp/2008/pub/IUC32-bidi/ > > Thanks. > > As I pointed out elsewhere, this class of problems is currently beyond > the scope of what I'm trying to do in Emacs. That is because the > display engine basically examines characters one by one, so correct > display of XML/HTML using just UAX#9 algorithm is impossible, as you > and others have found out. > > I think that support for bidi editing of documents that use markup > languages should be based on the features that exist as part of the > markup:‎/‏, the dir=3D directive etc. Using these, a Lisp > application should place overlays or maybe text properties on the > portions of text that need to be reordered. For example, one could > place an overlay on a portion of the buffer with `display' property > whose value is the reordered text of that portion (it will have to be > enclosed in LRO..PDF embedding to avoid the automatic reordering when > the display string is delivered to the glass). Or we could add a new > overlay property that would just tell the display engine "reorder this > part". Then the display engine will DTRT guided by these overlays and > text properties. > > However, please note that the above is not something I thought about > long enough to be convinced that it is the right solution. The only > thing I convinced myself in at this point is that bidi support for > markup languages should not be on the basic display engine level, > which is what I'm currently hacking. Rather, it should use the basic > reordering capabilities of the display engine in some way, but do some > additional work on higher levels to implement the equivalent of the > UAX#9 ``higher protocols''. > >> In a discussion with Ken'ichi Handa and Naoto Takahashi in 2005, they >> pointed out that using bidi marks in overlays should make it possible = in >> bidi emacs to address this problem. Unfortunately, nobody here is >> familiar enough with emacs lisp to implement this, but I'd be very gla= d >> to help somebody with some emacs lisp skills to work on such a project. > > Thanks for the offer. I don't know when I will get to those parts. > For now, text properties and overlays are not yet supported in the > modified display engine -- that is the very next problem on my agenda. > When these parts are done, hopefully others could come on board and > implement markup support on top of that. > --=20 #-# Martin J. D=C3=BCrst, Professor, Aoyama Gakuin University #-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp