tw5-relink
tw5-relink copied to clipboard
[feature request] document & extend the relink filter operator
this thread from a year ago is the only discussion I can find regarding the use of the relink:references
and relink:backreferences
filter operators. There you mentioned that the operators are meant strictly for internal use because they are subject to change at any time, but that you might take some time to make them official.
Has there been any progress on making those filter operators? I find that those filter operators are the only way I know to get a comprehensive list of backreferences that occur outside of the main text field within the tiddlywiki ecosystem, so I default to using it fairly often inside my wiki.
However, i've often found myself wanting it to be just a tad more customizable. afaik when I call relink:backreferences
it just returns the full list and theres no way to customize it. it would be amazing if there was a way to specify "backreferences in the titles of other tiddlers" or "backreferences from Macros" or "backreferences from a specific field"
curious how you feel about this.
thanks for all the hard work with this absolutely essential plugin!!!
for now i found a workaround: using a subfilter to check the prefix of relink:report
. but it sure feels like a hack!
There hasn't been any progress on filters, but the ones that exist will remain. Way too many people are using them for me to take them out.
I might add some more filters for a Relink version of missing or orphans. Those would be clearly defined, but what you're describing (filtering based on the type of reference, whether from macros, filters, or widgets) wouldn't have a clear way of functioning. There are just too many ways it might work.
For instance, you say you'd like to filter by backreferences from macros and nothing else. So that would include <<myMacro targetTitle>>
obviously, but what about {{{ [...<myMacro targetTitle>...] }}}
, because we're filtering out filter references right now. References can be nested in types infinitely deep, and be infinitely complex.
That's why I've avoided something like that, and why I rely on blurbs. The blurbs are recursive, so they're able to represent infinitely complicated references. True, they're intended to be human-readable, and not machine-readable, but I do think filtering based on patterns in those blurbs is probably not all that hackish, and would work just fine 99% of the time.
I'll keep this open for now, because I really should get around to documenting the filters that are there. And I may add some when the time comes, but don't hold your breath for something as elaborate as what you're hoping for.
good to know they won't be changing! and I definitely was underestimating the complexity; infinitely recursive macros and transclusions were not where my head was at hahaha.
The specific use case I had was that I wanted to get all of the references & backreferences of a tiddler excluded ones that come from the title renaming subplugin, because my wiki already has a separate way of visualizing title based relationships.
Good to know that you don't think using the report blurbs is much of a hack, im assuming that means they'll remain as is for the forseeable future.
Considering that my actual use case was far less complicated than what i proposed in the issue, I wont be holding my breath for that kind of complexity.
Thanks for continuing to maintain this awesome plugin & for being so responsive!!! <3
The filters relink:references
, relink:backreferences
, and relink:report
are now documented and officially supported. I may introduce relink:missing
and relink:orphans
sometime soon, but for now I'm closing this issue.