Ok, looking more closely at the parameters passed to a filter, I realised 
that the current *results* are in fact passed down as the first parameter, 
so I can loop over them (rather than all tids) when my filter is being the 
second one executed, which I can figure out checking the *index* property 
of the second parameter called *match*.

In other words, if I use the *[get[##SectionName]]* filter after that of 
*MatchTagsPlugin* it will now further restrict the set, which does not 
"conform" to the default handling where the tag filters chain using OR 
logic (which I find problematic).

So, what it boils down to is having a reliable standard as to...

   1. What is the core default for how filters chain: *AND* or *OR* logic?
   2. If one is the default, what core syntax is provided to model the 
   other?

While there are filters that don't add to the set, i.e. *sort* or *limit*, 
default 
should be *AND* logic, i.e. any subsequent filters further constrain the 
results of the previous filter.

Preferably, if I wanted *OR* logic, there I would use a dedicated *syntax*that 
requests it, i.e.
..

[tag[X]]+[tag[Y]]

*Meaning:* get all tiddlers *tagged X OR tagged Y*, whereas the default 
would be...

[tag[X]][tag[Y]]

*Meaning:* get all tiddlers *tagged X AND tagged Y*.

Unfortunately, the current implementation seems to work the other way 
around, so that the above in fact works as tag X OR tag Y at least when it 
comes to the *[tag[Foo]]* filter.

While it is sure a great thing that *MatchTagsPlugin* provides extended 
filter capabilities the question still stands: How do filters chain and if 
they are indeed to chain using OR logic (which I don't think they should!), 
how to model them such that they are interpreted using AND logic?

Seeing how there is the match.index property, one could easily figure out 
whether the character before the current filter being processed is a 
dedicated (set of) symbol(s), i.e. *+*, *&*, or *AND* which the filter 
processing might just otherwise ignore.

For example, if I said...

[tag[X]]&[get[::Slice]]

...the *[get[::Slice]]* filter could check if the symbol preceding the 
*[get[what]]* in fact is an *& *and thus only return results that match the 
*get* query, rather than add any further matching tiddlers out of all 
tiddlers that match the query using OR logic.

Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to