Hello,
perhaps I am doing something wrong… But I don’t know how to do internal links in one org-roam document. According to https://orgmode.org/manual/Internal-Links.html and as far as I understand:
I set “#+name: fig:new-image” for one image.
I create the link “[[fig:new-image]]”
When I click on the link, instead of moving to the image location inside the file, the “org-roam-capture” function is called.
I can confirm this behaviour. Internal links to named locations, e.g. figures, tables, source code blocks with #+name: header, do not work. It is a bug. Please check if it has already been reported. Otherwise you can report it yourself.
I wonder if a better solution is to somehow wrap orgs default handling of them? e.g. On a fuzzy link first let org check if there is an appropriate target (a #+name or a radio target etc.), if there isn’t a valid org link target org roam handles the link.
You could then maybe have an option with three settings
Only have org handle fuzzy links
Only have org roam handle fuzzy links
Have org search for targets, then org roam search for targets
I haven’t dug into the internals of how org handles fuzzy links so I’m not sure how feasible this is
From my preliminary investigation it’s not easy to wrap the behaviour of Org here. Org calls hooks in org-open-link-functions early with the string path, instead of the full link. Without knowing the type of the link (radio, fuzzy etc.) I cannot replicate Org’s behaviour.