emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Lazy project definitions
Date: Mon, 17 May 2010 07:28:56 -0400	[thread overview]
Message-ID: <87mxvyahs7.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <2C475BA4-862D-434D-A123-8AADAF8A8EB2@gmail.com> (Carsten Dominik's message of "Mon\, 17 May 2010 11\:43\:17 +0200")

This works:

 ("p" "Projects" tags-todo "LEVEL=2/!-DONE-CANCELLED"
  ((org-agenda-skip-function
    '(org-agenda-skip-subtree-if 'notregexp "^\\*\\{3,\\}"))))
 ("o" "Other (non-project tasks)" tags "LEVEL=2/!-DONE-CANCELLED"
  ((org-agenda-skip-function
    '(org-agenda-skip-subtree-if 'regexp "^\\*\\{3,\\}"))))


Awesome!

Thanks Carsten!

-Bernt


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

> Hi Bernt,
>
> I guess you can use the regexp options, both in the stuck projects,
> and in a skipping condition for an agenda custom command.
>
> In the stuck project definition, adding "^\\*\\{3,\\}" as the 4th
> element should exclude anything that has level 3 or up in the subtree.
>
> for the agenda commands,
>
>    (org-skip-subtree-if 'regexp "\\*\\{3,\\}")
>
> or so should take care of it, am I right?
>
> - Carsten
>
> On for 16, 2010, at 11:17 PM, Bernt Hansen wrote:
>
>> Hi,
>>
>> I've been using the definition that all LEVEL 2 tasks are projects
>> for a
>> long time.  Recently I tried switching to explicitly marked projects
>> using a :project: tag (or PROJECT keyword) but I really dislike having
>> to manually mark projects in my task lists.
>>
>> A project for me is basically any LEVEL 2 task that has one or more
>> subtasks.
>>
>> I would like to define my org stuck projects as LEVEL=2/!-DONE- 
>> CANCELLED
>> with an added skipping function that does not consider level 2 tasks
>> if
>> they have no children.  I can't figure out how to make this work in
>> the
>> org-agenda-custom-commands using the skipping function but I think it
>> should be possible.
>>
>> My goal here is to add 2 custom agenda commands:
>>  p - show me projects (level 2 tasks not completed with children)
>>  o - show me other (non-project) tasks (level 2 tasks without
>> children)
>>
>> I don't want the 'o' - other tasks listed in my stuck projects view
>> since these are really one-task items and are not a project by my
>> simplistic definition above.
>>
>> I've been using everything as a project that is defined at LEVEL 2 for
>> ages and that works really well for me -- except I want to stop
>> spending
>> any time dealing with simple (non-project) tasks when looking for next
>> tasks and stuck projects.  Sure I could manually mark my tasks as
>> projects but I don't think that should really be necessary for what I
>> want to do here... and if it could just say a LEVEL 2 task with
>> children
>> is a project it would work automagically for me without any additional
>> input.
>>
>> For simple non-project tasks I don't need to mark them as NEXT to make
>> them unstuck -- they aren't projects to begin with and I can have
>> a convenient way to view all of these simple non-project commands in
>> the
>> agenda using the 'o' custom command.
>>
>> Is there a way to this?
>>
>> Thanks,
>> Bernt
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please 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:[~2010-05-17 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-16 21:17 Lazy project definitions Bernt Hansen
2010-05-17  9:43 ` Carsten Dominik
2010-05-17 11:28   ` Bernt Hansen [this message]
2010-05-17 12:14   ` Bernt Hansen
2010-05-17 16:54     ` Carsten Dominik
2010-05-18  1:44       ` Bernt Hansen
2010-05-18  4:18         ` Matt Lundin
2010-05-18 11:31           ` Bernt Hansen

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=87mxvyahs7.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=carsten.dominik@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).