From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francesco Pizzolante Subject: Re: Project management > Dynamic block per tag + [Babel] Date: Thu, 16 Dec 2010 13:19:31 +0100 Message-ID: References: <8739qth38k.fsf@mundaneum.com> <878w0dnput.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=36962 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTCoY-0003p6-0Q for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 07:20:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTCoW-0000M0-Df for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 07:20:05 -0500 Received: from plane.gmane.org ([80.91.229.3]:55723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTCoW-0000Lg-1E for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 07:20:04 -0500 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1PTCoR-0006LY-AX for emacs-orgmode@gnu.org; Thu, 16 Dec 2010 13:19:59 +0100 In-Reply-To: <878w0dnput.fsf@fastmail.fm> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: mailing-list-org-mode 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=3D"me" > =C2=A0(let (tasklist) > =C2=A0 =C2=A0(org-map-entries > =C2=A0 =C2=A0 (lambda () > =C2=A0 =C2=A0 =C2=A0 (add-to-list 'tasklist > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(con= cat "- " (nth 4 (org-heading-components))))) > =C2=A0 =C2=A0 (concat person "/!TODO") 'agenda) > =C2=A0 =C2=A0(mapconcat 'identity tasklist "\n")) > #+end_src > > #+call: tasklist(person=3D"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=3D"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 wit= h: --8<---------------cut here---------------start------------->8--- #+source: tasklist #+begin_src emacs-lisp :var person=3D"FPZ" :results raw (setq org-agenda-files (list (buffer-file-name))) (let (tasklist) (add-to-list 'tasklist "||||" 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 T= ODO 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 | | | | | *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