From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Sexton Subject: Patch: More options for ignoring scheduled items in agenda todo lists Date: Thu, 13 Jan 2011 22:46:14 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=44249 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdVw6-0001pD-T3 for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 17:46:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdVw5-0000Ih-Qi for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 17:46:30 -0500 Received: from lo.gmane.org ([80.91.229.12]:57248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdVw5-0000Ia-HD for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 17:46:29 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PdVw4-00059j-Qy for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 23:46:28 +0100 Received: from rp.young.med.auckland.ac.nz ([130.216.140.20]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Jan 2011 23:46:28 +0100 Received: from psexton by rp.young.med.auckland.ac.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Jan 2011 23:46:28 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.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)