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: Bar cursor in bidirectional text Date: Sat, 28 Aug 2010 23:13:15 +0300 Message-ID: <83fwxylcmc.fsf@gnu.org> References: <83bp8zra6b.fsf@gnu.org> <4C79541C.1030105@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1283026316 23481 80.91.229.12 (28 Aug 2010 20:11:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Aug 2010 20:11:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 28 22:11:54 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.69) (envelope-from ) id 1OpRkj-0003cp-Dh for ged-emacs-devel@m.gmane.org; Sat, 28 Aug 2010 22:11:49 +0200 Original-Received: from localhost ([127.0.0.1]:48011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpRki-0006f7-HF for ged-emacs-devel@m.gmane.org; Sat, 28 Aug 2010 16:11:48 -0400 Original-Received: from [140.186.70.92] (port=54431 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OpRkb-0006f2-H2 for emacs-devel@gnu.org; Sat, 28 Aug 2010 16:11:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OpRka-0003y3-AY for emacs-devel@gnu.org; Sat, 28 Aug 2010 16:11:41 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:61096) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OpRka-0003xz-2A for emacs-devel@gnu.org; Sat, 28 Aug 2010 16:11:40 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L7V00400PEEDH00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Sat, 28 Aug 2010 23:11:12 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.93.239]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L7V003K2PENSD80@a-mtaout20.012.net.il>; Sat, 28 Aug 2010 23:11:12 +0300 (IDT) In-reply-to: <4C79541C.1030105@swipnet.se> 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:129361 Archived-At: > Date: Sat, 28 Aug 2010 20:23:24 +0200 > From: Jan Dj=E4rv > CC: emacs-devel@gnu.org >=20 > 2010-08-18 21:30, Eli Zaretskii skrev: > > I committed today revno 101130 (fixed later in revno 101131) that > > causes the bar cursor to be positioned correctly on right-to-left > > characters. I did that for X and w32, but not for NS, since the > > relevant code in nsterm.m is slightly different and uses APIs who= se > > semantics I don't understand well enough. > > > > Could someone who has access to NS please fix nsterm.m in the man= ner > > similar to what I did for X and w32? The changes should be in th= e > > ns_draw_window_cursor function and affect the code under `case BA= R_CURSOR'. > > >=20 > How do I test the changes? emacs -Q C-h H M-: (setq cursor-type 'bar) RET Now move to one of the lines that use R2L scripts, e.g. Arabic or Hebrew, and use C-f to get to the Arabic or Hebrew letters. You should see the cursor positioned to the right of each R2L letter, as opposed to the left in L2R scripts. To make sure the cursor is indee= d to the right of a letter, you could use "C-x =3D" to show the charact= er at point. (Actually, the cursor is positioned to the right of every character that has its level resolved as R2L. For example, you can see the cursor positioned to the right of each of the two parentheses enclosing the name of the Hebrew language in Hebrew: that is because they are neutral characters that take the directionality of the surrounding text, according to the Unicode Bidirectional Algorithm that Emacs implements.) Thanks.