[code] [textadept] output from spawn on Windows?

From: Mateusz Czaplinski <czapkofan.att.gmail.com>
Date: Sat, 7 Feb 2015 00:00:50 +0100

Hi,

I tried to use spawn() on Windows, and retrieve some output from it, but
all seems empty. Is it supposed to work on Windows (7, x64)? Maybe I'm
using it wrong - could you please maybe show me a full command that's
expected to work to capture output? (To be more precise: the command seemed
to run successfully in itself, only I couldn't capture the output.) I tried
something like below:
    local pout, perr, pcode = '', '', nil
    local proc = spawn(my_command, my_workdir,
        function(out) pout = pout + out end,
        function(out) perr = perr + out end,
        function(code) pcode = code end)
    local s, errc, err = proc:read '*a'
    if s==nil then
        ui.print('error: '..errc..' '..err)
    end
    ui.print('s=', s)
    ui.print('pout=', pout)
    ui.print('perr=', perr)
    ui.print('pcode=', pcode)
In the [Message Buffere] they all show empty, and pcode shows nil.
Also tried to add proc:wait() before or after the read(), but doesn't seem
to help either.

Also, unrelated question (should I open a new email thread for such in
future?): I wanted to make whitespace markers visible, but somewhat faded
in colour. I'm using the base16-tomorrow-dark theme, which doesn't seem to
provide colors for whitespace. So, I wrote a function which builds a color
between 'fore' color and 'back' color, and assigns it to
`buffer.property['style.whitespace']`. Now, to what event(s) should I
connect the function? I tried the LEXER_LOADED event (as is suggested
somewhere in the manual for tab width settings), but it works weirdly: the
"faded" colour shows up only after leaving a tab and coming back to it;
initially, the whitespace colors are "full" (from the main base16-...
theme). And, doesn't seem to "fade" on e.g. the [Message Buffer]. (How) can
I fix those issues?

Thanks,
/Mateusz.

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 06 Feb 2015 - 18:00:50 EST

This archive was generated by hypermail 2.2.0 : Sat 07 Feb 2015 - 06:34:15 EST