Obviously, experienced and smart users of TiddlyWiki, like @EricShulman and @Mohammad , have a good grasp of the filters.
In my case, @saqimtiaz response here is the first stance when filters made sense to me. Otherwise, I have been coasting on other people’s filters and changing operators randomly until it worked. Keep in mind that I have been using TiddlyWiki for years.
I am pretty sure there are more users like me who have trouble figuring out filters.
Taking a cue from @saqimtiaz’s excellent explanation, my suggestion to improve the filter documentation is to add pseudocode with every operator to explain its working. Or we can also use flowcharts, to explain the magic of filters.
For example, the tag
filter can be explained with this pseudocode.
[tag[Example Tag]]
var output list
forEach i in all tiddlers
do
if i.field(tag) == "Example Tag"
push tiddler to the output list
endif
done
print output list
Similarly, the tagging
operator.
[tag[Example Tag]tagging[]]
var intermediate list
forEach i in all tiddlers
do
if i.field(tag) == "Example Tag"
push i to the intermediate list
endif
done
var output list
forEach i in all tiddlers
do
forEach j in the intermediate list
do
if i.field(tag) == j
push i to the output list
endif
done
done
print output list