Re: [code] Textadept-curses for WIN32: Problems with os.spawn, os.execute and io.popen

From: Mitchell <m.att.foicica.com>
Date: Thu, 16 Jan 2020 14:21:43 -0500 (EST)

Hi Gavin,

On Mon, 13 Jan 2020, Gavin Holt wrote:

> Hi
>
>
> I have posted some successes with Textadept-curses, as I explore there are
> a few problems specific to Textadept-curses for WIN32.
>
>
> I don't have the knowledge to identify which problems arise from the
> 'Microsoft - Windows Console[1]','PDCurses library[2]','Lua 5.3
> interpreter[3]', 'Textadept-curses.exe [4]','gtdialog [5]','cdk
> [6]','libtermkey [7]' I have used a pristine download to exclude my own
> configurations ;)
>
>
> 1) os.spawn error
>
>
> The CURSES and WIN32 version of os.spawn is defined in core/init.lua:20 and
> I get errors which seem to be due to missing parameters.
>
>
> Test case is trying to load the manual using the command list - keys.msc
> (Help: Show Manual) from textadept-curses.
>
>
> Error message is "TextAdept.10.8/core/init.lua:24: bad argument #1 to
> 'type' (value expected)".
>
>
> Is my simple fix of adding "if (select(i,...)) and" on lines 24 and 28
> enough for this function to work as required for all instances/parameters?
>
>
> 2) os.execute writes text over the application
>
>
> I notice that os.execute is not called anywhere in Textadept (or
> Textredux).
>
>
> When I make a call, using the command entry line or repl, the screen shows
> the output over the top of Textadept.
>
>
> Is there any way to intercept/redefine this function to redirect output to
> the message buffer?
>
>
> 3) io.popen kills the mouse
>
>
> Every time a function calls io.popen I loose mouse input until I close and
> restart textadept-curses.exe.
>
>
> Test case execute this line "t = io.popen("dir *.* ","r") output =
> t:read('*all') t:close() print(output)".
>
>
> Is there any way to reinstate mouse input after io.popen?

These have all been fixed by [1] and will be available in the next nightly build.

Cheers,
Mitchell

[1]: https://foicica.com/hg/textadept/rev/a0d9891d2dbf>

-- 
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 Thu 16 Jan 2020 - 14:21:43 EST

This archive was generated by hypermail 2.2.0 : Fri 17 Jan 2020 - 06:26:34 EST