emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Project management > Dynamic block per tag + [Babel]


From: Francesco Pizzolante
Subject: [Orgmode] Re: Project management > Dynamic block per tag + [Babel]
Date: Thu, 16 Dec 2010 13:19:31 +0100


Hi Matt,

> Another option is to use a babel block and org-map-entries to spit out a
> simple list of tasks for each person:
>
> --8<---------------cut here---------------start------------->8---
> #+source: tasklist
> #+begin_src emacs-lisp :var person="me"
>  (let (tasklist)
>    (org-map-entries
>     (lambda ()
>       (add-to-list 'tasklist
>                    (concat "- " (nth 4 (org-heading-components)))))
>     (concat person "/!TODO") 'agenda)
>    (mapconcat 'identity tasklist "\n"))
> #+end_src
>
> #+call: tasklist(person="Jenny")
> --8<---------------cut here---------------end--------------->8---
>
> Add this to an org file, replace Jenny with the appropriate name, and
> type C-c C-c to spit out a list (of all TODO items tagged with the
> relevant name) that looks like this:
>
> --8<---------------cut here---------------start------------->8---
> #+results: tasklist(person="Jenny")
> #+begin_example
> - Call George
> - Call Archie
> - Estimate cost of widgets
> --8<---------------cut here---------------end--------------->8---

Thanks a lot for your great help.

I've played a little with the code you've sent and here's what I end up with:

--8<---------------cut here---------------start------------->8---
#+source: tasklist
#+begin_src emacs-lisp :var person="FPZ" :results raw
(setq org-agenda-files (list (buffer-file-name)))
(let (tasklist)
  (add-to-list 'tasklist "|<c>|||" t)
  (org-map-entries
   (lambda ()
     (let ((priority (nth 3 (org-heading-components))))
       (add-to-list 'tasklist
                    (concat "| *" (nth 2 (org-heading-components)) "* "
                            "|/[#" (char-to-string (if priority
priority ?B)) "]/ "
                            "| [[" (nth 4 (org-heading-components)) "]]|") t)))
   (concat person "/!TODO|STARTED|WAIT") 'agenda)
  (mapconcat 'identity tasklist "\n"))
#+end_src
--8<---------------cut here---------------end--------------->8---

This enables to get a table with a task per row. For each task, I get the TODO
keywork, the priority and a link to the corresponding section in my Org
buffer.

Here'a an example from one of my document:
--8<---------------cut here---------------start------------->8---
#+results: tasklist
| <c>       |        |
                                 |
| *WAIT*    | /[#C]/ | [[See if we have to filter the processes
against something else]]                |
| *WAIT*    | /[#C]/ | [[See if we have to filter the products against
something else than the branch]] |
| *STARTED* | /[#A]/ | [[Display static party questions block]]
                                 |
| *WAIT*    | /[#C]/ | [[Analyse the risk management screen]]
                                 |
--8<---------------cut here---------------end--------------->8---

This is really great as each person can now have a quick overview of their
tasks and they just jave to click to get the details of the tasks!

The next step for me, would be to be able to sort this table against
priorities for instance.

If you think about a simple way of doing this, please let me know.

Regards,
Francesco




reply via email to

[Prev in Thread] Current Thread [Next in Thread]