r/orgmode•
squiter

Can I create a custom org-capture with more than one buffer?

question

I have a template for my 1:1 meetings where I have recurrent questions that I want to ask follow-upmy peers and stuff like that. But when I starting a new 1:1 meeting, I also search for the last meeting that I had with this peer to check if I need to do a follow up question or somthing like this.

So I'm thinking if I can trigger the org-capture command and automatically split the capture buffer with the result of a search in org-agenda. Do you folks know how can I acomplish that?

Posted Nov 4, 2020, 10:12 PM UTC

23
nv-elisp•

You could add a hook to execute whatever set up you want once the template is selected. Note I'm using doct's syntax here: e.g.

(progn
  (require 'doct)
  (let ((org-capture-templates
         (doct `("meeting" :keys "m"
                 :file ,(expand-file-name "meeting-test.org" temporary-file-directory)
                 :hook (lambda () (org-agenda nil "s"))
                 :template ("* Meeting notes" "%?")))))
    (org-capture nil "m")))
3
monotux•

Never heard of doct, seems like a very handy thing!

2
squiterOP•

This hook idea is exactly what I’m looking for! And I didn’t know the doct package as well! Thank you!

2