Re: Mixed L2R and R2L paragraphs and horizontal scroll

David De La Harpe Golden <[email protected]>
Newsgroups gmane.emacs.devel,gmane.emacs.bidi
Message-ID <[email protected]>
Richard Stallman wrote:


> 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".
> 
>     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.
> 
> 

Rigid-  You mean, when l2r lines scroll right, r2l lines scroll right
- not mirrored and not not-scrolled?  That's not a problem with
a fixed column, but how to reconcile that with using the flexible window 
right margin as the r2l flush (which, having tried yudit, is more
pleasant IMO)?

Can hscroll amount ever be less than window-width increments (I seldom 
use it, preferring wrapping)? Yes, yes it can, just depends on 
hscroll-step settings.

So maybe the following would work?

I think it might produce unsurprising  "rigid-body-motion" type 
scrolling results, yet still allow use of the window right margin:

When you have scrolled horizontally, (window-hscroll) positive, leave a 
gap from the right window margin for r2l about equal to the amount l2r 
lines have hscrolled.   (And do the same for l2r lines when long r2l 
lines are  scrolled horizontally, using the suggestion of negative 
values of (window-hscroll) for r2l leftward scrolling...)

That may sound odd, put that way, so let's illustrate. I'm going
to switch to fringe truncation indicators to simplify things, otherwise
my tiny brain gets confused:

  	  +----------+--------- +--------------------+
  	  |:abcdefgh$|:abcdefgh$|:abcdefghijk       :|
  	  |$HGFEDCBA:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$ijk     :|:abcdefgh$|:abcdefghijk       :|
  	  |$........:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+


.... is an amount equal to the horizontal scroll.

Okay, that was a whole window width scroll, not very clear, since that 
would mean the r2l bit just disappears. Let's try again with a smaller 
window width hscroll.  Note how r2l letters that were under particular 
l2r letters still line up for a given window width. That could be 
desirable, especially for visual line movement.


  	  +----------+--------- +--------------------+
  	  |:abcdefgh$|:abcdefgh$|:abcdefghijk       :|
  	  |$HGFEDCBA:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$cdefghij$|:abcdefgh$|:abcdefghijk       :|
  	  |$FEDCBA..:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$efghijk :|:abcdefgh$|:abcdefghijk       :|
  	  |$DCBA....:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$ghijk   :|:abcdefgh$|:abcdefghijk       :|
  	  |$BA......:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$ijk     :|:abcdefgh$|:abcdefghijk       :|
  	  |$........:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+


Let's try the other direction for a truncated r2l line in the 2nd 
window, presumably a negative (window-hscroll) amount:

  	  +----------+--------- +--------------------+
  	  |:abcdefgh$|:abcdefgh$|:abcdefghijk       :|
  	  |$HGFEDCBA:|$HGFEDCBA:|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$cdefghij$|:,,abcdef$|:abcdefghijk       :|
  	  |$FEDCBA..:|$JIHGFEDC$|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$efghijk :|:,,,,abcd$|:abcdefghijk       :|
  	  |$DCBA....:|: KJIHGFE$|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$ghijk   :|:,,,,,,ab$|:abcdefghijk       :|
  	  |$BA......:|:   KJIHG$|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+

  	  +----------+--------- +--------------------+
  	  |$ijk     :|:,,,,,,,,$|:abcdefghijk       :|
  	  |$........:|:     KJI$|:       KJIHGFEDCBA:|
  	  |:        :|:        :|:                  :|
  	  +----------+----------+--------------------+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.