[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-bidi] reordering based on implicit levels
From: |
Eli Zaretskii |
Subject: |
Re: [emacs-bidi] reordering based on implicit levels |
Date: |
Mon, 12 Nov 2001 11:22:21 +0200 (IST) |
On Mon, 12 Nov 2001, Alex Schroeder wrote:
> It seems that the default operation will fail if the string is mostly
> R2L. The lines will be reversed as well. Example:
>
> (let ((str "THIS IS EITHER ARABIC OR HEBREW AND SHOULD ALL BE INVERTED.
> CURRENTLY
> IT IS NOT REALLY AS JUSTIFIED AS IT COULD BE. WE'LL LOOK AT THIS
> LATER. cheers, alex."))
> (bidi-reorder-string
> str
> (bidi-resolve-implicit-levels
> (bidi-resolve-weak-types
> (bidi-get-types str)))))
>
> "RETAL
> SIHT TA KOOL LL'EW .EB DLUOC TI SA DEIFITSUJ SA YLLAER TON SI TI
> YLTNERRUC .DETREVNI EB LLA DLUOHS DNA WERBEH RO CIBARA REHTIE SI SIHT.
> cheers, alex."
That's because you don't pay attention to newlines.
> Splitting on newlines, running the algorithm on single lines, and
> joining them again seems to work fine, however:
That's what you need to do: invert each line individually.
- Re: [emacs-bidi] reordering based on implicit levels, (continued)
- Re: [emacs-bidi] reordering based on implicit levels, Eli Zaretskii, 2001/11/13
- Re: [emacs-bidi] reordering based on implicit levels, Alex Schroeder, 2001/11/12
- Re: [emacs-bidi] reordering based on implicit levels, Eli Zaretskii, 2001/11/13
- Re: [emacs-bidi] reordering based on implicit levels, Alex Schroeder, 2001/11/13
- Re: [emacs-bidi] reordering based on implicit levels, Eli Zaretskii, 2001/11/13
Re: [emacs-bidi] reordering based on implicit levels, Alex Schroeder, 2001/11/11
Re: [emacs-bidi] reordering based on implicit levels, Alex Schroeder, 2001/11/11
- Re: [emacs-bidi] reordering based on implicit levels,
Eli Zaretskii <=
[emacs-bidi] explicit formatting codes in visual-order text, Alex Schroeder, 2001/11/11
Re: [emacs-bidi] reordering based on implicit levels, Alex Schroeder, 2001/11/11