PMario

I will get to work to setup an TiddlySpot instance to compare the various 
solutions that have been suggested. Thanks everybody!


My ultimate use case would be to have a macro, that given the name of an 
InputTiddler, lists all of the tiddlers that have the exact set of tags
as the Input Tiddler.

Tobias Beer has a "contains" plugin 
(http://tobibeer.github.io/tw5-plugins/#contains) that comes close in that 
it supports a programmatic way 
to specify that all of the tags to be matched, i.e., by setting the list 
variable in the snippet below.

For example consider the modified snippet from one of Tobias' examples as 
follows:

<$vars list="music genre">
<dl>
<$list filter="[contains:tags $all<list>]">
<dt><$link><$view field="title"/></$link></dt>
<dd>''field:'' {{!!tags}}</dd>
</$list>
</dl>
</$vars>

As expected this returns all tidders that have both the "music" and "genre" 
tag including tiddlers that have other tags in addition to "music" and 
"genre".

A possible "what if" solution to my question would be to imagine something 
like an "only" option which 
would match tiddlers that contained only the "music" and "genre" tags. For 
example:

<$vars list="music genre">
<dl>
<$list filter="[contains:tags $only<list>]">
<dt><$link><$view field="title"/></$link></dt>
<dd>''field:'' {{!!tags}}</dd>
</$list>
</dl>
</$vars>

Steve Wharton


On Wednesday, November 30, 2016 at 5:46:56 PM UTC-5, PMario wrote:
>
> On Wednesday, November 30, 2016 at 7:02:25 PM UTC+1, steve wrote:
>>
>> Although I can't say that I understood the use of prefixes, the example 
>> appeared to perform a similar action as a [tag[A]tag[B]] filter. It also 
>> found the additional test tiddler tagded with A, B, and C.
>>
>
> Matabele's example is based on filter runs, which are basically performing 
> a logical AND. IMO it's very close, to what you requested. You just need to 
> tweak it, to your needs. 
>
>
> http://tiddlywiki.com/#Filter%20Run:%5B%5BFilter%20Run%5D%5D%20%5B%5BFilter%20Expression%5D%5D
>  
>
> -mario
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6e648314-0390-4ecf-8df4-62c6baedfe40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to