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: Compositions and bidi display (was: bug#5977: 24.0.50; Lao HELLO is incorrectly displayed) Date: Fri, 23 Apr 2010 21:52:05 +0300 Message-ID: <834oj22e96.fsf@gnu.org> References: <3A521851-F7CC-45DB-A2ED-8348EF96D5CF@Freenet.DE> <83fx2q5w86.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1272048844 26360 80.91.229.12 (23 Apr 2010 18:54:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Apr 2010 18:54:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 23 20:54:03 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@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 1O5O0k-0006q3-EE for ged-emacs-devel@m.gmane.org; Fri, 23 Apr 2010 20:53:58 +0200 Original-Received: from localhost ([127.0.0.1]:56428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5O0j-0006DD-H1 for ged-emacs-devel@m.gmane.org; Fri, 23 Apr 2010 14:53:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5NzN-0005O4-GU for emacs-devel@gnu.org; Fri, 23 Apr 2010 14:52:33 -0400 Original-Received: from [140.186.70.92] (port=35645 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5NzJ-0005KK-R8 for emacs-devel@gnu.org; Fri, 23 Apr 2010 14:52:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5NzH-00023C-P9 for emacs-devel@gnu.org; Fri, 23 Apr 2010 14:52:29 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:58444) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5NzH-00022t-HL for emacs-devel@gnu.org; Fri, 23 Apr 2010 14:52:27 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L1C00100F1H5F00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Fri, 23 Apr 2010 21:52:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.104.173]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L1C000VBF2QDX20@a-mtaout20.012.net.il>; Fri, 23 Apr 2010 21:52:03 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124141 Archived-At: > From: Kenichi Handa > Cc: Peter_Dyballa@Freenet.DE, 5977@debbugs.gnu.org > Date: Wed, 21 Apr 2010 11:32:58 +0900 > > I've just build the trunk code on GNU/Linus, and found that all > characters displayed by composition are incorrect. Only when bidi-display-reordering is turned on (etc/HELLO does that automatically). > Here's a brief explanation about control flow. Thanks, that part was quite clear from the code. I now fixed display of composed characters from L2R scripts when bidi-display-reordering is set to non-nil. Where I really need help is in getting compositions to work when text is reordered. Is it true that composition_reseat_it and its subroutines need to see the to-be-composed characters in strict logical order, i.e. left to right? Or can they also work if they see the characters to be composed in the reverse order? Also, what does this condition (in next_element_from_composition) check? if (it->c < 0) { IT_CHARPOS (*it) += it->cmp_it.nchars; IT_BYTEPOS (*it) += it->cmp_it.nbytes; If the meaning of the test is that there's no composition at the iterator's position, then why do we skip some of the buffer text under this condition? Thanks for your help.