Hi all,
thanks for the comments.
I was careful about tagging, not to create tag loops, but I can see how that would be a problem. You'd have the same problem with the TOC macros – which are recursive – though, wouldn't you (at least with the types that are always fully expanded)?
If Mark is right that would at least explain why TW would always run into a recursion error, no matter if there even are *any* tagged tiddlers. The filter would recurse indefinitely during setup. However, the numbered subfilters are not really pretty.
I cannot use macros as Soren proposed since I need to store the whole tagging tree in a variable for later use in an :intersection filter.
If there at least was a way to integrate a counter into the recursion, one could make it stop after a flexible number of iterations, which number could be passed into the filter expression via a variable.
Right now,I resorted to just create a single, long filter expression and stopped after 3 levels. To add another level, I need to modify the filter expression itself, though.
Yaisog