emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Neilen Marais <nmarais@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Hiding
Date: Thu, 10 Nov 2011 16:00:14 +0000 (UTC)	[thread overview]
Message-ID: <loom.20111110T162930-542@post.gmane.org> (raw)
In-Reply-To: AB880BBE-73A5-46CF-8E76-1CFDBE756843@gmail.com

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

      reply	other threads:[~2011-11-10 16:00 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
2011-11-10 16:00   ` Neilen Marais [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=loom.20111110T162930-542@post.gmane.org \
    --to=nmarais@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).