help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: emacs 24's forward-char vs right-char behavior


From: Eli Zaretskii
Subject: Re: emacs 24's forward-char vs right-char behavior
Date: Wed, 25 Apr 2012 11:50:53 +0300

> From: Joost Kremers <joostkremers@yahoo.com>
> Date: 25 Apr 2012 08:32:36 GMT
> 
> i have no idea how difficult it would be to make right/left-char always
> move to the right/left even in cases of mixed paragraphs, but i suspect it
> wouldn't be easy to get it right. i'd involve checking if right/left-char
> happens to move over a direction switch and if so, searching
> forward/backward to find the buffer position where the direction switches
> again and jump there.

Yes, it's not easy at all.  Especially if you think about such
complications as moving cursor with the Shift key pressed, which marks
the region you move across.  With the visual cursor motion, the intent
of the user wrt which buffer positions should be included in the
region is ambiguous.

> the difference is with paragraphs that are completely l2r or r2l. c&p the
> following into an empty emacs buffer (or put blank lines before and after):

> كانت الخبازة تخبز أفضل خبز في المدينة ولذلك أحبها الجميع. كانت تخرج
> الخبز الطازج من فرنها الكبير كل صباح. كانت رائحته تعمُ في جميع أنحاء
> الشارع.

> the text will be right-aligned, as it's an all-arabic paragraph.

More accurately, a paragraph is considered right-to-left if its first
strong directional character (after skipping punctuation, digits,
etc.) is R2L.




reply via email to

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