Re: [code] Confused about Events

From: Robert Gieseke <>
Date: Sat, 03 Jan 2015 14:09:41 +0100


Am 02/01/15 um 22:46 schrieb DrTebi:
> Thanks for the quick reply.
> I figured it out now, it works great!
> One last thing I would like to implement is the `exit_status` that
> os.execute returns--I cannot figure out how to act upon it. It
> *should* return 0 when everything went fine, but I always get a
> boolean value...
> I think the better solution would be to use io.popen, but that will
> get a bit more complicated.

Glad to hear that. `io.popen` would be an option, but it's probably
better to use Textadept's `spawn`[1] functionality:

Replacing os.execute with something like:
  string.format('%s %q %q', sh_cmd, rst_path, html_path),
  nil, nil, nil,
  function (status)
    ui.statusbar_text = 'Exit code: '..status

The last one is the exit callback and would be different from 0 if e.g.
rst2html couldn't be found.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sat 03 Jan 2015 - 08:09:41 EST

This archive was generated by hypermail 2.2.0 : Sun 04 Jan 2015 - 06:48:30 EST