emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Fix org-agenda-skip-if bug


From: Toby Cubitt
Subject: [O] [PATCH] Fix org-agenda-skip-if bug
Date: Sun, 12 Feb 2012 22:06:39 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

There appears to be a bug in how org-agenda-skip-if parses the list of
CONDITIONS supplied to it.

The combination '(nottodo todo) is a valid condition, matching todo items
whose state isn't a todo-type keyword (according to the keyword types
defined in `org-todo-keywords'). But `org-agenda-skip-if' tests first for
conditions of the form '(todo x) using (memq 'todo conditions), which
mistakenly picks up '(nottodo todo) as well.

Simply reversing the order of the memq tests for 'todo and 'nottodo fixes
this particular case, which is what the attached patch does.


Note that there's still a slightly different issue with combinations of
multiple todo tests, which this patch does not fix. The docstring
suggests that CONDITIONS is allowed to be a list of multiple
tests. E.g. '(nottodo CANCELLED todo done) should match any done state
except CANCELLED. But, faced with this combination,
`organ-agenda-skip-if' will only apply the first '(nottodo CANCELLED)
test, and ignores the second.

However, it's not clear to me whether this is a problem with the code or
the docstring. Perhaps it was never intended to support combinations of
multiple todo tests.

Toby
-- 
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: address@hidden
web:   www.dr-qubit.org

Attachment: 0001-Agenda-Fix-bug-that-broke-nottodo-todo-skip-conditio.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]