Hello,
When creating various org-capture template files (to be used as (file /path/to/template-file)
in org-roam-capture-templates
), the need to include properties came up, along with the need to refer to the previous prompts in the template.
In ordinary org-caputre-templates
, these issues do not exist (insert the property drawer inside the file itself, and use %\N
to refer to the Nth prompt in the capture template).
In org-roam-capture-templates however, as described over here, always creates the ID (and inserts it into the property drawer – creating it if needed) before expanding and inserting the capture template file – resulting in 2 property drawers overall.
There is the option to parse the template file to include its property drawer in the header (file+head
:target
option) – which seems to be inserted before the property drawer is inserted – causing the ID property to be placed in the correct drawer. But then the other issue occurs – from my understanding of the code, the insertion and expansion of the header is a different one from the insertion and expansion of the template file itself – as a result, they do not share prompt references (and I don’t know if there are other effects).
Another option is to delete the ID property and add it after the capture process is complete. However, I do not really like this as it seems risky, I can’t ensure other things don’t rely on it – whether it is org-roam or any 3rd party library I might want to use in the future.
Is there another way to solve both these issues (properties and prompt references in capture template files)?