emacs-devel
[Top][All Lists]
Advanced

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

Re: arrow keys vs. C-f/b/n/p


From: Lennart Borgman
Subject: Re: arrow keys vs. C-f/b/n/p
Date: Sat, 12 Jun 2010 22:07:36 +0200

On Sat, Jun 12, 2010 at 9:55 PM, Eli Zaretskii <address@hidden> wrote:
>> From: Lennart Borgman <address@hidden>
>> Date: Sat, 12 Jun 2010 20:58:18 +0200
>> Cc: address@hidden
>>
>> > For users of R2L scripts, what you suggest is a disaster.  If cursor
>> > motion is visual by default, one cannot even mark text by holding
>> > Shift and moving point with the arrow keys.
>>
>>
>> I see no reason for this. The arrow keys will with visual motion move
>> just as they do if all the text where just L2R. So the visual part
>> will work as before (on the user side, implementation may have to
>> change).
>
> It's not just an implementation issue.  Here's an example.  A text in
> the buffer is
>
>  abcde ABCDE xyz
>
> It will be displayed as
>
>  abcde EDCBA xyz
>
> Now, suppose I move cursor in visual order, as you suggest, holding
> the Shift key, starting at the first character `a' and ending at `C'.
> The underline below shows which characters I traversed:
>
>  abcde EDCBA xyz
>  ---------
>
> Now, what characters do you think should be displayed with the region
> face?


As I said in another message it would be "abcde CBA", i.e. exactly the
visual region that you now get when moving with the arrow keys so that
you get to C.

It has nothing to do with HOW you moved to C.


> Now I type "M-w".  What text will that copy to the kill ring?


See above.


>> Converting the visual region you visually see on the screen to a
>> logical range is a bit difficult, but not impossible.
>
> It's impossible.  There's no general algorithm to reverse the
> logical-to-visual reordering of text, i.e. produce the original
> logical-order text from its visual-order replica on the screen.  Only
> relatively simple cases, without embeddings that push the
> bidirectional level beyond 2 or 3 (UAX#9 allows up to 60 levels) can
> be reversed.


You mean bidirectional in bidirectional in bidirectional ...?

Yes, you are right. It would be impossible to find a continuous range for that.

But this still has nothing to do with the visual movement of the arrow keys.



reply via email to

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