mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-12 05:09:56 +00:00
6c94ea0518
* org.el (org-contextualize-agenda-or-capture): Handle key replacement depending on the contexts. * org-capture.el (org-capture-templates-contexts): Allow to use the context as a way to replace one capture template by another one. * org-agenda.el (org-agenda-custom-commands-contexts): Allow to use the context as a way to replace one agenda custom command by another one. * org.texi (Templates in contexts): Document the new structure of the variables `org-agenda-custom-commands-contexts' and `org-capture-templates-contexts'. In the setup below, X is not a real capture template, it is just an alias to templates A and B in .txt and .el files. A and B are deactivated by default in all files. (setq org-capture-templates '(("X" "Nothing but an alias") ("A" "AAAA" entry (file+headline [...])) ("B" "BBBB" entry (file+headline [...])))) (setq org-capture-templates-contexts '(("A" "A" ((not-in-file . ".*"))) ("B" "B" ((not-in-file . ".*"))) ("X" "A" ((in-file . "\\.txt"))) ("X" "B" ((in-file . "\\.el"))))) Thanks to Carsten for suggesting this "key-replacement" idea! |
||
---|---|---|
.. | ||
.aspell.org.conf | ||
.nosearch | ||
dir | ||
Documentation_Standards.org | ||
Makefile | ||
org.texi | ||
orgcard.tex | ||
orgguide.texi | ||
pdflayout.sty | ||
texinfo.tex |