Re: [code] [textadept] Problem with spawn in macOS

From: Giovanni Salmeri <>
Date: Tue, 7 Nov 2017 08:56:24 +0100

> I suspect that `pandoc -v` is returning/exitting too quickly for
> spawn to read any resulting output from. For non-async commands that
> you expect to return nearly immediately, stick to Lua's `io.popen()`.
> In your `ls` example above, there is some I/O done before printing,
> and that "lag" is probably sufficient enough to allow spawn to do
> some reading.

The same thing happens also when pandoc (for example) has a file as
input [print(spawn('pandoc'):read('a'))]... But anyway your
advice can solve my issue (I had almost forgotten io.popen ()!), I
think I will write my function using spawn for WIN32 (in order to avoid
the horrible flashing of the terminal), and io.popen for OSX and LINUX.
Thank you!

Giovanni Salmeri
You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Tue 07 Nov 2017 - 02:56:24 EST

This archive was generated by hypermail 2.2.0 : Tue 07 Nov 2017 - 06:44:36 EST