Template with ROAM_REFS property (v2)

In my v1 config I had this template for stuff I’d read:

("r" "reading"
 plain #'org-roam-capture--get-point
 "%?"
 :file-name "%<%Y%m%d%H%M%S>-${slug}"
 :head "#+title: ${title}\n#+roam_tags: %^{Tags}\n#+roam_key: %^{Key}\n\n"
 :unnarrowed t)

AFAIU the setting #+roam_key has been replaced by the property :ROAM_REFS:. How do I go about setting that property in a capture template?

Can you be a bit more specific in describing your challenge?

I just did this based on the default capture template.
I needed to manually enter a key (“key” in this example).
Is this what you are after?
I don’t use this feature so I feel that I’m not on the mark.

(setq org-roam-capture-templates
      '(("d" "default" plain "%?" :if-new
         (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
                    ":properties:
:roam_refs: %^{Key}
:end:
#+title: ${title}
")
         :unnarrowed t)))

2 Likes

Ah, I didn’t actually try that. I was thinking that I need to use the function org-roam-ref-add in order to not interfere with the adding of the id property. As you’ve shown that’s not the case at all! Thanks!

1 Like