[tw5] Re: unexpected count for filtered transclusion?

2020-12-29 Thread maki aea

perfect, that worked, thank you mark! i am using tabs to set the state, and 
filtering by tag[state], i was (also) using the count to debug the 
single-word tiddler non-square bracket-requirement — there is one more 
subsequent layer of filter transclusion in another macro, when i followed 
your kind advice and put the braces in that subsequent layer without 
quoting to string, to evaluate there instead, it worked! thanks so much!


On Tuesday, December 29, 2020 at 6:23:19 AM UTC Mark S. wrote:

> The triple brace notation indicates that the filter inside the braces will 
> be evaluated. BUT, they don't get evaluated if they are in strings. Which 
> yours are. So in each of yours, the {{{ and }}} get evaluated as if they 
> were tiddler names.
>
> More to the point, you don't use triple brace notation within filters -- 
> you don't need them.
>
> Only the 2nd filter is correct. The 4th filter is not only incorrect 
> because of the triple braces, it is incorrect because it is missing a left 
> square bracket in front of "enlist". 
>
> I think you're trying to count the number of tabs. I guess the way to do 
> this would be to give each tab tiddler a tag, like "mytab".
>
> Then your tab macro would look like
>
> <>
>
> and you could count the tabs like
>
> <$count filter="[tag[mytab]]" />
>
>
>
>
> On Monday, December 28, 2020 at 9:35:21 PM UTC-8 ma...@makiaea.org wrote:
>
>> """
>> doing the following in tiddlywiki.com gives some results i wasn't 
>> expecting, could anyone please show me what i am doing wrong?
>>
>> <>
>>
>> <$count filter="{{{ [tag{$:/state/tab/deck}] }}}"/>
>>
>> <$count filter="[tag[recall]]"/>
>>
>> <$count filter="{{{ [!is[current]tag{$:/state/tab/deck}]] }}}"/>
>>
>> <$count filter="{{{ enlist[tag{$:/state/tab/deck}] }}}"/>
>>
>> why does the filtered transclusion produce a non-zero count? there are no 
>> tiddlers tagged "recall" in the current tiddlywiki, so does the 
>> transclusion do something different to what i am expecting (i.e. a match to 
>> the second filter?)
>> the third filter leads me to think the current tiddler is included 
>> regardless, but what about the remaining count of 1?
>> how does enlist then add another to the count in the fourth filter?
>> """
>>
>> warmest wishes, maki
>>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ecd78078-50ff-49c2-988e-31795894ef05n%40googlegroups.com.


[tw5] Re: unexpected count for filtered transclusion?

2020-12-28 Thread 'Mark S.' via TiddlyWiki
The triple brace notation indicates that the filter inside the braces will 
be evaluated. BUT, they don't get evaluated if they are in strings. Which 
yours are. So in each of yours, the {{{ and }}} get evaluated as if they 
were tiddler names.

More to the point, you don't use triple brace notation within filters -- 
you don't need them.

Only the 2nd filter is correct. The 4th filter is not only incorrect 
because of the triple braces, it is incorrect because it is missing a left 
square bracket in front of "enlist". 

I think you're trying to count the number of tabs. I guess the way to do 
this would be to give each tab tiddler a tag, like "mytab".

Then your tab macro would look like

<>

and you could count the tabs like

<$count filter="[tag[mytab]]" />




On Monday, December 28, 2020 at 9:35:21 PM UTC-8 ma...@makiaea.org wrote:

> """
> doing the following in tiddlywiki.com gives some results i wasn't 
> expecting, could anyone please show me what i am doing wrong?
>
> <>
>
> <$count filter="{{{ [tag{$:/state/tab/deck}] }}}"/>
>
> <$count filter="[tag[recall]]"/>
>
> <$count filter="{{{ [!is[current]tag{$:/state/tab/deck}]] }}}"/>
>
> <$count filter="{{{ enlist[tag{$:/state/tab/deck}] }}}"/>
>
> why does the filtered transclusion produce a non-zero count? there are no 
> tiddlers tagged "recall" in the current tiddlywiki, so does the 
> transclusion do something different to what i am expecting (i.e. a match to 
> the second filter?)
> the third filter leads me to think the current tiddler is included 
> regardless, but what about the remaining count of 1?
> how does enlist then add another to the count in the fourth filter?
> """
>
> warmest wishes, maki
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/546a52f4-61af-483c-8f28-378bf296b6can%40googlegroups.com.