Org-store-link changed behavior, stopped storing org-roam links

Hello!

I have had the following line in the org-roam section of my config for years:

(global-set-key (kbd "C-c n l") #'org-store-link)

When called under a (sub)headline with no properties drawer, it has always created one, and given it an ID. Now it doesn’t. Moreover, when I then call org-insert-link, it now creates a non-org-roam link, like this:

[[*see I'm Still Here][see I'm Still Here]]

What happened? I rely a lot on the prior functionality. Can it be recovered?

I think it’s this:

Indeed it was. I guess i’ll have to hand-roll a function that creates an org-roam link without inserting a properties drawer under it, because it appears the two options in standard org-roam are a non org-roam link with no properties, or an org-roam link with properties.

I don’t understand what all of this means, but let me just say one thing just in case you haven’t seen it. org-id-link-to-org-use-id has options other than t and nil.

One of the following may be what you need.

create-if-interactive
      If ‘org-store-link’ is called directly (interactively, as a user
      command), do create an ID to support the link.  But when doing the
      job for capture, only use the ID if it already exists.  The
      purpose of this setting is to avoid proliferation of unwanted
      IDs, just because you happen to be in an Org file when you
      call ‘org-capture’ that automatically and preemptively creates a
      link.  If you do want to get an ID link in a capture template to
      an entry not having an ID, create it first by explicitly creating
      a link to it, using ‘M-x org-store-link’ first.

create-if-interactive-and-no-custom-id
      Like create-if-interactive, but do not create an ID if there is
      a CUSTOM_ID property defined in the entry.

use-existing
      Use existing ID, do not create one

Aha! That seems to have really done the trick – 'use-existing is what I wanted. Thanks yet again, @nobiot!

1 Like