* mutually exclusive tags
@ 2008-03-26 20:26 Richard G Riley
2008-03-26 20:50 ` Bernt Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Richard G Riley @ 2008-03-26 20:26 UTC (permalink / raw)
To: org-mode
Could someone show me an example of mutually exclusive tag setting in
elisp please? There is an example of non exclusive ones in the manual:
(setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop"
. ?l)))
But how to do it for
#+TAGS: { @work(w) @home(h) @tennisclub(t) } laptop(l) pc(p)
?
thanks,
r.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mutually exclusive tags
2008-03-26 20:26 mutually exclusive tags Richard G Riley
@ 2008-03-26 20:50 ` Bernt Hansen
2008-03-26 22:02 ` [PATCH] doc: Add example of the global setting for " Bernt Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2008-03-26 20:50 UTC (permalink / raw)
To: Richard G Riley; +Cc: org-mode
Richard G Riley <rileyrgdev@googlemail.com> writes:
> Could someone show me an example of mutually exclusive tag setting in
> elisp please? There is an example of non exclusive ones in the manual:
>
> (setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop"
> . ?l)))
>
> But how to do it for
>
> #+TAGS: { @work(w) @home(h) @tennisclub(t) } laptop(l) pc(p)
> ?
@work, @home, @errand are exclusive below.
admin, org, notaproject, newtask are not.
(setq org-tag-alist '((:startgroup . nil) ("@work" . ?w) ("@home" . ?h) ("@errand" . ?e) (:endgroup . nil)
("admin" . ?a) ("org" . ?o) ("notaproject" . ?n) ("newtask" . ?x)))
HTH,
Bernt
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] doc: Add example of the global setting for mutually exclusive tags
2008-03-26 20:50 ` Bernt Hansen
@ 2008-03-26 22:02 ` Bernt Hansen
0 siblings, 0 replies; 3+ messages in thread
From: Bernt Hansen @ 2008-03-26 22:02 UTC (permalink / raw)
To: emacs-orgmode
Explicitly show an example for setting org-tag-alist globally
with mutually exclusive tags for people new to lisp.
---
I had trouble with this originally and ended up digging in the org.el
code to figure out how to do this. Hopefully this makes it easier
on org-mode users :)
org.texi | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/org.texi b/org.texi
index a13b2e7..fd90b5b 100644
--- a/org.texi
+++ b/org.texi
@@ -3324,6 +3324,17 @@ and @samp{@@tennisclub} should be selected.
@noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of
these lines to activate any changes.
+@noindent
+The equivalent global setting is
+
+@lisp
+(setq org-tag-alist '((:startgroup . nil)
+ ("@@work" . ?w) ("@@home" . ?h)
+ ("@@tennisclub" . ?t)
+ (:endgroup . nil)
+ ("laptop" . ?l) ("pc" . ?p)))
+@end lisp
+
If at least one tag has a selection key, pressing @kbd{C-c C-c} will
automatically present you with a special interface, listing inherited
tags, the tags of the current headline, and a list of all valid tags
--
1.5.5.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-26 22:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 20:26 mutually exclusive tags Richard G Riley
2008-03-26 20:50 ` Bernt Hansen
2008-03-26 22:02 ` [PATCH] doc: Add example of the global setting for " Bernt Hansen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.