[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: invisible
From: |
Miles Bader |
Subject: |
Re: invisible |
Date: |
03 Mar 2004 13:16:35 +0900 |
On Tue, Mar 02, 2004 at 06:39:25PM +0200, Eli Zaretskii wrote:
> > Can you describe a situation where it occurs?
> >
> > X Y Z 1 2 3 A B C
> > 1 2 3 4 5 6 7 8 9 0
> >
> > Z Y X 1 2 3 C B A
> > 3 2 1 4 5 6 9 8 7 0
>
> You've just described it: suppose the cursor is on X, what is the
> current value of point?
Ah, that was just my thinking out loud I forgot to delete from my mail
buffer...
Anyway the first two lines were supposed to be the buffer contents, and the
second two lines the corresponding bidi'd display contents; the digit row
represents the buffer positions.
> For that matter, why did you choose to put the point positions as
>
> > Z Y X 1 2 3 C B A
> > 3 2 1 4 5 6 9 8 7 0
>
> and not as
>
> > Z Y X 1 2 3 C B A
> > 4 3 2 1 5 6 0 9 8 7
The display cursor conventionally sits on top of the character following
the point position the cursor's located at, so in my picture I tried to
preserve that property. So for instance, if the cursor is displayed on
top of Z, that should represent the buffer position before Z, IOW, 3.
> Or say we start marking text from Z by
> dragging a mouse to the right--what should happen when we get to 1?
Yeah, regions (e.g. dragging) are a problem; presumably it's necessary
to map into a contiguous region to make the generic emacs buffer
operations happy.
E.g., one possible way of mapping bidi selections into buffer regions,
and then into display (here [ and ] are what the user drags, and * is
what the display engine highlights):
SELECTION (min,max = 2,3) => BUFFER => DISPLAY
Z [Y] X 1 2 3 C B A X[Y]Z 1 2 3 A B C Z Y X 1 2 3 C B A
3 42 31 24 55 66 79 08 97 8 1 2*3 4 5 6 7 8 9 0 *
SELECTION (min,max = 1,3) => BUFFER => DISPLAY
Z [Y X] 1 2 3 C B A [X Y]Z 1 2 3 A B C Z Y X 1 2 3 C B A
3 42 31 24 55 66 79 08 97 8 1*2*3 4 5 6 7 8 9 0 * *
SELECTION (min,max = 1,5) => BUFFER => DISPLAY
Z [Y X 1] 2 3 C B A [X Y Z 1]2 3 A B C Z Y X 1 2 3 C B A
3 42 31 24 55 66 79 08 97 8 1*2*3*4*5 6 7 8 9 0 * * * *
SELECTION (min,max = 1,6) => BUFFER => DISPLAY
Z [Y X 1 2] 3 C B A [X Y Z 1 2]3 A B C Z Y X 1 2 3 C B A
3 42 31 24 55 66 79 08 97 8 1*2*3*4*5*6 7 8 9 0 * * * * *
Dragging to select Y - 2 selects Z even though the user probably didn't
want it.
Gack...
-Miles
--
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."
Re: invisible, Richard Stallman, 2004/03/04