emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] adding LRM in visual-to-logical transform


From: Alex Schroeder
Subject: Re: [emacs-bidi] adding LRM in visual-to-logical transform
Date: Sun, 18 Nov 2001 21:47:33 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

"Eli Zaretskii" <address@hidden> writes:

> I think there's some kind of misunderstanding; perhaps you could give
> an example of the case you had in mind (logical buffer contents, its
> visual appearance, and the search string typed by the user).

Logical buffer contents: "my CAR123"
Visual appearance:       "my 123RAC"
Search String typed:     "my 123CAR"

Note that the search string will display just the same "my 123RAC".

Unless there's a bug in my understanding of the bidi algorithm.

Here's some debug for "my CAR123"

(bidi-pretty-print "my CAR123")
"   m   y       C   A   R   1   2   3"
(bidi-pretty-print
 (bidi-get-mnemonics
  (bidi-get-types "my CAR123")))
"   L   L  WS   R   R   R  EN  EN  EN"
(bidi-pretty-print
 (bidi-get-mnemonics
  (bidi-resolve-weak-types
   (bidi-get-types "my CAR123"))))
"   L   L   L   R   R   R  EN  EN  EN"
(bidi-pretty-print
 (bidi-resolve-implicit-levels
  (bidi-resolve-weak-types
   (bidi-get-types "my CAR123"))))
"   0   0   0   1   1   1   2   2   2"

Same thing for "my 123CAR":

(bidi-pretty-print "my 123CAR")
"   m   y       1   2   3   C   A   R"
(bidi-pretty-print
 (bidi-get-mnemonics
  (bidi-get-types "my 123CAR")))
"   L   L  WS  EN  EN  EN   R   R   R"
(bidi-pretty-print
 (bidi-get-mnemonics
  (bidi-resolve-weak-types
   (bidi-get-types "my 123CAR"))))
"   L   L   L   L   L   L   R   R   R"
(bidi-pretty-print
 (bidi-resolve-implicit-levels
  (bidi-resolve-weak-types
   (bidi-get-types "my 123CAR"))))
"   0   0   0   0   0   0   1   1   1"

> The only exception from this rule are the characters that are not
> displayed, like RLE, PDF, etc.

I think the example shows that this will not be enough.  :(

Alex.
-- 
http://www.emacswiki.org/



reply via email to

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