emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Paul Sexton <psexton@xnet.co.nz>
To: emacs-orgmode@gnu.org
Subject: Patch: More options for ignoring scheduled items in agenda todo lists
Date: Thu, 13 Jan 2011 22:46:14 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110113T233820-296@post.gmane.org> (raw)

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	other threads:[~2011-01-13 22:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 22:46 Paul Sexton [this message]
2011-01-14 12:52 ` Patch: More options for ignoring scheduled items in agenda todo lists 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20110113T233820-296@post.gmane.org \
    --to=psexton@xnet.co.nz \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).