bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27525: 25.1; Line wrapping of bidi paragraphs


From: Eli Zaretskii
Subject: bug#27525: 25.1; Line wrapping of bidi paragraphs
Date: Fri, 21 Jul 2017 16:01:35 +0300

> From: Itai Berli <itai.berli@gmail.com>
> Date: Fri, 21 Jul 2017 12:44:40 +0300
> 
> 1. The bidi logic is entirely contained in the file bidi.c.

"Bidi logic" is not well defined.  If you mean the implementation of
the UBA, then yes, it's in bidi.c, with the sole exception of
mirroring of characters due to bidi context, which is in xdisp.c.

> 2. The display logic is entirely contained in the file xdisp.c.

If by "display logic" you mean the layout parts, i.e. the code which
constructs screen lines out of characters and breaks physical lines
into logical lines, then yes.

> 3. The interface between the two modules is minimal. If I wish to cancel 
> Emacs' bidi features, all I need to do
> is comment out a couple lines in xdisp.c and a user who doesn't use bidi 
> documents will never know the
> difference.

Not exactly.  There are numerous code snippets that handle
bidi-related complications, like the fact that buffer position is no
longer monotonously increasing with screen coordinates, all over in
xdisp.c.  But if bidi.c functions are never called, these snippets
will most probably be no-ops.

> 4. All the complications you mentioned are limited to code in xdisp.c

No.  The current implementation includes a couple of functions in
bidi.c that perform on-the-flight reordering of characters into visual
order.  These functions will have to be bypassed, and instead there
should be a new implementation of reordering which works on a laid-out
screen line.  In addition, the data structures shared by bidi.c and
xdisp.c will have to be changed to include the resolved level of each
character and some other information (part of that is already there,
but it will have to be revisited to make sure it doesn't hide some of
the info needed for reordering, because currently the information is
stored post-reordering).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]