emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-capture: question about function to create template


From: No Wayman
Subject: Re: org-capture: question about function to create template
Date: Mon, 15 Mar 2021 12:57:15 -0400
User-agent: mu4e 1.5.9; emacs 28.0.50


From: Joost Kremers <joostkremers@fastmail.fm>
To: emacs-orgmode@gnu.org
Subject: org-capture: question about function to create template
Message-ID: <87eeggh0r5.fsf@fastmail.fm>
Content-Type: text/plain

Hi list,

I've been looking at the =org-capture= mechanism a bit more closely recently and noticed that in =org-capture-templates=, the template can also be a function. This looks like a potentially useful feature, but I was wondering if there's any way for this function to access the state of the ongoing capture process.

The metadata for the template is stored in the `org-capture-plist' variable.


Specifically, it would be useful for me if the function can find out the key of
the template that the user selected.

This is stored on the above plist as :key.

There are some corner cases to consider if you have overlapping capture processes. You'll want to look into `org-capture-get' and `org-capture-current-plist' as well.

Depending on your needs you may find DOCT useful:

https://www.github.com/progfolio/doct






reply via email to

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