I have to filter tiddler with tags names of the form "criterion 2.4", "criterion 10.1", etc...
I have devised a simple macro:
\define countCrit(crit) <$count filter="[tag[$crit$]]"/>
which is call like <<countCrit "criterion 4.2">>
But repeating "criterion" is tedious and could make error. what I'd like is to have
<<counting 4.2>>
which would itself call <<countCrit "criterion 4.2">> for me. Or make the computation by itself (I tried both ways).
But I cannot be successfull on transforming 4.2 into "criterion 4.2" for this purpose.
Getting the string seems easy, for instance using the addprefix operator. But the whole filter has a syntax error.
My code:
\define counting(ref) <$count filter="[tag[ [$ref$] +[addprefix[critère ]] ]]"/>
used as <<counting "1.3">>.
Is there a tool for checking filter syntax and help getting it right? The .operator-example macro of the doc is of limited use for that. It just help making tries but when all your tries are wrong without your knowing why...