[tw5] Re: Subfilter recursion

2021-04-20 Thread Yaisog Bonegnasher
Here is my 5-level-deep tiddler collection beneath a tag á la Mark: \define tiddlertree-level5() [tagging[]] \define tiddlertree-level4() [tagging[]] [tagging[]subfilter] \define tiddlertree-level3() [tagging[]] [tagging[]subfilter] \define tiddlertree-level2() [tagging[]] [tagging[]subfilter] \

[tw5] Re: Subfilter recursion

2021-04-20 Thread Yaisog Bonegnasher
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 fil

Re: [tw5] Re: Subfilter recursion

2021-04-19 Thread Mohammad Rahmani
Have a look in TW-Script! A solution by Eric Shulman shows how to exclude a tag and how simply prevent a recursion loop! much simpler than the official toc macro! https://kookma.github.io/TW-Scripts/#A%20Simple%20Recursive%20TOC%20Macro Best wishes Mohammad On Mon, Apr 19, 2021 at 10:11 PM Jean

[tw5] Re: Subfilter recursion

2021-04-19 Thread 'Mark S.' via TiddlyWiki
If you write your own recursion macro, you can put braces around each item in the output. Then set that output to a name inside a wikify widget. Then use that variable with the enlist operator to create your list that you want to use in an intersection. I just posted some similar code in another

[tw5] Re: Subfilter recursion

2021-04-19 Thread Yaisog Bonegnasher
Yeah, the TOC macros are very clever in avoiding recursion. It's hard to imagine putting all this into a filter expression... On Monday, April 19, 2021 at 8:31:06 PM UTC+2 Yaisog Bonegnasher wrote: > Hi all, > thanks for the comments. > I was careful about tagging, not to create tag loops, but I

[tw5] Re: Subfilter recursion

2021-04-19 Thread Yaisog Bonegnasher
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 righ

[tw5] Re: Subfilter recursion

2021-04-19 Thread Soren Bjornstad
This is a good point. The built-in table-of-contents macro appears to avoid the issue by excluding the current tiddler at each level, which could be applied to my example above: \define toc-body(tag,sort:"",itemClassFilter,exclude,path) <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[

[tw5] Re: Subfilter recursion

2021-04-19 Thread Jean-Pierre Rivière
About recursive macro, they may be possible, but the problem is how to stop the recursion. Your example works if there is no loop created by tagging. The problem is we don't have a proper <> macro to decide what to do (control recursion call in that case). Or how do you do that? Le dimanche 18

[tw5] Re: Subfilter recursion

2021-04-18 Thread Soren Bjornstad
Update, I did another experiment and subfilter[] does work the way you were using it. I'm guessing Mark is right and it tries to create the filter before it actually runs it and sees there are no results. On Sunday, April 18, 2021 at 2:36:33 PM UTC-5 Soren Bjornstad wrote: > I've never tried to

[tw5] Re: Subfilter recursion

2021-04-18 Thread Soren Bjornstad
I've never tried to do a recursive* filter*, so I don't know what's technically possible (though I've never seen someone try to use multiple filter runs in *subfilter* and am a bit suspicious that the second run is doing a tagging[] on everything in your wiki). But recursive macros are easy and

[tw5] Re: Subfilter recursion

2021-04-18 Thread 'Mark S.' via TiddlyWiki
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