org-capture-templates-contexts
org-capture-templates-contexts is a variable defined in `
org-capture.el
'.
Its value is
nil
Documentation:
Alist of capture templates and valid contexts.
For example, if you have a capture template "c" and you want
this template to be accessible only from `message-mode' buffers,
use this:
'(("c" ((in-mode . "message-mode"))))
Here are the available contexts definitions:
in-file: command displayed only in matching files
in-mode: command displayed only in matching modes
not-in-file: command not displayed in matching files
not-in-mode: command not displayed in matching modes
in-buffer: command displayed only in matching buffers
not-in-buffer: command not displayed in matching buffers
[function]: a custom function taking no argument
If you define several checks, the agenda command will be
accessible if there is at least one valid check.
You can also bind a key to another agenda custom command
depending on contextual rules.
'(("c" "d" ((in-mode . "message-mode"))))
Here it means: in `message-mode buffers', use "c" as the
key for the capture template otherwise associated with "d".
(The template originally associated with "d" is not displayed
to avoid duplicates.)
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 24.3 of Emacs.