2

I have a project.org file that as a * Project subtree where each project I'm currently working on is tracked. I'd like to create a custom agenda view that separates out each project by project so I can see what items I have open for each project. I've been able to do something similar for work that has been delegated by using tags, but in this case I don't want to have to tag every item in order to separate it out. How might I go about breaking my agenda view up based on the subtrees in my project file? Example below

* Project
** Project 1
*** TODO Task 1
** Project 2
*** TODO Task 2
* Hiring
** Position 1
*** DONE Job Requirements
** Position 2
*** TODO Job Requirements

Should result in something like the following:

Project 1 unfinished tasks:

agenda:     TODO [#A] Task 1

=======================================================================================================================

Project 2 unfinished tasks:

agenda:      TODO [#A] Task 1

======================================================================================================================= Position 2 unfinished tasks:

inbox:      TODO Job Requirements
1
  • There's a similar question here.
    – jagrg
    Feb 2 at 13:42
0

You can configure the org-agenda-custom-commands variable. This is a setup to create an agenda for two project files:

(setq org-agenda-custom-commands
  '(("p" "Projects"
 ((agenda "" ((org-agenda-files '("project1.org"))))
  (agenda "" ((org-agenda-files '("project2.org"))))))))
0

I don't think what you're trying to do is possible out of the box. I'd suggest using category, project name, and TODO entry all on the same line. You will also have to label your level one headings (agenda and inbox respectively) using the CATEGORY property by pressing C-c C-x p. For example:

(setq org-agenda-custom-commands
      '(("u" "Unfinished tasks"
         ((tags "LEVEL=3+CATEGORY={agenda\\|inbox}"
                ((org-agenda-prefix-format 
                  " %-12c %-12(car (last (org-get-outline-path)))")
                 (org-agenda-overriding-header "Unfinished tasks")))))))

produces:

Unfinished tasks
 agenda       Project 1   TODO Task 1
 agenda       Project 2   TODO Task 2
 inbox        Position 1  DONE Job Requirements
 inbox        Position 2  TODO Job Requirements

Another options is to indent subtasks under project headings:

(setq org-agenda-custom-commands
      '(("u" "Unfinished tasks"
         ((tags "LEVEL>1+CATEGORY=\"agenda\"")
          (tags "LEVEL>1+CATEGORY=\"inbox\""))
         ((org-agenda-prefix-format " %-12c %l%l")
          (org-agenda-overriding-header "Unfinished tasks")))))
Unfinished tasks
 agenda           Project 1
 agenda             TODO Task 1
 agenda           Project 2
 agenda             TODO Task 2
Unfinished tasks
 inbox            Position 1
 inbox              DONE Job Requirements
 inbox            Position 2
 inbox              TODO Job Requirements

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.