From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: bidi-display-reordering is now non-nil by default Date: Tue, 16 Aug 2011 18:24:24 -0400 Message-ID: <87d3g56llz.fsf@stupidchicken.com> References: <4E48D309.6050503@acdlabs.ru> <83hb5jujjs.fsf@gnu.org> <874o1j10zv.fsf@fencepost.gnu.org> <8362lyvcli.fsf@gnu.org> <87fwl2r0l4.fsf@stupidchicken.com> <83zkjatnkz.fsf@gnu.org> <877h6et8oi.fsf@stupidchicken.com> <83vctxua2y.fsf@gnu.org> <87r54le4rd.fsf@stupidchicken.com> <8362lxtfeb.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1313533476 5158 80.91.229.12 (16 Aug 2011 22:24:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 16 Aug 2011 22:24:36 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 17 00:24:32 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QtS3j-0001rH-Q7 for ged-emacs-devel@m.gmane.org; Wed, 17 Aug 2011 00:24:32 +0200 Original-Received: from localhost ([::1]:57911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtS3j-0006Ac-8o for ged-emacs-devel@m.gmane.org; Tue, 16 Aug 2011 18:24:31 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtS3g-0006AK-Dz for emacs-devel@gnu.org; Tue, 16 Aug 2011 18:24:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtS3f-0001y1-B1 for emacs-devel@gnu.org; Tue, 16 Aug 2011 18:24:28 -0400 Original-Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]:59499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtS3e-0001xH-76; Tue, 16 Aug 2011 18:24:26 -0400 Original-Received: from furball ([128.36.14.148]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p7GMONDt032534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 16 Aug 2011 18:24:24 -0400 In-Reply-To: <8362lxtfeb.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Aug 2011 20:50:04 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.144 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:143336 Archived-At: Eli Zaretskii writes: > Won't a newline and/or LRM/RLM (the latter inside the string) fix > that? In general, all reordering information is tossed at every > newline and restarted anew for the next line. So judicious placement > of newlines should do the trick in most cases. Having to juggle newlines when editing source code is no good. The ideal long-term solution, I think, is to make the bidi display code aware of text properties, as several people have already suggested. Then it should be easy to exploit font-lock to give reasonably correct bidi segmentation, e.g. by treating font-lock-comment-face and font-lock-string-face boundaries as bidi segmentation boundaries. For now, I don't feel strongly about the idea of turning off bidi display in prog modes. But if we don't, we should at least document some of the pitfalls discussed in this thread, and maybe state that having RTL script in source code buffers is currently a bad idea.