Referencing to an item in other org file

Hi all,

I have two Org mode files, and I want to create a link in file B that points to a specific item in file A. How can I achieve this?

# B.org

* Test
   - <link to item 1 in file A.org>
# A.org

* Intro
** Subsection 1
   - <<item1>> that I want to create a link to it

I can achieve this by using C-c l in file A on item 1 and C-c C-l in file B. However, the created link always uses the file: format, but I need it to use the id: format. When I use id:<doc-uuid>::item1, I get an error saying “Cannot find entry with ID …”.

id:<doc-uuid>::item1
– Appending a ::SEARCH-WORD to the ID is not supported in the biult-in Org-ID, which Org-roam leverages.

See these lines of code from Doom Emacs. They add some custom way to achieve something like this – I am not sure if this is compatible with Org-roam’s database update.

I would posit that if you need to link to an “item” in a list, you should give this item an ID. It is sufficiently important to be linked to.

The issue is that org-roam does not allow items to have ids, only headers.

So your only option is to turn this list into a sequence of subheaders (even if they have nothing inside each).