summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-03-16 19:18:41 +0100
committerBastien Guerry <bzg@altern.org>2012-03-16 19:18:41 +0100
commit8e7f84ea3d021c3513a9fce9b275c2f93fa95f2d (patch)
tree69ce4a39ef63b8472ee1bd806f7702982969a7b8
parentced72ea5d8e3d6b57376bdbd5506be2857627b46 (diff)
downloadorg-mode-8e7f84ea3d021c3513a9fce9b275c2f93fa95f2d.tar.gz
org-agenda.el: Fix the order conditions are being checked.
* org-agenda.el (org-agenda-skip-if): Fix the order conditions are being checked. Also enhance the docstring a bit. TINYCHANGE Thanks to Toby Cubitt for a patch to this effect.
-rw-r--r--lisp/org-agenda.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f2b8fc2..1457356 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4219,7 +4219,7 @@ See `org-agenda-skip-if' for details."
(defun org-agenda-skip-if (subtree conditions)
"Checks current entity for CONDITIONS.
If SUBTREE is non-nil, the entire subtree is checked. Otherwise, only
-the entry, i.e. the text before the next heading is checked.
+the entry (i.e. the text before the next heading) is checked.
CONDITIONS is a list of symbols, boolean OR is used to combine the results
from different tests. Valid conditions are:
@@ -4245,12 +4245,12 @@ keywords, which may include \"*\" to match any todo keyword.
would skip all entries with \"TODO\" or \"WAITING\" keywords.
-Instead of a list a keyword class may be given
+Instead of a list, a keyword class may be given. For example:
(org-agenda-skip-entry-if 'nottodo 'done)
would skip entries that haven't been marked with any of \"DONE\"
-keywords. Possible classes are: `todo', `done', `any'.
+keywords. Possible classes are: `todo', `done', `any'.
If any of these conditions is met, this function returns the end point of
the entity, causing the search to continue from there. This is a function
@@ -4283,8 +4283,8 @@ that can be put into `org-agenda-skip-function' for the duration of a command."
(stringp (nth 1 m))
(not (re-search-forward (nth 1 m) end t)))
(and (or
- (setq m (memq 'todo conditions))
- (setq m (memq 'nottodo conditions)))
+ (setq m (memq 'nottodo conditions))
+ (setq m (memq 'todo conditions)))
(org-agenda-skip-if-todo m end)))
end)))