On Mon, 26 Oct 2020 at 22:33, Michael Heerdegen <michael_heerde...@web.de> wrote:
> I'm not sure. I see that creating an id involves slightly more than > adding the property - see the `org-id-add-location' call in > `org-id-get'. Calling the higher level `org-id-get' or the like in a > %() spec in a template fails however, since when it's called a temp > buffer not associated with a file is current. > > And then I'm also not sure if the above is always secure when something > else in the template spec wants to add a (different) property. Do you > know? Not really. `org-id' usually "just works" for me, so I never had to dig anything deeper there. But, as far as I recall, this is meant to add the new ID on the IDs file. Considering your capture template is likely to be on your agenda files, this is probably not going to be of concern (meaning here these files will eventually be scanned and the ID found). But, if it is, you could then go with `%(org-id-get nil t)`, right? It does seem to be more appropriate either way, I agree. I have stored here in my init file a message from the list describing the procedure Org uses to try to find an ID, you might find it useful: https://lists.gnu.org/archive/html/emacs-orgmode/2009-11/msg01195.html Regarding the second issue, of course, you should end up with a single properties drawer, and the template should ensure that. Best, Gustavo.