emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Showing only subprojects in the agenda
@ 2013-02-19  3:45 Wiskey 5 Alpha
  2013-02-19 23:56 ` Bernt Hansen
  0 siblings, 1 reply; 5+ messages in thread
From: Wiskey 5 Alpha @ 2013-02-19  3:45 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 702 bytes --]

Hello all,
    I'm sure this is not as complicated as i am making it out to be, but i
have tried every option i can think of.

    My org files consist of three todo states : TODO NEXT | DONE
Any TODO is a project, and it may have sub projects like so :

* TODO Make dinner
** TODO Make homemade pizza
*** NEXT roll out the crust
*** NEXT add sauce
*** NEXT add cheese
** TODO Make a side salad
*** NEXT chop lettuce
*** NEXT chop tomatos

What I would like is to have my projects list agenda show :
TODO Make homemade pizza
TODO Make side salad

Basically, my projects are any TODO that has no TODO children, but may have
NEXT children.

How can i get the agenda view to only show them ?

thanks
-Tim

[-- Attachment #2: Type: text/html, Size: 1005 bytes --]

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

* Re: Showing only subprojects in the agenda
  2013-02-19  3:45 Showing only subprojects in the agenda Wiskey 5 Alpha
@ 2013-02-19 23:56 ` Bernt Hansen
  2013-02-20  4:06   ` Tim
  0 siblings, 1 reply; 5+ messages in thread
From: Bernt Hansen @ 2013-02-19 23:56 UTC (permalink / raw)
  To: Wiskey 5 Alpha; +Cc: emacs-orgmode

Wiskey 5 Alpha <wiskey5alpha@gmail.com> writes:

>     I'm sure this is not as complicated as i am making it out to be, but i have tried every option i can think of.
>
>     My org files consist of three todo states : TODO NEXT | DONE
> Any TODO is a project, and it may have sub projects like so :
>
> * TODO Make dinner
> ** TODO Make homemade pizza
> *** NEXT roll out the crust
> *** NEXT add sauce
> *** NEXT add cheese
> ** TODO Make a side salad
> *** NEXT chop lettuce
> *** NEXT chop tomatos
>
> What I would like is to have my projects list agenda show :
> TODO Make homemade pizza
> TODO Make side salad
>
> Basically, my projects are any TODO that has no TODO children, but may have NEXT children.
>
> How can i get the agenda view to only show them ?
>
> thanks
> -Tim

Hi Tim,

You should be able to achieve what you are looking for with a custom
agenda skip function.  I have skip functions to show (or skip) projects
in my setup and you should be able to adapt some of that for your needs.

See

http://doc.norang.ca/org-mode.html#CustomAgendaViewSetup and 
http://doc.norang.ca/org-mode.html#Projects

for examples of what I use.

Regards,
Bernt

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

* Re: Showing only subprojects in the agenda
  2013-02-19 23:56 ` Bernt Hansen
@ 2013-02-20  4:06   ` Tim
  2013-02-20 11:54     ` Bernt Hansen
  0 siblings, 1 reply; 5+ messages in thread
From: Tim @ 2013-02-20  4:06 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode, Wiskey 5 Alpha

At Tue, 19 Feb 2013 18:56:13 -0500,
Bernt Hansen wrote:
> 
> Wiskey 5 Alpha <wiskey5alpha@gmail.com> writes:
> 
> >     I'm sure this is not as complicated as i am making it out to be, but i have tried every option i can think of.
> 
> You should be able to achieve what you are looking for with a custom
> agenda skip function.  I have skip functions to show (or skip) projects
> in my setup and you should be able to adapt some of that for your needs.
> 
Thanks Bernt, I guess it /is/ that complicated.  I will take a look but I
am not much of an elisp programmer yet....

-Tim

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

* Re: Showing only subprojects in the agenda
  2013-02-20  4:06   ` Tim
@ 2013-02-20 11:54     ` Bernt Hansen
  2013-02-28  3:41       ` Tim
  0 siblings, 1 reply; 5+ messages in thread
From: Bernt Hansen @ 2013-02-20 11:54 UTC (permalink / raw)
  To: Tim; +Cc: emacs-orgmode

Tim <wiskey5alpha@gmail.com> writes:

> At Tue, 19 Feb 2013 18:56:13 -0500,
> Bernt Hansen wrote:
>> 
>> Wiskey 5 Alpha <wiskey5alpha@gmail.com> writes:
>> 
>> >     I'm sure this is not as complicated as i am making it out to be, but i have tried every option i can think of.
>> 
>> You should be able to achieve what you are looking for with a custom
>> agenda skip function.  I have skip functions to show (or skip) projects
>> in my setup and you should be able to adapt some of that for your needs.
>> 
> Thanks Bernt, I guess it /is/ that complicated.  I will take a look but I
> am not much of an elisp programmer yet....
>
> -Tim

If all of your projects are normally at level 2 will this work?

C-c a m LEVEL=2/!TODO RET

If that works then you can define an agenda as

--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands
      (quote (("p" "Projects" tags-todo "LEVEL=2/!TODO"
	       ((org-agenda-overriding-header "Projects")
		(org-agenda-sorting-strategy
		 '(category-keep)))))))
--8<---------------cut here---------------end--------------->8---

Bernt

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

* Re: Showing only subprojects in the agenda
  2013-02-20 11:54     ` Bernt Hansen
@ 2013-02-28  3:41       ` Tim
  0 siblings, 0 replies; 5+ messages in thread
From: Tim @ 2013-02-28  3:41 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode, Tim

At Wed, 20 Feb 2013 06:54:04 -0500,
Bernt Hansen wrote:
> 

> If all of your projects are normally at level 2 will this work?
> 
> C-c a m LEVEL=2/!TODO RET
> 
Bernt,
   I really appreciate your time.  Unfortunately, this doesnt quite get me 
what I am looking for.  My current method of defining projects and actions
 is :
- any thing that needs to be accomplished is a TODO
- a TODO can have TODOs as children, for as many levels as it takes to 
  organize the project and subprojects
- Next actions are defined with a NEXT key word and are tagged with the 
  appropriate context to have them show on my next actions list (i.e. errand,
  office, home)

I would like to have 2 views of the projects :
The first is a hierarchial view of all TODOs , which i do using the indented 
agenda list of TODOs.
The second is now using what you have published on your website using the skip
functions. Since I want to see all TODOs that have NEXT items as children, or, 
said another way 

 A project is any TODO that has NEXT as children

I modified your =bh/is-project-p= to look for NEXT like so
#+BEGIN_SRC elisp
        (while (and (not has-subtask)
                    (< (point) subtree-end)
-                    (re-search-forward "^\*+ TODO" subtree-end t))
+                    (re-search-forward "^\*+ NEXT" subtree-end t))
          (when (member (org-get-todo-state) org-todo-keywords-1)
#+END_SRC

Again, thank you for your help, and for putting your setup out on
the web for all of us to benefit from.

-Tim

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

end of thread, other threads:[~2013-02-28  3:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19  3:45 Showing only subprojects in the agenda Wiskey 5 Alpha
2013-02-19 23:56 ` Bernt Hansen
2013-02-20  4:06   ` Tim
2013-02-20 11:54     ` Bernt Hansen
2013-02-28  3:41       ` Tim

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