<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I admit that I have very little knowledge about how font selection and reordering logic works in emacs. <br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">One way of carrying out <span class="im"></span>reordering of <span class="im"><h1>שלום!</h1> </span>would be if the emacs major mode was be able to inject the FSI...PDI characters before the text is passed to the paragraph direction determining logic. Is this possible? <br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Dov<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 5, 2015 at 10:12 AM, Eli Zaretskii <span dir="ltr"><<a href="mailto:eliz@gnu.org" target="_blank">eliz@gnu.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> Date: Sun, 5 Apr 2015 09:46:50 +0300<br>
> From: Dov Grobgeld <<a href="mailto:dov.grobgeld@gmail.com">dov.grobgeld@gmail.com</a>><br>
> Cc: "Nadav Har'El" <<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>>, Dotan Cohen <<a href="mailto:dotancohen@gmail.com">dotancohen@gmail.com</a>>,<br>
> linux-il <<a href="mailto:linux-il@cs.huji.ac.il">linux-il@cs.huji.ac.il</a>><br>
<span class="">><br>
> Great! Does this mean that a major mode can now modify a markup like <tag> so<br>
> that it is "rendered" as &FSI;<tag>&PDI; and thus have no influence on the<br>
> chosen paragraph direction?<br>
<br>
</span>I'm not sure what you mean by "rendered as". Emacs needs to see the<br>
FSI and PDI controls in the buffer, in order for them to take their<br>
effect on buffer text prescribed by the UBA. And if the tag is in<br>
some display or overlay string, the FSI and PDI controls must be in<br>
the same string.<br>
<span class=""><br>
> If this works and you write<br>
><br>
> <h1>שלום!</h1><br>
><br>
> it would be shown in emacs as an RTL paragraph as the tags would be ignored.<br>
<br>
</span>Yes, if <h1> is enclosed in FSI..PDI, this is displayed as an RTL<br>
paragraph in Emacs 25.0.50, the development version. However, usual<br>
caveats about what is a paragraph apply: if the above line is not<br>
preceded by an empty line, it will "inherit" the base paragraph<br>
direction from preceding lines; Emacs will not change the base<br>
direction except at the beginning of a new paragraph.<br>
</blockquote></div><br></div>