emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Patch: More options for ignoring scheduled items in agenda todo lists
@ 2011-01-13 22:46 Paul Sexton
  2011-01-14 12:52 ` Matt Lundin
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Sexton @ 2011-01-13 22:46 UTC (permalink / raw)
  To: emacs-orgmode

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-26 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 22:46 Patch: More options for ignoring scheduled items in agenda todo lists Paul Sexton
2011-01-14 12:52 ` Matt Lundin
     [not found]   ` <4D30E811.4090508@xnet.co.nz>
2011-01-15 14:26     ` Matt Lundin
2011-01-17 20:51       ` [PATCH] Add new option for ignoring past or future items in the global todo list Matt Lundin
2011-01-18  0:46         ` Paul Sexton
2011-01-26 10:00         ` [Accepted] " Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).