Based on our discussion so far, I've created a tiddler for doing "exact tag 
matches". Unfortunately, it seems to fall over tags with multiple 
words/spaces in it. How might I make this searching tiddler more robust in 
the presence of "tags with spaces", since I also use spaces to delimit tags 
in the `edit-text`?

On Thursday, September 23, 2021 at 6:07:22 PM UTC-4 [email protected] wrote:

> ```
> <$list filter="[all[]]">
>    <$list 
> filter="[enlist{!!tags}sort[]join[,]match[playground,rust,test,two words]]" 
> variable="has_matching_tags">
>       <$link/><br>
>    </$list>
> </$list>
> ```
>
> So, this list does what I want and thus answers the question. However, I 
> think I misunderstand something fundamental about lists and filters.
>
> Filters (typically) take in a set of tiddlers and return a set of tiddlers 
> as their output, per the documentation 
> <https://tiddlywiki.com/static/Filters.html>. 
>
> In the case of `enlist{!!tags}sort[]join[,]` by itself, the filter output 
> will be "the current tiddler's tags treated as tiddlers, regardless of 
> whether they exist or not". And running `match[playground,rust,test,two 
> words]` as a subsequent step for a single tiddler will either return no 
> match, or will return "playground,rust,test,two words" (the match docs 
> <https://tiddlywiki.com/static/match%2520Operator.html> say "potentially 
> including duplicates", but I couldn't get that to trigger for e.g. `{{{a 
> [[b c]] [[b c]] +[match[b c]]}}}`).
>
> I just learned that list widgets can be nested; why does the above list 
> return "the titles of the 10 tiddlers with the appropriate tags rather than 
> printing the string "playground,rust,test,two words" 10 times, since the 
> output of `[enlist{!!tags}sort[]join[,]match[playground,rust,test,two 
> words]]` for a given tiddler will be either no match or 
> "playground,rust,test,two words"?
>
> On Wednesday, September 22, 2021 at 9:00:20 AM UTC-4 Eric Shulman wrote:
>
>> On Wednesday, September 22, 2021 at 5:23:57 AM UTC-7 [email protected] 
>> wrote:
>>
>>> [tag[playground]tag[rust]tag[test]tag[two words]] 
>>>
>>
>> The OP goal was to find tiddlers that have all the specified tags, but 
>> ONLY those tags and no others.
>> The problem is that the filter you suggest will also match tiddlers that 
>> have *other* tags in addition to the four tags specified.
>>
>> -e
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8a964750-9410-4ef3-ab63-523fd3a20a66n%40googlegroups.com.

Attachment: Exact Tag Search.json
Description: application/json

Reply via email to