I have to admit that I am beginning to like Mark's solution with the numbered subfilter definitions, even though I unfairly called it "not really pretty". The neat thing about it is that adding another level of "pseudo-recursion" is very easy and very clear. Putting everything into a single filter is complicated to maintain with all sub-expressions having different length (different number of tagging[] constructs). Here, everything looks the same, with just some numbers changed. I think I'm gonna implement this!
On Sunday, April 18, 2021 at 9:31:20 PM UTC+2 Mark S. wrote: > My guess is that it's trying to build the complete filter even before it > runs, so that's why you hit the recursive limit. That is, it's not running > one filter, running the next, testing, etc. It's trying to build the whole > thing, which has no way of exiting. > > Since you know about how many levels, maybe you could prevent the over-run > like this: > > \define subfilter-test5() [tagging[]] [tagging[]] > \define subfilter-test4() [tagging[]] [tagging[]subfilter<subfilter-test5>] > \define subfilter-test3() [tagging[]] [tagging[]subfilter<subfilter-test4>] > \define subfilter-test2() [tagging[]] [tagging[]subfilter<subfilter-test3>] > \define subfilter-test() [tagging[]] [tagging[]subfilter<subfilter-test2>] > > <$set name="test" filter="[[HelloThere]subfilter<subfilter-test>]"> > <$list filter="=[enlist<test>]" template="$:/core/ui/ListItemTemplate" /> > </$set> > > You can add on as many levels as you think you'll ever need. > > On Sunday, April 18, 2021 at 12:01:51 PM UTC-7 Yaisog Bonegnasher wrote: > >> Hi, >> I recently tried to create a recursive subfilter to find all tiddlers >> below a certain tag, no matter how many levels deep (similar to the *kin* >> filter, which is too slow for my large wiki). Unfortunately, I was greeted >> with a red-message-box-of-death informing me of too much recursion. >> However, there should only be a couple of levels. >> Are recursive filters at all possible or am I doing something wrong? >> For a quick example, try this in a new tiddler on tiddlywiki.com: >> \define subfilter-test() [tagging[]] [tagging[]subfilter<subfilter-test>] >> >> <$set name="test" filter="[[TableOfContents]subfilter<subfilter-test>]"> >> <$list filter="=[enlist<test>]" template="$:/core/ui/ListItemTemplate" >> /> >> </$set> >> Any enlightment is greatly appreciated. >> Best regards >> Yaisog >> > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c70957cf-cbf0-460e-8873-1f379723f0ean%40googlegroups.com.

