Hi Orgsters,
I'm working on a package that I'd like to be able to integrate with
org-capture. I have some structured data (a description, a time,
possibly a URL...) and want to call org-capture from a hook to allow
the user to record this data in Org. I want the user to be able to
provide their own capture template to control the formatting, target
location, etc.
I have two questions about this:
1. What's the right way to call `org-capture' in this case? Should I
ask the user to define a template in their `org-capture-templates'
and then have a defcustom to store the keys which identify that
template, so I can say (org-capture nil KEYS)? Or is there some
other way I should call into the capture machinery where I identify
the template directly...?
2. I gather I should use `org-capture-put' to store my data in
`org-capture-plist' immediately before(?) calling org-capture. Is
there any calling convention I need to respect here? :default-time,
:initial and :annotation seem like the relevant properties for me,
but do I need e.g. to clear the value of `org-capture-plist' first,
or always include certain other properties?
Thanks in advance!
Best,
Richard