Eric Thomas <e...@ericthomas.net> writes: > Does anyone know how to approach creating dynamic Org-capture > templates? I'm looking for IDO/Helm type of completion after a > template has been selected. If string does not exist, it is created > and added to future completions, similar to new files in emacs. > > Example: > > C-c c > "a" (activity) > Activity: math (<--need completion here) > Topic: multiplication (<--need completion here) > Date: 2017-09-11 (<--need default to todays date) > Start time: 07:00 AM (<--need to define AM/PM easily) > Duration: 20 (<--easier way to capture time?) > Unit: mins > > And > > C-c c > "a" (activity) > Activity: physical education (<--again, completion starts as "ph.." is typed) > Type: Yoga (<--completion) > Class: Level 2 flow (<--completion) > Date: 2017-09-11 (<--date picker of some kind) > Start time: 07:00 AM (<--define AM/PM easily) > Duration: 90 (<--easy method for capturing time) > Unit: mins > > > Maybe Org-capture templates are not the correct way to approach this? > Any direction is appreciated. >From doc string for `org-capture-templates`: %^{prompt} Prompt the user for a string and replace this sequence with it. A default value and a completion table ca be specified like this: %^{prompt|default|completion2|completion3|...}.
I think to get completion you would need to dynamically build the value for `org-capture-templates` which would include the completion candidates for reach field. I think that's not a great way to do it. Someone else can suggest a better way, I think. -- Narendra Joshi