Re: [code] io.snapopen() not working in Textadept 7.2

From: Mitchell <>
Date: Wed, 7 May 2014 23:09:51 -0400 (EDT)


On Tue, 6 May 2014, Ryan Pusztai wrote:

> On Tue, May 6, 2014 at 8:14 AM, Mitchell <> wrote:
>> Hi Ryan,
>> On Mon, 5 May 2014, Ryan Pusztai wrote:
>> Hi,
>>> I am not able to use
>>> `io.snapopen( nil, nil, nil, { title = "Open Current Project", width =
>>> ui.size[1] - 100 } )`
>>> in the latest version. I tried to debug it and the logic seems good, but
>>> "paths" is not getting set. It is always nil even after you set it to
>>> "io.get_project_root()". I can't figure out why.
>>> I change the code from:
>>> if not paths then paths = io.get_project_root() end
>>> to:
>>> local paths = paths or io.get_project_root()
>>> and it works. Can anyone explain why paths is not able to be set? And if I
>>> am using io.snapopen() wrong or is this a bug in Textadept?
>> If you're on Linux or Mac OSX, you can call `_G.print()` from within
>> `io.snapopen()` to inspect the arguments passed in order to fully
>> understand what is going on; I'm not sure what is wrong.
> Yes I am doing that. I put a print() before and directly after the `if not
> paths then paths = io.get_project_root() end` and 'paths' is still nil. It
> is really crazy. I am using TA 7.2 amd64 Ubuntu 13.10 amd64. It seems like
> an _ENV issue or a global named "paths" or something. Have you checked it
> on your box?

Textadept doesn't use _ENV or a global "paths". I cannot reproduce on my
box. Have you tried with a clean _USERHOME?


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 07 May 2014 - 23:09:51 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 May 2014 - 06:26:24 EDT