emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nathaniel Flath <flat0103@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] only display a scheduled item if it is due today or in the past
Date: Sun, 2 May 2010 10:37:24 -0700	[thread overview]
Message-ID: <o2h5e3a506e1005021037t80d87840x87cf59dd568a76f3@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 392 bytes --]

Hello,
One thing I've wanted from org-mode is the ability to have certain items
'hidden' from the agenda until the day they are scheduled - this patch
implements this for all properties who have a STYLE property of 'hidden'.
I ended up implementing this(the patch is attached), and thought I'd
contribute it to org-mode. If you have any comments, please let me know.

Thanks,
Nathaniel Flath

[-- Attachment #1.2: Type: text/html, Size: 437 bytes --]

[-- Attachment #2: org-agenda.patch --]
[-- Type: text/x-patch, Size: 568 bytes --]

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2b56cb6..c7a07c4 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4697,6 +4697,9 @@ FRACTION is what fraction of the head-warning time has passed."
 			    (and (not todayp)
 				 org-habit-show-habits-only-for-today))
 			(throw :skip nil))
+		  (if (and (string= "hidden" (org-entry-get (point) "STYLE"))
+			   (< today d2))
+		      (throw :skip nil))
 		  (if (and
 		       (or (eq t org-agenda-skip-scheduled-if-deadline-is-shown)
 			   (and org-agenda-skip-scheduled-if-deadline-is-shown

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2010-05-02 17:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-02 17:37 Nathaniel Flath [this message]
2010-05-03 14:42 ` [PATCH] only display a scheduled item if it is due today or in the past Nathan Neff
2010-05-13  5:36 ` Carsten Dominik
2010-05-22  3:51   ` Nathaniel Flath
2010-05-22  4:50     ` Matt Lundin
2010-05-22 14:09       ` Nathaniel Flath
2010-05-22 16:27         ` Matthew Lundin
2010-05-27 16:44           ` Nathan Neff
2010-06-04 11:17         ` Carsten Dominik
2010-06-04 12:51           ` Matthew Lundin
2010-06-06  4:38             ` Carsten Dominik
2010-06-23 23:55               ` Nathan Neff
2010-06-26  7:00                 ` Livin Stephen Sharma
2010-06-28  3:18                   ` Nathan Neff

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=o2h5e3a506e1005021037t80d87840x87cf59dd568a76f3@mail.gmail.com \
    --to=flat0103@gmail.com \
    --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).