I have just installed Hook and am trying to use it for the first time. My goal is to use it with Roam from RoamResearch, so that I can create a link to various things around my computer from within Roam. I’d also like to create Hook links to individual Evernote notes, and to individual notes within Eastgate Tinderbox. When I try to invoke a file with a Hook link from within Roam via an external link reference in Roam, my browser displays this error message: " hook ’s server IP address could not be found." I’d be grateful if someone could suggest what I might be doing wrong please. Thanks, JR
Welcome to the Hook Productivity Forum, @jasonromney.
could you provide a screenshot and/or a webpage URL of an external link reference causing issues in Roam?
your browser should have no knowledge of https://hookproductivity.com unless you happen to be accessing https://hookproductivity.com in it. To make the example simpler, could you please provide one where the same type of situation occurs with some other website, e.g., creating an external link referring to a Wikipedia page?
I’ve tried Hook in Roam research several times. One thing I notice is that they use
# followed by path information. such as
<username> is a username (no angle brackets).
# is a reserved character in RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax. In the RFC, it’s supposed to introduce a fragment. My reading is that the content after the # should be on the same page. But in their case it’s not.
I doubt this is related to the issue you’re seeing, but thought I would mention it.
(I’ve edited my prior entry and will revisit RFC 3986 later.)
Oh, it just occurred to me that you are likely trying to reference a
hook://file// that is in the RoamResearch page. Different web browsers might treat this link differently.
Typically to associate a link to a web page one would use Link to Copied Address – Hook, like this
- put a link to the target in the clipboard (e.g., a markdown link, or one got through “Link to Copied Address”)
- invoke Hook on the page.
- “Link to Copied Address”
next time you invoke Hook on the webpage you’ll see the link.
This is where you may encounter the issue I mentioned above with RoamResearch. Because Roam research is treating
# as nodes in a path, Hook will assume all URLs following the “fragment” are on the same page. That means when you invoke Hook on what are in fact different pages, you will see the same links (aggregating).
Here’s a help page:
I just did some further investigation with Roamresearch and found they convert all app links (e.g.,
omnifocus:// links) : they translate the scheme (e.g.,
OmniFocus://) to a domain (e.g.,
Normally, a way to work-around websites that change links is to escape the URL with ticks (```). In a Discourse forum post for instance, if you paste a markdown link to a local doc it will be translated; to get around that, you can escape the markdown link, so that later you can at least copy the URL from the web page and paste and paste it in Spotlight, a launcher, and soon in Hook itself (so as to access the resource it references). However, I notice on the Roam site this (escaping of URLs) currently leads to text that is not selectable.
I’ve now mentioned the 3 topics to them. and they’ve already responded to one.
It may be best to follow up directly with them . They are very responsive, and very much into links, so I would expect this to get sorted out. When the dust settles, I’ll update this post.
In any event, the tick solution may be helpful to this forum’s readers beyond Roam. And it’s helpful to keep fragment usage in mind for Single-page applications ( Wikipedia link). We could conceivably provide ways in future for Hook to not treat
# as fragments, e.g., if the
# symbol is embedded in a URL in a manner that suggests it does not actually represent a prefix to a fragment, i.e., that it’s just part of the path of the URL.
Of course, links to web pages obtained via Hook (or other means) can already be used in RoamResearch.
Topic name. To make it easier for future readers to find/use this information, I’ve renamed this forum topic to Invoking a Hook link in the context of roamresearch website. I recommend other questions about Hook (in different contexts) be in a new or other topic.
Thanks LucB. I’m using a workaround which does the job but may seem over-engineered to connoisseurs. I’d welcome any improvements you can suggest.
- create a link in Hook for a local file or destination within an OSX app (eg an Evernote note, a Tinderbox note, a Scrivener entry, Devonthink file etc)
- copy that link into an Evernote note
- startup a Web-based session of Evernote
- copy the Web URL of the Evernote note that has the Hook link pasted into it
- paste the Web URL of that Evernote note into the desired position in the Roam note
Now, shift clicking the Roam note will invoke a new browser window with the Evernote note displayed.
Clicking the link in the Evernote note will ask if you want to open the corresponding Hook link.
Clicking the Hook link will open the relevant OSX-based app and the particular piece of destination data sought.
I concede this is cumbersome - but it does the job as a workaround.
It does not, incidentally, work for something as simple as a picture of a research article in the Apple Photos app. But although a captured image in Photos (eg a photo of a page in a book) can’t be referenced directly from within Photos, it can be exported to, say, Devonthink, given an OCR treatment to make the text in the image searchable, then its position in Devonthink copied as a Hook Link, pasted into the Evernote Web version, and the URL of that note in Evernote on the Web can be pasted into Roam. Somewhat manual and hardwork but not too bad.
The result is that Roam notes can invoke, say, a scanned research article, through a shift click opening. One twist on this, however, is for users of Parallels where Evernote is installed in both the OSX parent OS and also in the Windows instance in the Parallels VM. In this circumstance one must remember to never opt in the dialogue box that is presented, to open Evernote itself (only the hook link), because otherwise Evernote is opened in both OSX and also, unfortunately, Evernote in, say, a Parallels Windows 10 VM, which is usually not desired. I have not been able to work out yet how to prevent this dual invocation in both Windows and OSX as the Parallels system for determining which operating system a file will be opened in does not seem aware of Hook’s intra-app naming conventions. Cheers, JR
I’ve tested that (currently at least) if you paste a local link (e.g.,
hook://) into roam, not as part of a markdown link, the link is selectable. So you could copy/paste it into Spotlight or a launcher. That will save you the long series of steps.
If the link is taken from Hook, however, currently Roam takes the label rather than the URL. So if you get the link from Hook ( “Copy Link”), you should run it through something like PlainClip.
I think Roam will deal with the markdown link domain-to-scheme conversion issue above promptly. So this should be a moot issue.
Again, using the Hook window for linking avoids the issues of app links in web pages. From the browser, you can invoke Hook , and issue “Link to Copied Address” with any address in your clipboard.