[luatex] writing to log/term

Keith J. Schultz schultzk at gmx.net
Mon Nov 21 09:22:22 CET 2011


Hi All,

I am not sure how TeXWorks is programmed.
Though even if it is block buffer it should out as soon as a
NL is entered. Contact the developers and explain to them
what is going on. Should not be to hard to fix.

regards
	Keith.

Am 20.11.2011 um 10:53 schrieb Arno Trautmann:

> Taco Hoekwater wrote:
>> Better code:
>> 
>> \let\n\relax
>> \directlua{
>> delay = 1.0
>> texio.write_nl("first comment\n")
>> os.sleep (delay)
>> texio.write("second comment\n")
>> os.sleep (delay)
>> }
> 
> Thanks, I wanted to keep the code as OS-independent as possible, but I guess that's not necessary.
> 
>> That avoids the busy sleep, and it may help output responsiveness:
>> texio.write_nl writes text to a new line, but does not actually append
>> the next new line, so on a line-buffered output device, you see the
>> first line only when the second line is being printed. On a block-
>> buffered device that does not help, but usually terminals are not done
>> that way.
> 
> Ok, now I understand what's going on. I have been testing in TeXworks, which seems to be block buffered. On my terminal, your code works as expected, thank you!
> 
> cheers
> Arno




More information about the luatex mailing list