From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Project management > Dynamic block per tag + [Babel] Date: Sun, 28 Nov 2010 15:40:58 -0500 Message-ID: <878w0dnput.fsf@fastmail.fm> References: <8739qth38k.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=56485 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMo3j-0006Uf-3m for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:41:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMo3h-0002E6-WC for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:41:19 -0500 Received: from plane.gmane.org ([80.91.229.3]:58280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMo3h-0002E1-Qg for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:41:17 -0500 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1PMo3Z-00043Y-2a for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 21:41:09 +0100 In-Reply-To: <8739qth38k.fsf@mundaneum.com> (Francesco Pizzolante's message of "Mon, 22 Nov 2010 12:21:02 +0100") 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: Francesco Pizzolante Cc: mailing-list-org-mode Francesco Pizzolante writes: > Hi, > > I'm using Org to manage a project. > > I need to output a tasks list for every of my colleagues, person per person. > > I'm currently using tags to assing people to tasks (even if I'm not completely > convinced that this is the right way to go). > > What I would like is to generate a dynamic block for each person with all > tasks assigned to that person. This means, list all headings with a given tag. > > Could someone tell me how to do that? I'm not sure if this is what you are after, but one way is to use custom agenda commands and then to save the agenda as a txt file: The following pages have good information on creating block agenda with custom commands: http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php http://orgmode.org/manual/Block-agenda.html#Block-agenda E.g., --8<---------------cut here---------------start------------->8--- (add-to-list 'org-agenda-custom-commands '("D" "Delegated tasks" ((tags-todo "Jenny") (tags-todo "Archie") (tags-todo "George")))) --8<---------------cut here---------------end--------------->8--- Once you create a custom agenda command, you can simply save it as txt by typing C-x C-w and the filename + relevant extension. 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--- You could do something similar with dynamic block function. HTH, Matt