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: BIDI question Date: Mon, 07 Oct 2013 20:54:12 +0300 Message-ID: <838uy555mj.fsf@gnu.org> References: <5252EEA2.80303@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1381168472 2001 80.91.229.3 (7 Oct 2013 17:54:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2013 17:54:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 07 19:54:35 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTF0r-0008UY-8M for ged-emacs-devel@m.gmane.org; Mon, 07 Oct 2013 19:54:33 +0200 Original-Received: from localhost ([::1]:32803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTF0q-0007JY-KL for ged-emacs-devel@m.gmane.org; Mon, 07 Oct 2013 13:54:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTF0i-0007Gq-EH for emacs-devel@gnu.org; Mon, 07 Oct 2013 13:54:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTF0c-000125-Oi for emacs-devel@gnu.org; Mon, 07 Oct 2013 13:54:24 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:37969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTF0c-00011h-Gd for emacs-devel@gnu.org; Mon, 07 Oct 2013 13:54:18 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MUB000008CPIM00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 07 Oct 2013 20:54:17 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUB000D98EGCY50@a-mtaout20.012.net.il>; Mon, 07 Oct 2013 20:54:17 +0300 (IDT) In-reply-to: <5252EEA2.80303@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163959 Archived-At: > Date: Mon, 07 Oct 2013 21:25:54 +0400 > From: Dmitry Antipov > CC: Eli Zaretskii > > There is a text with a mix of Arabic and ASCII characters (attached), and it is > displayed correctly (first screenshot a.k.a top.png). But, when I concatenate > this text with itself (cat /tmp/uthmani.txt /tmp/uthmani.txt > 1.txt) and view > the result, second Arabic fragment is rendered L2R (second screenshot a.k.a > next.png). Why it is different from the first Arabic fragment, and isn't it a bug? It's a feature: a paragraph starts after at least one empty line (or at point-min). In this case, there's no empty line between the English text (which is an L2R paragraph) and the second Arabic fragment, so the second Arabic fragment is rendered as a continuation of the L2R paragraph that starts with the English text. IOW, Emacs does not recognize the second Arabic fragment as a new paragraph, and does not recompute the base paragraph direction for it, instead it continues using the base paragraph direction computed for the English text.