Marcin Borkowski <mb...@mbork.pl> skrev: (12 april 2023 05:46:07 CEST) >Hi all, > >I'd like to perform some actions after a successful capture. I know >about `org-capture-.*-finalize-hook's, and I think >`org-capture-after-finalize-hook' is the one I need, but I need to >decide what action to take depending on the capture template used. How >can I access it? > >TIA, > >-- >Marcin Borkowski >http://mbork.pl >
Hej Marcin, you can call `(plist-get org-capture-plist :key)' to get the template key that was used. For an example with `org-capture-before-finalize-hook', see https://gitlab.com/hperrey/khalel/-/blob/master/khalel.el#L502 Hope that helps! Best wishes, Hanno