Re-testing in v9.7.3, I find evidence of a different behaviour. This involved some amount of testing and spelunking of pre- and post-v6 Release notes (RNs), and my trove of >14.6k emails from beta-testing and forum support over the years. From the RNs:
- pre-v6:
- v4.6.0, $seq values 1683, 1684, 1702.
- v5.9.0, $seq value 2631.
*v6+:
- v6.5.0, b175.
- v8.1.0, b386, b387, b394.
- v9.6.0, b611
It appears the unlinkX and linkX behave differently with regards to the second operator argument (linkTypeStr). It appears to be that:
- linking operators. The linkTypeStr is optional; its value is parsed as a literal string. If not supplied the link created is of type untitled (link type ā*untitledā)ā .
- unlinking operators. The linkTypeStr is mandatory; its value is parsed as a regex string. The string
"*"
is used (only for unlinking) as a placeholder for all link types and none.
The āOriginalā-suffixed versions of the above are the same but seek to (un)link using the Original. But a weakness in agent use is that if the target links are original-to-original (i.e. no alias involved), the alias in the agent doesnāt seem able to delete links.
Here āToā is outbound links from the acted on note, and āFromā is inbound links into the acted-on note. Note that normally (via the UI) we can only see the detail of outbound links (in Browse Links). Roadmap view shows both in-and out-bound links but only the link and its type, the link itself cannot be modified in the Roadmap.
I think the answer to that problem is to use .eachLink(loopvar,scope){} on a list of notes of intetest. That list would likely be made using a a find()
or collect()
.
Note the unlinking commands cannot use $Path data, although ops like find()
return $Path data, so the user is best using the $ID from the path in the .eachLink()
loop when using unlink commands.
The Tinderbox Help file does little more than list the linking op names so aTbRef is standing proxy for Help here. My strong feeling is my notes are incomplete wrong in these regards:
- linking and unlinking ops ālookā the same but actually are caled differently (e.g. arguments being optional vs mandatory)
- there is no agent based way to ''unlink everything", though for the occasional user, agents are the obvious way to apply action code to desired groups of notes.
List.eachLink()
fills that gap but isnāt simple action code use.
- My article on the latter op doesnāt have a fully worked example of āunlink allā such as a starting user would need.
But, before I start a non-trivial edit across a aTbRef, could @eastgate confirm if the above is correct and there isnāt anything else missed? ā¦ or just wrong!
ā . It is possible, manually, to make a link with no link type value (ironically discovered by a scripting accident), but this is not intended or suggested. Tinderbox expects links to have a link type. Whether the link type is visible as a label in views drawing links should be controlled by the label visibility labeled setting (the latter is also accessible to action code.l