emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Patch: More options for ignoring scheduled items in agenda tod


From: Paul Sexton
Subject: [Orgmode] Patch: More options for ignoring scheduled items in agenda todo lists
Date: Thu, 13 Jan 2011 22:46:14 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

In agenda todo lists, currently it is possible to ignore scheduled
items according to when they are scheduled, using the variable
'org-agenda-todo-ignore-scheduled'. This can take one of three
values - all, future (ignore if scheduled after today), or past 
(ignore if scheduled TODAY or in the past).

My definition of 'the past' does not include 'today'.
In light of that, the following is a patch that makes the variable 
accept 2 more values:
- notpast: ignore if scheduled today or in the future
- notfuture: ignore if scheduled today or in the past
  (this is the current behaviour of the 'past' setting)
- past: changed to ignore if scheduled BEFORE today, but no 
  longer ignores items scheduled today.

Paul




--- D:/paul/dotemacs/site-lisp/org/lisp/org-agenda.el   Mon Dec 13 07:57:31 2010
+++ D:/paul/dotemacs/site-lisp/org/lisp/org-agenda_p.el Fri Jan 14 11:32:23 2011
@@ -598,12 +598,18 @@
 This applies when creating the global todo list.
 Valid values are:
 
-past     Don't show entries scheduled today or in the past.
+past     Don't show entries scheduled in the past.
 
 future   Don't show entries scheduled in the future.
          The idea behind this is that by scheduling it, you don't want to
          think about it until the scheduled date.
 
+notpast  Don't show entries scheduled today or in the
+         future.
+
+notfuture  Don't show entries scheduled today or in the
+           past.
+
 all      Don't show any scheduled entries in the global todo list.
          The idea behind this is that by scheduling it, you have already
          \"taken care\" of this item.
@@ -4512,8 +4518,12 @@
               (cond
                ((eq org-agenda-todo-ignore-scheduled 'future)
                 (> (org-days-to-time (match-string 1)) 0))
-               ((eq org-agenda-todo-ignore-scheduled 'past)
+               ((eq org-agenda-todo-ignore-scheduled 'past) ; before today
+                (< (org-days-to-time (match-string 1)) 0))
+               ((eq org-agenda-todo-ignore-scheduled 'notfuture)
                 (<= (org-days-to-time (match-string 1)) 0))
+               ((eq org-agenda-todo-ignore-scheduled 'notpast)
+                (>= (org-days-to-time (match-string 1)) 0))
                (t)))
          (and org-agenda-todo-ignore-deadlines
               (re-search-forward org-deadline-time-regexp end t)





reply via email to

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