Update hyperlinks when the source note's title changes?

Is there a way to automatically update a hyperlink across multiple notes when I change the title of the note to which they are linked?

Scenario: I have a note that focuses on a concept such as “water” and when I add text to it I cite the source using a ziplink to a citation note titled “Hart 2016.” Later, I realize I misspelled his name and want to update the citation note’s title to “Heart 2016” but now all the links I’ve made to this citation note are incorrect. I realize they still work, but they do not read correctly.

I know this seems like a small problem, but it’s just the easiest example I could think of. I’ve had other issues with this, especially when I try to use a more Zettle/evergreen notetaking approach to cultivating a knowledge database. Often I realize I need to split a concept note into two but I can’t change the name of the original note because all of the text links I’ve made elsewhere won’t necessarily make sense anymore if I come across them later from a different pathway.

It’s actually the one thing about Notion, Roam and Obsidian that I find attractive - how the hyperlinks to a note will automatically update to reflect changes to the title of the note. I realize my lack of computer coding knowledge means I may be asking for something that is not doable, but thought I’d ask in case there is an automation or action I could use as a work around in TBX.

Is there a way to update all the links other than manually one by one? Thanks!

It is worth noting that (text) links that use the target note’s name s anchor text is just one way to use text links, albeit made easier via the ‘ziplinks’ method of text-link creation. Tinderbox links have always unidirectional and anchor text of text links is not accessible via action code automation. I mention this because it may help explain why the feature you intuit doesn’t exist.

I tried using $Text.replace() with a stamp like this:

$Text=$Text.replace("Hart 2016","Heart 2016");

Although this does correct the anchor text, the link anchor now omits the ‘6’ as the new string is 1 character longer than the original, indicating the text anchor length data was not updated.

I don’t know if AppleScript might provide a workaround (at a conference so no time free for such a test).

I do suggest you raise a feature request with tech support (info@eastgate.com) explaining your use case as I don’t believe there is a method you’ve overlooked. even if I can’t give the outcome you desire, I hope Ii’ve been able to explain why. :slight_smile:

1 Like

FWIW, regardless of the text of a note’s anchor, I do think it would be useful to be able to automatically edit/alter said text from the target note context, for the same reason as above—when subsequently splitting/merging notes in a mature document.

1 Like

I followed your recommendation and sent in a feature request. Thanks for your quick reply!

1 Like

Did this get included at some point?

I believe it did. I very rarely (expect testing for others) use text link anchors that are the target note name so i’m unsure as to the detail. Easiest thing is to make such a link, change the target’s name and see if the link source’s anchor text is updated.

To wrap it up here and save somebody else 1 minute:
Yes – it works.

1 Like

Thanks for the confirm. I’ve also now remembered that background here. See Update after renaming. This option arrived in v8.9.0 and is ‘on’ by default.

When on, edits to a note name cause anchor text of inbound text links that use (old) the note title to be updated to reflect the new title.

So, by default, it ‘just works’. It can be turned off if needs be. For instance, IIRC, I have it off in the master TBX for aTbref as it has a lot of links and as few use target note name as the link anchor text the scanning is just an unneeded overhead. By comparison, if one is using the wiki model where anchor test == target page name then this automation is a boon.