emacs-devel
[Top][All Lists]
Advanced

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

Re: Mixed L2R and R2L paragraphs and horizontal scroll


From: Eli Zaretskii
Subject: Re: Mixed L2R and R2L paragraphs and horizontal scroll
Date: Sun, 31 Jan 2010 20:16:36 +0200

> From: Richard Stallman <address@hidden>
> CC: address@hidden, address@hidden
> Date: Sun, 31 Jan 2010 07:42:09 -0500
> 
>         +---------------------------------------+
>         |abcdefghijk                            |
>         |                            KJIHGFEDCBA|
>         |                                       |
>         +---------------------------------------+
> 
> Why are there 28 spaces; what makes KJIHGFEDCBA end at column 39?

The fact that there are only 11 characters in that line, and the fact
that the window I drew happens to be 39 characters wide.  An R2L line
is drawn with its first character (A) flushed to the right margin of
the window, the second character (B) one column to the left of it,
etc.

> Is that determined by the width of the window, or by some separate
> setting analogous to fill-column?

Only the width of the window.

>       But Emacs does not
>     have a rigid line length, so flushing the R2L lines against the right
>     margin of the window makes their position depend on the window width.
>     Is that okay?  (I think it is.)
> 
> Maybe there SHOULD be a specified line length for this purpose.
> (Perhaps fill-column?  Or "use fill-column" could be one of the
> settings.)  nil could mean "use the window width".
> 
> When the width is specified, not nil, then the right behavior
> is to use that width even if it causes truncation.

You are talking about introducing a new feature.  That could be good,
but for now I'd like to have a bidi display without new features.  We
will need that anyway, even under your suggestion, for supporting the
nil value.

>     Now the crucial question: what do you think should happen if I scroll
>     the leftmost window horizontally so that the end of the first line
>     (the characters "ijk") become visible?  I think it should be this:
> 
>         +---------+---------+-------------------+
>         |$ijk     |abcdefgh$|abcdefghijk        |
>         |$HGFEDCBA|$HGFEDCBA|        KJIHGFEDCBA|
>         |         |         |                   |
>         +---------+---------+-------------------+
> 
> Horizontal scrolling should apply to the whole window contents
> in a rigid fashion.

But that cannot be done in this case, because the second line cannot
be scrolled to the left without moving its first character A from the
right margin.

I now think that the following display is the right one (see my other
message for the reasons):

          +---------+---------+-------------------+
          |$ijk     |abcdefgh$|abcdefghijk        |
          |     KJI$|$HGFEDCBA|        KJIHGFEDCBA|
          |         |         |                   |
          +---------+---------+-------------------+

and if the window is scrolled by 2 characters less, then it should
look like this:

          +---------+---------+-------------------+
          |$ghijk   |abcdefgh$|abcdefghijk        |
          |   KJIHG$|$HGFEDCBA|        KJIHGFEDCBA|
          |         |         |                   |
          +---------+---------+-------------------+

etc.

The principle is: the only point of reference is the margin, the left
one for L2R lines, and the right one for R2L.




reply via email to

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