[Top][All Lists]

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

Re: bidi-display-reordering is now non-nil by default

From: Eli Zaretskii
Subject: Re: bidi-display-reordering is now non-nil by default
Date: Thu, 25 Aug 2011 09:12:18 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Thu, 25 Aug 2011 00:38:51 -0400
> But I think I now understand the problem you're talking about:
> ABCD! all on its own would be properly displayed as !DCBA, but if it is
> followed by an LRM mark then it will turn into DCBA!.  So, yes, that's
> a problem.  What about adding a TAB instead of an LRM?

Won't help, you need an RLM after the exclam.  Or enclose the entire
string in RLE..PDF, see below.

> >  emacs -Q
> >  M-: (read-buffer "Buffer name: " "אבגדה") RET
> >  M-n
> Right.  This is one more example of a "field".  I think we'd want
> a function like bidi-independent-string which takes a string STR and
> returns a new string that displays just like STR does but with the added
> twist that none of the surrounding text will ever get displayed in the
> middle of STR and that text that comes after STR gets displayed "after"
> and text that comes before gets displayed "before".
> I'm not sure if that is possible or even meaningful, tho.

It's possible.  It's called "embedding".  Here (watch the directional
control characters around the parentheses):

   Buffer name ‪(default "אבגדה"):‬ אבגדרשת123

Should we provide bidi-embed-string-l2r/r2l functions?

> >> E.g. I think that a buffer ABC<1> should be either displayed as CBA<1>
> >> or <1>CBA depending on the surrounding text direction (which might be
> >> different from the paragraph direction).
> > If not, what do you mean by "surrounding text direction"?
> Whether this ABC<1> appears within an L2R chunk of text or an L2R chunk
> of text.  I guess that "paragraph direction" is a good approximation.

Why not always display it is <1>CBA ?  That's the natural visual

reply via email to

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