Re: Mixed L2R and R2L paragraphs and horizontal scroll
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bidi,gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
> Date: Sat, 30 Jan 2010 18:22:27 +0100 > From: martin rudalics <[email protected]> > CC: [email protected], [email protected] > > > Why should it change from what it returns now? > > 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.) > > Or are you saying that we should scroll the R2L lines to the right by > > as much as we scroll the L2R lines to the left? That is, are you > > saying we should display the last example as > > > > > > +---------+---------+-------------------+ > > |$ijk |abcdefgh$|abcdefghijk | > > | KJI$|$HGFEDCBA| KJIHGFEDCBA| > > | | | | > > +---------+---------+-------------------+ > > > > Is this what you are suggesting? > > This would be needlessly inconvenient. Why inconvenient? That's what would happen if the second line was displayed at the left margin, like this: +---------+---------+-------------------+ |$ijk |abcdefgh$|abcdefghijk | |$IJK |$HGFEDCBA| KJIHGFEDCBA| | | | | +---------+---------+-------------------+ 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. > 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?