From: Carsten Dominik <carsten.dominik@gmail.com>
To: Neilen Marais <nmarais@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Hiding "future" tasks in tags-todo agenda view
Date: Sat, 15 Oct 2011 15:08:17 +0200 [thread overview]
Message-ID: <AB880BBE-73A5-46CF-8E76-1CFDBE756843@gmail.com> (raw)
In-Reply-To: <loom.20111014T220716-166@post.gmane.org>
On 14.10.2011, at 22:09, Neilen Marais wrote:
> Hi,
>
> I've recently switched from using tracks (http://getontracks.org/) to
> org mode for GTD task management. One neat tracks feature that I am
> struggling to reproduce is the "show task from date". If you add a
> task with no date set, they show up immediately in the context next
> action lists, but if you have a "show from" date in the future, it
> only shows the task from that date onwards.
>
> Scheduling timestamps (http://orgmode.org/worg/org-faq.html#sec-16-9)
> seem like they should do exactly that, but they don't seem to work in
> my custom org-agenda that I use to show only items with a NEXT todo
> state and an assigned context. However, it shows all items
> irrespective of the scheduling setting.
>
> (setq org-agenda-custom-commands
> '(
> ("c" "Context Next Tasks"
> tags-todo (mapconcat 'car my-org-context-tag-alist "|")
> ((org-agenda-skip-function '(org-agenda-skip-entry-if
> 'nottodo '("NEXT")))
> (org-agenda-sorting-strategy '(tag-up))
> (org-agenda-overriding-header "Context Next Tasks")
> ))
> ))
>
> How can I make this custom agenda skip items that are scheduled in the
> future, while also keeping unscheduled tasks? I have also tried adding
> (org-agenda-entry-types '(:scheduled))
> but that did not seem to make any difference.
Hi Neilen,
this was a pretty good attempt for someone who says he is new to org!
Scheduling normally has the purpose to make an item show up in your daily
agenda on a specified date. But you can use is also to hide items scheduled
in the future from the task list. Here is how:
(setq org-agenda-custom-commands
'(
("c" "Context Next Tasks"
tags-todo "TODO=\"NEXT\"+SCHEDULED=\"\"|TODO=\"NEXT\"+SCHEDULED<=\"<today>\""
((org-agenda-sorting-strategy '(tag-up))
(org-agenda-overriding-header "Context Next Tasks")
))))
You can use a regexp match TODO={^\\(NEXT\\|...\\|...\\)$} to check for several
TODO keywords as once.
Another, more compact possibility that is also more easily extended to your
longer list of tasks in my-org-context-tags-alist is:
(setq org-agenda-custom-commands
'(
("c" "Context Next Tasks"
tags-todo "SCHEDULED=\"\"|SCHEDULED<=\"<today>\"/NEXT"
((org-agenda-sorting-strategy '(tag-up))
(org-agenda-overriding-header "Context Next Tasks")
))))
Let me know if I need to further explain why these works - but I
guess you can figure it out?
Cheers
- Carsten
next prev parent reply other threads:[~2011-10-15 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 20:09 Hiding "future" tasks in tags-todo agenda view Neilen Marais
2011-10-15 8:02 ` Matthew Sauer
2011-10-15 13:08 ` Carsten Dominik [this message]
2011-11-10 16:00 ` Hiding Neilen Marais
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=AB880BBE-73A5-46CF-8E76-1CFDBE756843@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nmarais@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).