From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Re: Re: merge emacs-bidi into the main tree Date: Tue, 12 Aug 2003 16:18:12 +0900 (JST) Sender: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Message-ID: <200308120718.QAA24158@etlken.m17n.org> References: <87lluax3ch.fsf@emacswiki.org> <7458-Sun03Aug2003224354+0300-eliz@elta.co.il> <87smoi9p64.fsf@emacswiki.org> <87he4x5v7x.fsf_-_@emacswiki.org> <86brv0wfyn.fsf@gerd.free-bsd.org> <6480-Fri08Aug2003180204+0300-eliz@elta.co.il> <8665l886vu.fsf@gerd.free-bsd.org> <200308120149.KAA23819@etlken.m17n.org> <9743-Tue12Aug2003085951+0300-eliz@elta.co.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1060672873 22807 80.91.224.253 (12 Aug 2003 07:21:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2003 07:21:13 +0000 (UTC) Cc: gerd.moellmann@t-online.de, emacs-devel@gnu.org, emacs-bidi@gnu.org, developer@arabeyes.org, alex@emacswiki.org Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Tue Aug 12 09:21:11 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19mTSx-0001P5-00 for ; Tue, 12 Aug 2003 09:21:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mTSc-0000us-8n for gnu-emacs-bidi@m.gmane.org; Tue, 12 Aug 2003 03:20:50 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19mTSG-0000Y1-AZ for emacs-bidi@gnu.org; Tue, 12 Aug 2003 03:20:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19mTRP-0006iv-H6 for emacs-bidi@gnu.org; Tue, 12 Aug 2003 03:20:06 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mTRE-000639-D7; Tue, 12 Aug 2003 03:19:24 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id h7C7IDu01772; Tue, 12 Aug 2003 16:18:13 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6/3.7W-20010823150639) with ESMTP id h7C7ID907473; Tue, 12 Aug 2003 16:18:13 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id QAA24158; Tue, 12 Aug 2003 16:18:12 +0900 (JST) Original-To: eliz@elta.co.il In-reply-to: <9743-Tue12Aug2003085951+0300-eliz@elta.co.il> User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-bidi@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Discussion of Emacs support for multi-directional text. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bidi:145 gmane.emacs.devel:15899 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15899 In article <9743-Tue12Aug2003085951+0300-eliz@elta.co.il>, "Eli Zaretskii" writes: >> In brief, what I did in emacs-bidi are: >> >> (1) change xdisp.c to call get_next_display_element_visually >> and set_iterator_to_next_visually instead of >> get_next_display_element and set_iterator_to_next. >> >> (2) make a new file bidi.c that implements >> get_next_display_element_visually and >> set_iterator_to_next_visually. >> >> (3) make a new file bidi.el that implements simple >> bidi-reordering function that is called from >> get_next_display_element_visually to create a cache in >> (struct it). >> >> (4) change xterm.c to display glyphs flushing to right when >> orientation-reversed is non-nil. >> >> My current plan is to replace (2) and (3) with Eli's code. > It's not gonna be that simple ;-) [...] > (To save future work, some crucial information about the characters > over which we scan is cached inside the bidi_it struct, to facilitate > processing later when we need to go back to those characters and > generate the glyph matrix elements from them. So, in the above > example, going back from 'D' to 'A' boils down to delivering > information already cached during the forward scan.) Then, it seems that what you've done is not that different from the current emacs-bidi. In most cases, we anyway move the iterator all over "abcdABCDefg". Your code caches only some crucial information, so get_next_display_element will need some work at C B A e f g. My code caches all information given by get_next_display_element, so get_next_display_element will work fast at C B A e f g. In both cases, set_iterator_to_next (your code) and set_iterator_to_next_visually (my code) moves IT_CHARPOS (*it) non-linearly. So, I still think incorporating your code is not that difficult. > (There still needs to be more code in the terminal-specific parts of > Emacs, that displays the glyphs either starting at the left or the > right margin of the screen/window, depending on the current > paragraph's base direction; the latter gets decided by subroutines of > bidi_get_next_char_visually and is stored in the bidi_it structure. I > believe this code, at least for the X terminals, already largely > exists in m17n.org's emacs-bidi.) Yes. "(4) change xterm.c" does that. --- Ken'ichi HANDA handa@m17n.org