From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.emacs.bidi Subject: Bidi TODO (was: Handling invisible text in bidirectional display) Date: Fri, 22 Jan 2010 15:41:17 +0200 Message-ID: <83d4126yv6.fsf@gnu.org> References: <83y6jyat25.fsf@gnu.org> <83tyulbwl2.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1264167854 8985 80.91.229.12 (22 Jan 2010 13:44:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2010 13:44:14 +0000 (UTC) Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 22 14:44:06 2010 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.50) id 1NYJnJ-0001ru-98 for ged-emacs-devel@m.gmane.org; Fri, 22 Jan 2010 14:43:25 +0100 Original-Received: from localhost ([127.0.0.1]:59746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYJnK-0002Rh-3S for ged-emacs-devel@m.gmane.org; Fri, 22 Jan 2010 08:43:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYJnB-0002Q9-CX for emacs-devel@gnu.org; Fri, 22 Jan 2010 08:43:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYJn6-0002O0-E6 for emacs-devel@gnu.org; Fri, 22 Jan 2010 08:43:16 -0500 Original-Received: from [199.232.76.173] (port=51163 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYJn0-0002Mv-Vu; Fri, 22 Jan 2010 08:43:07 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:45451) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYJmy-0002sF-6i; Fri, 22 Jan 2010 08:43:04 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KWN00E00HNVDF00@a-mtaout22.012.net.il>; Fri, 22 Jan 2010 15:41:11 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.228.141.118]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KWN00EGAI0LDE10@a-mtaout22.012.net.il>; Fri, 22 Jan 2010 15:41:11 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.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:120293 gmane.emacs.bidi:465 Archived-At: At Richard's request, I'm posting the todo list composed out of notes I keep while working on the bidirectional support in Emacs. What is already done and underwent some minimal testing is marked by "(done)". Please note that this list is by no means complete, not even close. I'm discovering new issues as I go along. ------------------------------------------------------------------- * Basic display engine infrastructure ** Basic bidirectional display *** Bidirectional iteration through display elements (The names below in this section are subroutines in xdisp.c) **** next_element_from_buffer (done) **** next_element_from_string/c_string **** next_element_from_display_vector Need to decide whether to reorder the original characters of the ones that come out of display tables. Maybe have an option to do both. **** next_element_from_image **** next_element_from_stretch *** Display of text without properties (done) *** Line truncation and continuation (done) *** Scrolling (done) *** Cursor positioning (done) *** Text insertion and deletion (done) *** Left-to-right and right-to-left paragraphs **** Paragraph direction variable (done) **** Dynamic determination of paragraph direction (done) **** Support for paragraph-start and paragraph-separate that don't begin at line beginning *** Horizontal cursor motion (done) *** Vertical cursor motion Needs a fixed current-column/move-to-column **** Fix visual-line-mode for bidirectional text and mixed R2L/L2R lines Also needs a fixed current-column/move-to-column *** Text properties and overlays **** Properties that determine faces (done) This includes the `fontified' property. **** Invisible text (in progress) **** `display' property ***** Property value is a string ***** Property value is an image ***** Other property values *** Selective display and ellipsis *** Composed characters ** Terminal-specific back-ends *** TTY back-end Largely done, with the single possible exception of composite characters (see term.c:append_composite_glyph) *** Support reversed (R2L) glyph rows in xdisp.c:append_* This is a prerequisite for the GUI back-ends (below). *** X11 back-end *** MS-Windows back-end *** NS back-end * New display features specific for bidi ** Mode to show/hide LRE, RLO, PDF, and other formatting characters ** Mode to show bidirectional level of each character ** Mirrored continuation and arrow glyphs in R2L glyph rows * Display-related subroutines ** Support bidirectional text in current-column, move-to-column, etc. *** Many packages use these primitives: fix them for bidi This might need a separate solution for each one of the packages, depending on how it uses these primitives and for what purpose. * Design issues ** Load bidirectional properties of characters from uni-bidi.el (Currently, a char-table of properties is created in C at compile time, independently of Unicode properties we have in uni-*.el.) *** When to load? at dump time? upon first use? *** Load everything at once? only for the charset being used? ** Load mirrored properties from Unicode DB (Currently, only ASCII characters with mirrored properties are supported.) *** Same issues as with bidirectional properties above * Applications ** UI issues in typing bidi text See these URLs: http://www-01.ibm.com/software/globalization/topics/bidiui/index.jsp "better tutorial on mixed directionality" in comp.windows.x.intrinsics http://osdir.com/ml/region.israel.ivrix.discuss/2003-05/msg00031.html https://bugzilla.gnome.org/show_bug.cgi?id=70451 https://bugzilla.gnome.org/show_bug.cgi?id=136529 https://bugzilla.gnome.org/show_bug.cgi?id=116626 ** Reverse mirrored characters in input methods for bidi languages (Note: Some localized keyboards do that themselves.) ** Add a convenient way of typing formatting characters (RLO, LRE, PDF) ** Support in programming modes for bidi reordering in strings and comments Maybe we need special text properties?