GNU bug report logs -
#43207
26.3; Strange bidi behavior
Previous Next
Reported by: nisse <at> lysator.liu.se (Niels Möller)
Date: Fri, 4 Sep 2020 19:37:01 UTC
Severity: normal
Tags: notabug
Found in version 26.3
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: nisse <at> lysator.liu.se (Niels Möller)
> Cc: 43207 <at> debbugs.gnu.org
> Date: Sat, 05 Sep 2020 08:46:51 +0200
>
> Thanks for the explanation. So if the base paragraph direction is
> right-to-left, then right arrow is supposed to move logical backwards,
> like C-b.
Yes.
> > You can either insert an empty line between that Arabic line,
>
> Is there any way to tell emacs that a new paragraph starts, without
> inserting anything visible in the buffer? Some special unicode
> character, or emacs text property?
No, not at the moment. FWIW, I don't think there's a significant need
for such a feature, given the related features we already have.
> > But this is how most bidi-supporting applications out there behave.
>
> For what it's worth, display in firefox works differently. The line of
> arabic text is right-to-left and right-justified on the screen, but
> following lines are left-to-right, more like what I expected. So it
> seems to use a different parapgraph heuristics than emacs.
Yes, the Unicode Standard allows some leeway in this matter, and Emacs
uses it. Firefox is not a text editor, so it doesn't need to cope
with the various situations we have every day in Emacs, where text
filling rearranges the words at the beginning of a physical line,
which generally can change the base direction at random (because the
base direction depends on the first string directional character of
the first line of the paragraph).
Because someone requested strict adherence to the Unicode
Bidirectional Algorithm in this particular matter, Emacs does support
the "each physical line starts a new paragraph" behavior; you will
find in the manual how to set that up using the variables
bidi-paragraph-start-re and bidi-paragraph-separate-re. But I don't
recommend such a setup in Emacs, for the reasons I described above.
This bug report was last modified 4 years and 259 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.