Bug in "make hook file" function or inconsistency in the URI


I would like to report a bug or inconsistency in the URI.

I created a hook file from the Devonthink 3’s item. When I clicked on the created hook file in Finder, I expected that Devonthink 3 Application would open and navigate to my item; but that did not happen.

The content of the hook file is as follows (ID replaced with “x”):


I noticed that there are only two forward slashes in the URI. If I edit the URI to that of triple slash:


then the hook file works. The triple slash is what been described in make-hook-file documentation

Furthermore, the URI is inconsistent for the “copy markdown link” function. When using the “copy markdown link”, the string created in the pasteboard is:

[devonthink item](x-devonthink-item://xxxx-xxx-xxx-xxx-xxx)

This link works in a markdown document (.md); however, it does not work in a hook file (.hook). Notice the double slashes in the URI. If we change the URI to triple slashes, the hook file will open the item in Devonthink 3 App.

I am not sure how this thing works, but my feeling is the Hook App should work with a double slash URI because Devonthink3 will produce a link with a double slash when we use the “Copy Item Link” from the Devonthink 3 context drop-down (see image).


@LucB, I haven’t heard from you. Any comment on this?

Thanks for asking, @tangapollo . Sorry for the delay in responding.

I could not replicate this with DEVONthink 3.8.3. I tried with a couple of item types (.txt and group) . What version of Hook are you using?

Above you said “I noticed that there are only two forward slashes in the URI.” and what you have shown us has two // . So how is it inconsistent?

Both Hook and DEVONthink should be able to cope with either 2 or 3 forward slashes.

Hi @LucB, Thank you for your response

My hook version is: 3.7.1 (4869; Integration v. 227)
Devonthink 3 is version 3.8.5
OSX Monterey 12.4

Sorry, I must have been confusing in my description. The inconsistency I said is not how many slashes in URI that hook generates. The inconsistency I meant is how Hook handles URI vs how markdown link handles URI: double slash work for markdown link but does not work for hook file.

As you said:

This is not the case for my Hook installation – double slash does not work in the hook file; for the URI to work in the hook file it must be written with a triple slash format.

Markdown links, however, work with both double or triple slashes.