Re: [code][textadept] file filtering

From: Peter Rolf <indiego.att.gmx.net>
Date: Tue, 4 Jun 2019 13:39:17 +0200

Hi Mitchell,

just tested it and it seems to work fine. Thank you!
Filtering the directories results in a noticable speed increase.

Cheers, Peter

Am 02.06.2019 um 21:51 schrieb Mitchell:
> Hi,
>
> 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.
>
> Cheers,
> Mitchell
>
> [1]: https://foicica.com/hg/textadept/rev/7c122fe40f81

-- 
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 Tue 04 Jun 2019 - 07:39:17 EDT

This archive was generated by hypermail 2.2.0 : Wed 05 Jun 2019 - 06:54:35 EDT