From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Hiding "future" tasks in tags-todo agenda view Date: Sat, 15 Oct 2011 15:08:17 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RF3yT-00061D-EW for emacs-orgmode@gnu.org; Sat, 15 Oct 2011 09:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RF3yR-0000OW-HY for emacs-orgmode@gnu.org; Sat, 15 Oct 2011 09:08:25 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:51587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RF3yR-0000OK-9U for emacs-orgmode@gnu.org; Sat, 15 Oct 2011 09:08:23 -0400 Received: by eye4 with SMTP id 4so2090139eye.0 for ; Sat, 15 Oct 2011 06:08:21 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Neilen Marais Cc: emacs-orgmode@gnu.org On 14.10.2011, at 22:09, Neilen Marais wrote: > Hi, >=20 > 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. >=20 > 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.=20 >=20 > (setq org-agenda-custom-commands > '( > ("c" "Context Next Tasks"=20 > tags-todo (mapconcat 'car my-org-context-tag-alist "|") > ((org-agenda-skip-function '(org-agenda-skip-entry-if=20 > 'nottodo '("NEXT"))) > (org-agenda-sorting-strategy '(tag-up)) > (org-agenda-overriding-header "Context Next Tasks") > )) > )) >=20 > 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=20= > (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"=20 tags-todo = "TODO=3D\"NEXT\"+SCHEDULED=3D\"\"|TODO=3D\"NEXT\"+SCHEDULED<=3D\"\"= " ((org-agenda-sorting-strategy '(tag-up)) (org-agenda-overriding-header "Context Next Tasks") )))) You can use a regexp match TODO=3D{^\\(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"=20 tags-todo "SCHEDULED=3D\"\"|SCHEDULED<=3D\"\"/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