0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-12 05:09:56 +00:00
org-mode/doc
Bastien Guerry 6c94ea0518 Implement key replacement depending on the contexts.
* 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!
2012-08-24 12:17:58 +02:00
..
.aspell.org.conf Track support files useful in checking Org documentation. 2008-04-01 15:59:35 +02:00
.nosearch Add .nosearch file to the doc/ subdirectory. 2008-12-17 17:25:31 +01:00
dir Split out a number of files from org.el, and reorganize the 2008-03-28 09:57:14 +01:00
Documentation_Standards.org Fix some typos 2009-11-15 10:04:23 +01:00
Makefile Rename UTILITIES/ to utils/ 2012-08-23 12:47:10 +02:00
org.texi Implement key replacement depending on the contexts. 2012-08-24 12:17:58 +02:00
orgcard.tex Bump to version 7.8.11. 2012-05-25 09:36:15 +02:00
orgguide.texi Update the manual wrt comments. 2012-08-01 14:35:13 +02:00
pdflayout.sty doc: Fix pdflayout.sty to produce orgcard_letter.pdf correctly. 2012-03-26 22:37:59 +02:00
texinfo.tex Fix the master branch. 2012-03-19 22:01:29 +01:00