From: Eli Zaretskii <eliz@gnu.org>
To: Filipe Moreira <famoreira@gmail.com>
Cc: 22429@debbugs.gnu.org
Subject: bug#22429: Force character to be recognized as LTR inside RTL paragraph
Date: Fri, 22 Jan 2016 16:01:07 +0200 [thread overview]
Message-ID: <83a8nx7ly4.fsf@gnu.org> (raw)
In-Reply-To: <CAEOG97S2UJWrj=fx2OMDTG6pyzgjeF0NfejjYrLW6juJTF5RwQ@mail.gmail.com> (message from Filipe Moreira on Fri, 22 Jan 2016 11:54:45 +0000)
> From: Filipe Moreira <famoreira@gmail.com>
> 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.
next prev parent reply other threads:[~2016-01-22 14:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 21:14 bug#22429: Force character to be recognized as LTR inside RTL paragraph Filipe Moreira
2016-01-22 8:08 ` Eli Zaretskii
2016-01-22 8:24 ` Eli Zaretskii
2016-01-22 9:31 ` Andy Moreton
2016-01-22 14:03 ` Eli Zaretskii
2016-01-22 11:54 ` Filipe Moreira
2016-01-22 14:01 ` Eli Zaretskii [this message]
2016-01-22 15:15 ` Filipe Moreira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a8nx7ly4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=22429@debbugs.gnu.org \
--cc=famoreira@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).