emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Hiding "future" tasks in tags-todo agenda view
@ 2011-10-14 20:09 Neilen Marais
  2011-10-15  8:02 ` Matthew Sauer
  2011-10-15 13:08 ` Carsten Dominik
  0 siblings, 2 replies; 4+ messages in thread
From: Neilen Marais @ 2011-10-14 20:09 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hiding "future" tasks in tags-todo agenda view
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Sauer @ 2011-10-15  8:02 UTC (permalink / raw)
  To: Neilen Marais; +Cc: emacs-orgmode

Neilen,

One of my favorite agenda custom commands is the following:

-------snip--------start----------snip------------------
(("s" "Startup View" ((agenda "" ((org-agenda-ndays 3)
(org-deadline-warning-days 1))) (agenda ""((org-agenda-time-grid nil)
(org-deadline-warning-days 365) (org-agenda-entry-types (quote
(:deadline))) (org-agenda-skip-entry-if (quote
scheduled)) (org-agenda-ndays 1) (org-agenda-overriding-header
"Unscheduled upcoming deadlines:"))) (todo ""
(quote(org-agenda-overriding-header "Unscheduled No Deadline TODO:
"))))))
-------snip--------end----------snip------------------
(org-agenda-ndays 3) gives me a 3 day calendar for this view
(org-deadline-warning-days 1) gives me a 1 day warning for deadlines
(you should be able to set it to 0 to get just today).  Also, if you
set a custom deadline warning on the individual task it overrides the
1 day.
I also use a seperate section to show all my unscheduled TODO items
down below so they are in a separate area but on the same agenda.
If you had a custom command set to 0 and then added
----cut-----
 (todo "" (quote(org-agenda-overriding-header "Unscheduled No Deadline
TODO: ")))
-----cut-----
it would give you a second section that has all your unscheduled TODO
items at the bottom (at least it does for me in the agenda I have)

Hope this helps.


On Fri, Oct 14, 2011 at 3:09 PM, Neilen Marais <nmarais@gmail.com> 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.
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hiding "future" tasks in tags-todo agenda view
  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
  2011-11-10 16:00   ` Hiding Neilen Marais
  1 sibling, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2011-10-15 13:08 UTC (permalink / raw)
  To: Neilen Marais; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Hiding
  2011-10-15 13:08 ` Carsten Dominik
@ 2011-11-10 16:00   ` Neilen Marais
  0 siblings, 0 replies; 4+ messages in thread
From: Neilen Marais @ 2011-11-10 16:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

Carsten Dominik <carsten.dominik <at> gmail.com> writes:

> 
> 
> Hi Neilen,
> 
> this was a pretty good attempt for someone who says he is new to org!

Why thanks :)



Been a while since I've been able to play with my Org, but thanks for the info.

> 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:
> 
> 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?

Finding http://orgmode.org/manual/Matching-tags-and-properties.html helped. I
ended up with

(setq org-agenda-custom-commands
      '(
	("c" "Context Next Tasks" 
	 tags-todo (concat
			  "SCHEDULED=\"\"+{" 
			  (mapconcat 'car my-org-context-tag-alist "\\|")
			  "}|SCHEDULED<=\"<today>\"+{"
			  (mapconcat 'car my-org-context-tag-alist "\\|")
			  "}/NEXT")
	 ((org-agenda-sorting-strategy '(tag-up))
	  (org-agenda-overriding-header "Context Next Tasks")
	  ))
))

which seems a little clunky, but works :)  BTW, why does one need to escape the
pipe (|) character for regexes? Caused me a bit if head scratching till I looked
carefully at you example.
 
Thanks
Neilen
> Cheers
> 
> - Carsten
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-10 16:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-11-10 16:00   ` Hiding Neilen Marais

Code repositories for project(s) associated with this 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).