From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22429: Force character to be recognized as LTR inside RTL paragraph Date: Fri, 22 Jan 2016 16:01:07 +0200 Message-ID: <83a8nx7ly4.fsf@gnu.org> References: <56a13f4844c61b5100000006@polymail.io> <83mvry6nq1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1453471345 3419 80.91.229.3 (22 Jan 2016 14:02:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Jan 2016 14:02:25 +0000 (UTC) Cc: 22429@debbugs.gnu.org To: Filipe Moreira Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 22 15:02:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aMcHz-0006pi-A7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jan 2016 15:02:11 +0100 Original-Received: from localhost ([::1]:54056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMcHy-0007Mh-S8 for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jan 2016 09:02:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMcHt-0007JI-Cd for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2016 09:02:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMcHq-00067g-7Y for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2016 09:02:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMcHq-00067c-5I for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2016 09:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aMcHp-0003FS-NN for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2016 09:02:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2016 14:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22429 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22429-submit@debbugs.gnu.org id=B22429.145347126512424 (code B ref 22429); Fri, 22 Jan 2016 14:02:01 +0000 Original-Received: (at 22429) by debbugs.gnu.org; 22 Jan 2016 14:01:05 +0000 Original-Received: from localhost ([127.0.0.1]:57182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMcGu-0003EK-OJ for submit@debbugs.gnu.org; Fri, 22 Jan 2016 09:01:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35485) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMcGq-0003Di-Hr for 22429@debbugs.gnu.org; Fri, 22 Jan 2016 09:01:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMcGi-0005se-AY for 22429@debbugs.gnu.org; Fri, 22 Jan 2016 09:00:55 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMcGi-0005sZ-6Z; Fri, 22 Jan 2016 09:00:52 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1227 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aMcGh-0003Jd-E9; Fri, 22 Jan 2016 09:00:51 -0500 In-reply-to: (message from Filipe Moreira on Fri, 22 Jan 2016 11:54:45 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111855 Archived-At: > From: Filipe Moreira > Date: Fri, 22 Jan 2016 11:54:45 +0000 > Cc: 22429@debbugs.gnu.org > > Emacs being Emacs, you can programmatically change the bidirectional > class of every character, but that change has global effect: it will > affect the directionality of that character everywhere in the Emacs > session. So this is not recommended. > > Also this is not recommended, I would be willing to have the bidi class > property of some characters set to left-to-right, like the example of the slash > character. Can you tell why? There are ways to produce the display you expect without changing the character properties; I described 3 such ways. If you change the properties, the text will only display correctly on your system, any other user who displays your text, either in Emacs or in other editor that supports bidirectional display, will see the text in the same jumbled order you wanted to avoid. So I see very little sense in such changes. > Can you point somewhere regarding this? I saw the > get-char-code-property function but could not find anyway to > actually change the setting. You want put-char-code-property. Again, I very much recommend not to do that. > \begin{hebrew} > \pstart > > בְּרֵאשִׁ֖ית‪\footnoteA{This is a Hebrew related footnote}‬ בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת > הָאָֽרֶץ׃ > > \pend > \end{hebrew} > > > In this example the direction of the surrounding Hebrew text has been changed. > The word בְּרֵאשִׁ֖ית should come before (i.e. on the right) of the word בָּרָ֣א. So > while the footnote command is correctly shown as LTR the Hebrew text has been > changed. I don't think is is the expected. See the updated image > (http://emacs.stackexchange.com/questions/19696/handling-left-to-right-inside-right-to-left-paragraphs-using-emacs-and-auctex) > that shows TextEdit correct handling of this. What version of Emacs do you have? The above renders correctly for me, both in Emacs 24.5 and in the development version. The word בְּרֵאשִׁ֖ית is shown to the right of the footnote, and all the rest is shown to the left of it. Maybe you have an older Emacs which somehow has a bug? > Is there any change of having a way to set the unicode bidirectionally of a > character within each separate mode? Could this be considered a feature? I think it would be a misfeature, for the reasons explained above. It's the same as using a private font to display some character in a different shape -- you are the only one who will enjoy that shape. However, nothing prevents a mode from using put-char-code-property in some ingenious ways to do what you want.