<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for the explanation, Eli.<br><br>The idea of making tags not influence the reordering of the surrounding text nor the base direction was one of the first use case I thought of when I heard about the Isolation characters the first time. I believe it would make editing BiDi HTML much easier. I'll file a feature request about the idea.<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></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 5, 2015 at 11:48 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 11:20:41 +0300<br>
<span class="">> 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>
><br>
</span><span class="">> I admit that I have very little knowledge about how font selection and<br>
> reordering logic works in emacs.<br>
<br>
</span>Font selection has absolutely no bearing on this discussion. The<br>
visual order is decided based on the characters' properties, not on<br>
how they will be drawn on the glass. For example, they will be<br>
reordered even if they have no glyphs in any available font, or if you<br>
set up a display table to, say, display Hebrew letters as upper-case<br>
Latin letters.<br>
<br>
As to reordering, it happens at display time. The mechanism that<br>
generates data structures used to draw font glyphs on the screen<br>
produces visual order from the logical order, so that those data<br>
structures hold the text already reordered.<br>
<span class=""><br>
> One way of carrying out reordering of <h1>שלום!</h1> would be if the emacs<br>
> major mode was be able to inject the FSI...PDI characters before the text is<br>
> passed to the paragraph direction determining logic. Is this possible?<br>
<br>
</span>No. The logic that determines base paragraph direction is part of the<br>
reordering code which produces visual order from logical order. That<br>
code runs as part of redisplay, and examines only the text that is in<br>
the buffer. So the FSI..PDI embeddings must be present in buffer text<br>
to do what you want.<br>
<br>
If something like what you want is required without changing buffer<br>
text, there could be special text properties on some portions of<br>
buffer text, that would be interpreted by the display code. But that<br>
isn't implemented, mainly because no one expressed any special<br>
interest in that, let alone presented a worked-out set of requirements<br>
for it.<br>
</blockquote></div><br></div>