Re: [code][textadept] file filtering

From: Mitchell <>
Date: Sun, 2 Jun 2019 15:51:42 -0400 (EDT)


On Wed, 10 Apr 2019, Mitchell wrote:

> Hi Peter,
> On Wed, 10 Apr 2019, Peter Rolf wrote:
>> Am 09.04.2019 um 17:50 schrieb Mitchell:
>>> Hi Peter,
>>> On Tue, 9 Apr 2019, Peter Rolf wrote:
>>>> Hi Mitchell,
>>>> I am using "lfs.dir_foreach()" to scan a directory tree for "*.json"
>>>> files. This works fast and reliable, but the lack of an include
>>>> parameter for file filtering forces me to exclude all other existing
>>>> file types by listing them in the filter.
>>>> [snip]
>>> I'm not sure what's going wrong. When I open the Lua command entry and
>>> enter:
>>>   lfs.dir_foreach(_HOME, print, {'.lua', '/core'})
>>> Textadept prints out .lua files in /core, but not those in /modules or
>>> /themes, nor does it print out the other files like .png, .conf, .luadoc
>>> in /core.
>>> To me this appears to be functioning properly.
>>> Granted, I am using a post 10.3 nightly build, but I don't think any
>>> filter code has changed since 10.3 itself.
>>> Do you have a simple file tree that you can submit, along with your
>>> filter, that demonstrates the issue so that I can debug? Thanks.
>> Sorry, no simple file tree available. More the opposite (30.5G, 32928
>> file in 3391 directories).
>> Anyhow, I tested a bit and just ".json" as filter works fine. But as
>> soon as I add exclusive directories it breaks. You can try this with
>> lfs.dir_foreach(_HOME, print, {'.lua', '!/core'})
>> which just lists "init.lua" here (ignoring all other sub directories,
>> not only "core"). Maybe I have missed something in the syntax...
> I think you've found a bug. I will look into this when I have some time.
> Sorry for the inconvenience :(

Sorry for the delay, but I found some time and think I've solved the bug[1]. This fix should be in tonight's nightly build.



You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sun 02 Jun 2019 - 15:51:42 EDT

This archive was generated by hypermail 2.2.0 : Mon 03 Jun 2019 - 06:36:43 EDT