emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a post-capture hook know which capture template I used?


From: Hanno Perrey
Subject: Re: Can a post-capture hook know which capture template I used?
Date: Wed, 12 Apr 2023 07:29:29 +0200

Marcin Borkowski <mbork@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]