When using typed links, it can be helpful to review the types actually in use and the notes they link. For instance in a document where all links should be typed there should be no (or few) un-typed link, i.e. of 'untitled' link type. Or if using manual work or an action to change a number of links from one link type to another, it is useful to be able check that no incorrect links/link types remain. When working via action code (see below), it is certainly harder to spot edge cases that missed a query and were thus unchanged.
The set of tools/features that are pertinent here are:
- The Links Inspector. This allows the creation/editing/deletion of discrete link types (edits affect the whole document).
- Two pop-overs, but better used 'torn off' as a standalone dialog:
- The Get Info:paths dialog. Regardless of source note, the 'paths' tab is document scope
- The Roadmap dialog. This is tied to a source note but can optionally be untethered so it updates to follow and show links for the current selection.
- The Browse Links pop-over. This is modal and cannot be detached. It shows links (basic/text and Web) whose source is the currently selected note. Thus when editing links, it helps to look at the note at the source end rather than the destination.
Views. Any view type can be used, but most helpful are:
- Outline view, as this allows easy access to notes in any part of the document.
- Hyperbolic view, as the view can be scoped to a single link type (or a selection of link types). Note that the view only draws out a certain distance (in number of link traversals) from the pivot/anchor note. Thus shifting the pivot note maybe needed to explore the full path. The a link type is used in multiple but discontinuous paths, i.e. a series of discrete networks, only note from the current network are shown.
- Map view, but note that only links starting and ending within the currently visualised container are drawn. Those originating or terminating are drawn as stubs. The map view settings, allow stop/start show/hide control over a number of useful link-related (map view only) features that can add visual noise in a busy map:
Using the Get Info:sort in triage
A useful first check is the count of used link types. The count includes 'prototypes' (internally they are links, just never shown as such) so if the document uses prototypes the real count is one lower. The link type pop-up can then be looked at to indicate if a link type is used that should not be, or a link type that is expected to be used is not shown. The list of linked notes for the selected type also shows their location ($Path) as a tooltip.
Double clicking a list item, selects that item in the text pane, though depending on the current view type the selection may not be on screen. Plus the view may be hoisted to root on the container of the clicked note, so check the view for a bread crumb bar and re-scope the view if needed/desirable. As a Browse Links only shows outbound links, the link being triaged may start elsewhere.
By opening the Roadmap for the current note, tearing it off, and setting it to track current focus, looking at the dialog's link types of each of the listed inbound links (left column), the source note can likely be identified. Double-clicking that item in the Roadmaps' inbound (left) column now focuses the text pane on the link's source note and allowing a correctly focussed Browse Links to be opened.
A misnamed link type can be renamed in the Links Inspector: that updates the name/label of all notes using that link type. But if merging two link types, for instance where two different names have the same intent, one type will need its links updated. Action code (see below) can be used, especially if there are hundreds of such links.
Removing all links of a given type does not delete that link type, but should cause it to cease being detected by the Get Info:paths dialog. To remove a link type completely, it must be deleted using the Links Inspector. Be aware that deleting a link type also deletes all existing links using that link type, so consider this before such deletion.
Hyperbolic and Map views can help give visual feedback as to the progress of link triage. But be mindful of view scope for Map view and disconnected networks in Hyperbolic view and ensure views are properly updated. If in doubt, refresh the view by clicking the current tab's label about the view/text panes.
Considerations if using action code for link triage
To change all links of type 'a' to type 'b', by whatever means locate all note with outbound links of type 'a'. Then for each note in the list, use eachLink() and iterate through the note's links. Where a type of 'a' is found, set it as 'b'. Note this approach, as described will change all type 'a' links to 'b'. In some cases that may change more links than intended. This approach, in a large/complex document, is best tested first for a copy, and some 'manual' visual inspection of links, via the methods above, is warranted to look for missed-out links or incorrectly edited links (i.e. unwanted/unintended changes of type).
Legacy note: historically, before v9.1.0, it was not possible to amend a link's type this work required deleting and remaking the link which again offered scope for expected effects, not least if link actions are involved.
See also—notes linking to here: