When does the target lose its linked association?

On your web page detailing the benefits of Hook, you state, “unlike web links, if the target moves, the link generally still works”.

The word ‘generally’ seems to imply that there are some circumstances where the link will not ‘follow’ the target and will thus lose its linked association. What are those circumstances?

Thanks.

Welcome to the Hook Productivity Forum, @av2, and thanks for asking.

The general issue is that in order to provide robust URLs, their semantics become complex and the line between functionality and implementation is blurred. When is a file the same file? The user’s perspective (tacit as it is) and the implementation may differ in some cases.

As a starting point, Hook attempts to match the robustness of aliases, which are rather complex structures and rather robust. Aliases themselves are not super well documented by Apple. (Aliases – The Eclectic Light Company is a good source). At first brush, one might want to criticize Apple for that. But when one digs into aliases one realizes that the line between user functionality and implementation is grey. And this applies to hook://file links.

Here’s the most salient case: Sometimes when you use an app’s rename function, it will actually create a new file, and that will break the alias, and it can break the hook://file -based link too. One can argue, “well, the alias didn’t really break, because the app created a new file.” But the user who does not understand or otherwise expect this, will get the impression the alias has failed.

In some cases where aliases break, hook://URLs may also break. However, Hook contains a collection of heuristics that go beyond the (again, largely undocumented) algorithms and heuristics/rules used by aliases. For example, suppose a hook://file link points to a folder in version control system that you’ve checked-out somewhere. You then delete the entire folder and do a checkout somewhere else. If you later click on the link, Hook will try to re-anchor it based on context / various heuristics.

Similarly, you can actually send someone a hook://file URL that points to file e.g. that has been checked out from a version control system, or that is in a well known location, and when the user uses the URL, Hook will attempt to reveal it in Finder. (Aside: Sharing links to files and emails is super handy. It saves the sender a lot of time (explaining where the file is), and it obviously saves the recipient look up time.)

There should be some info about this in the online documentation, which grows gradually; and we will continue to extend the documentation.

I’ll take an action to link that reference to a particular web page, and possibly this post.

Aside: I’m currently prepping the imminent release of Hook 1.6, and getting very excited about Hook 1.7 :wink: