This is for spotting tiddlers that all have the same specific tag, but I need to spot where I didn’t add a secondary tag. I need a filter that does the following:
List all tiddlers with tag [[Foo foo]] but that have no other tags, view <$link/> plus all the tags except for the tag [[Foo foo]]
The tags field is technically just a list field with special treatment, so if you want to test for tiddlers with one and only one specific tag, you can do it the same way you’d look for any other exact field value—with the field operator.
<$let my-tag="[[Foo foo]]">
<!-- list all tiddlers with my-tag and only my-tag -->
<$list filter="[field:tags<my-tag>]">
</$list>
<!-- Display all tags BUT my-tag -->
<$list filter="[tags[]] -[<my-tag>]" variable="extra-tag">
</$list>
</$let>
Notes:
As usual with lists, [[Foo foo]] needs brackets in the $let variable definition if it’s a multi-word value, but not otherwise. Single-word tags don’t get brackets in the tags field.
An empty list widget will display its results as a list of links, so you don’t need to add anything inside if all you want is the list of tiddlers.
In theory, you could then nest the second list inside the first to make a series of checkboxes that let you add a secondary tag without leaving your tag-manager page:
Be cautious if you have a lot of tiddlers with only the [[Foo foo]] tag, a lot of tags other than [[Foo foo]], or both! I tested this on tiddlywiki.com with the TableOfContents tag, and this is just an abbreviated sample of the output:
Remember that when you use one of these checkboxes to add a second tag, the tiddler will disappear from the list, as it no longer meets the condition of having one tag, [[Foo foo]].
As a side note, I really like the Commander plugin for bulk tag/field operations.
Sorry, your thing didn’t work right, it showed a list of tags rather than the titles of the tiddlers tagged [[Foo foo]] etc. But I realize now that I expressed myself wrongly above, anyway.
I came up with a different solution: <$list filter="[tag[.Cheat sheets]sort[tags]]"><$view field="tags"/> / <$link/><br></$list> Not a 100% perfect solution, but close enough for my purposes. It is visually quick to review. Since the tag in question starts with a decimal point, that tag shows to the left. So I can scan the list quickly to see the tiddlers that have no other tag just to the right of [[.Cheat sheets]].
I’m not entirely sure what went wrong with my code; it works as expected on tiddlywiki.com and in my personal wiki. But I’m glad you found a solution that works for you!