<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi David</p>
<p><br>
</p>
<p>Sure \textdir works in vertical mode in luatex but luatex's behavior is buggy. For instance, consider the following minimal example</p>
<p><br>
</p>
<p><br>
</p>
<p>{\textdir TRT This} is just a test.</p>
<p><br>
</p>
<p>\bye</p>
<p><br>
</p>
<p>As you can see there is no indent at the beginning of the paragraph and that indent is shifted as a space between `This' and `is' which is completely wrong. So to fix it, you have to issue a \leavevmode at the start of the paragraph but by doing that, you
 are already entering horizontal mode.</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><span id="ms-rterangepaste-start"></span></p>
<div><br>
</div>
<div></div>
<span id="ms-rterangepaste-end"></span><br>
<p></p>
</div>
</div>
</div>
</body>
</html>