10.1.3.3 Templates in contexts

To control whether a capture template should be accessible from a specific context, you can customize org-capture-templates-contexts. Let’s say, for example, that you have a capture template “p” for storing Gnus emails containing patches. Then you would configure this option like this:

(setq org-capture-templates-contexts
      '(("p" ((in-mode . "message-mode")))))

You can also tell that the command key p should refer to another template. In that case, add this command key like this:

(setq org-capture-templates-contexts
      '(("p" "q" ((in-mode . "message-mode")))))

See the docstring of the variable for more information.