Roam-ref protocol and finding files?

The user manual says:

15.3 The roam-ref protocol

This protocol finds or creates a new note with a given roam_key (see Files):

So I assumed, that when I use my bookmarklet to create a reference note then on the first use I create a new note. If later I use the bookmarklet again on the same URL then I expected roam-ref protocol to open the already existing note. Instead it captures a new note. If I would finish to create the new note the result wourld be:

Error (org-roam): Duplicate ref...

What am I doning wrong?

Looking at org-roam-protocol-open-ref, it does not look to be able to open a file when ref already exists. I could be wrong, but the documentation might need updating (or the function).

I just posted an issue on github. There is a function org-roam--find-ref in org-roam.el that looks like it was designed to see if a ref exists and open it, but this function is referenced nowhere in the source tree.
I consider this a bug, especially because capturing the same ref multiple times would lead to the duplicate ref warning.

1 Like

Alternatively, you might like to try this Firefox browser extension. Early stage; there is also a channel in Org-roam Slack.

1 Like