summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2010-03-24 13:13:53 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2010-03-24 13:13:53 +0100
commitc084541efa3321a71b75c164e4006795f1eb9650 (patch)
tree93c0faef4dedf73a5a114c9ad5c4eed70ac379d2
parent42589b32c217637da9c20e1481e3911a27f9eb83 (diff)
downloadorg-mode-c084541efa3321a71b75c164e4006795f1eb9650.tar.gz
Add more options to `org-agenda-todo-ignore-with-deadline'
Patch by Lukasz Stelmach.
-rwxr-xr-xlisp/ChangeLog5
-rw-r--r--lisp/org-agenda.el16
2 files changed, 19 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4f2d6e5..8bd3c7f 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2010-03-24 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-agenda.el (org-agenda-todo-ignore-deadlines): Document `past'
+ and `future' values.
+ (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
+ Handle `past' and `future' values.
+
* org.el (org-read-agenda-file-list): Interpret file names
relative to org-directory and allow environment variables and
"~".
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0e0c9c2..6e22fb4 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -587,6 +587,8 @@ to make his option also apply to the tags-todo list."
(defcustom org-agenda-todo-ignore-deadlines nil
"Non-nil means ignore some deadlined TODO items when making TODO list.
+There are different motivations for using different values, please think
+carefully when configuring this variable.
This applie when creating the global todo list.
Valid values are:
@@ -595,8 +597,14 @@ near Don't show near deadline entries. A deadline is near when it is
closer than `org-deadline-warning-days' days. The idea behind this
is that such items will appear in the agenda anyway.
-far Don't show far deadline entries. This is useful if you don't want
- to use the todo list to figure out what to do now.
+far Don't show TODO entries where a deadline has been defined, but
+ the deadline is not near. This is useful if you don't want to
+ use the todo list to figure out what to do now.
+
+past Don't show entries with a deadline timestamp for today or in the past.
+
+future Don't show entries with a deadline timestamp in the future, not even
+ when they become `near' ones. Use it with caution.
all Ignore all TODO entries that do have a deadline.
@@ -4258,6 +4266,10 @@ the documentation of `org-diary'."
((memq org-agenda-todo-ignore-deadlines '(t all)) t)
((eq org-agenda-todo-ignore-deadlines 'far)
(not (org-deadline-close (match-string 1))))
+ ((eq org-agenda-todo-ignore-deadlines 'future)
+ (> (org-days-to-time (match-string 1)) 0))
+ ((eq org-agenda-todo-ignore-deadlines 'past)
+ (<= (org-days-to-time (match-string 1)) 0))
(t (org-deadline-close (match-string 1)))))))))
(defconst org-agenda-no-heading-message