emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: PT <spamfilteraccount@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Hide tasks from the agenda until they are due
Date: Mon, 9 Nov 2009 22:10:48 +0100	[thread overview]
Message-ID: <6BCE52EE-DE9C-4CE9-84F5-DAAA72A8F2DD@gmail.com> (raw)
In-Reply-To: <loom.20091108T181307-266@post.gmane.org>

Looks like a snippet that should go up on the FAQ or maybe in org- 
hacks.org?

Thanks for sharing!

- Carsten

On Nov 8, 2009, at 6:17 PM, PT wrote:

> In a previous thread
> (http://thread.gmane.org/gmane.emacs.orgmode/17818) there was a
> discussion about using the agenda to schedule trivial time-specific
> tasks during the day which can be done at or after a certain
> time. These tasks should be hidden from the agenda until their time is
> due, because you cannot work on them before then, so they are just
> polluting the agenda view.
>
> Matt Lundin kindly provided a quick untested solution in that thread
> which was almost complete, it needed only a bit of tweaking. Here is
> the working solution (not yes extensively tested) for those  
> interested:
>
>
>    (defun my-org-agenda-skip-if-later ()
>      "Skip entries that are later than the current time."
>      (let ((time (and (org-entry-get nil "TIME-TODO")
>                       (or (org-entry-get nil "TIMESTAMP")
>                           (org-entry-get nil "SCHEDULED")))))
>        (when time
>          (unless (time-less-p (org-time-string-to-time time)  
> (current-time))
>            (or (outline-next-heading)
>                (point-max))))))
>
>    (setq org-agenda-skip-function 'my-org-agenda-skip-if-later)
>
>
> The tasks to be hidden need to have a special property set (TIME-TODO)
> in order to distinguish them from regular timestamps which are not  
> hidden.
> I added this property to my remember template, so it's automatically
> set when I create such a task.
>
> I set the skip function globally, because I use a single agenda  
> view. You
> may want to set it only for certain agenda views.
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

      reply	other threads:[~2009-11-09 21:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 17:17 Hide tasks from the agenda until they are due PT
2009-11-09 21:10 ` Carsten Dominik [this message]

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=6BCE52EE-DE9C-4CE9-84F5-DAAA72A8F2DD@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=spamfilteraccount@gmail.com \
    /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).