Re: Mixed L2R and R2L paragraphs and horizontal scroll

martin rudalics <[email protected]>
Newsgroups gmane.emacs.devel,gmane.emacs.bidi
Message-ID <[email protected]>
 >> Because it's no more a window but a line property, IIUC.  When, after
 >> scrolling the first line, you move `point' to show another portion of
 >> the second line like this
 >>
 >>        +---------+---------+-------------------+
 >>        |$ijk     |abcdefgh$|abcdefghijk        |
 >>        |KJIHGFED$|$HGFEDCBA|        KJIHGFEDCBA|
 >>        |         |         |                   |
 >>        +---------+---------+-------------------+
 >>
 >> you get two different non-zero values of `window-hscroll'.
 >
 > No, you don't necessarily get two different values.  The value from
 > the second line defines a scroll from the right margin, not from the
 > left.  (Which probably means it's not a good idea to have
 > window-hscroll return a negative value in that case.)

When you hscroll the second line we must be able to return that somehow
- otherwise how would we know?  So either we have to invent a new
function like `window-RL-hscroll' or interpret the return value of
`window-hscroll' appropriately.  And this function must probably handle
lines containing both LR and RL text correctly.

 >>  >       +---------+---------+-------------------+
 >>  >       |$ijk     |abcdefgh$|abcdefghijk        |
 >>  >       |     KJI$|$HGFEDCBA|        KJIHGFEDCBA|
 >>  >       |         |         |                   |
 >>  >       +---------+---------+-------------------+
 >>  >
 >>  > Is this what you are suggesting?
 >>
 >> This would be needlessly inconvenient.
 >
 > Why inconvenient?

Inconvenient for the user.  Why scroll something out of view if there's
no urgent need to do so.  (Although a similar argument could be made for
pure LR text as well - why scroll the entire window when I want to see
the last characters of the single overlong line in my entire text.  With
automatic line-wrapping turned off, I mean.)

 > That's what would happen if the second line was
 > displayed at the left margin, like this:
 >
 >       +---------+---------+-------------------+
 >       |$ijk     |abcdefgh$|abcdefghijk        |
 >       |$IJK     |$HGFEDCBA|        KJIHGFEDCBA|
          ^^^^^^^^^
 >       |         |         |                   |
 >       +---------+---------+-------------------+

I fail to understand the marked text in your example.

 > The advantage is that all the lines scroll in lockstep, albeit in two
 > different directions, and `window-hscroll' can still return a single
 > value whose meaning is well defined.

So it would be convenient for the designer.

 >> Hence, `window-hscroll' should probably return the value for the
 >> line `window-point' is on.
 >
 > That's also possible.  Are the users of this function normally
 > interested only in the amount of scroll of the current line?

Mostly for calculating the argument of `set-window-hscroll' I suppose.
But I have never looked into this.

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