Merge branch 'master' of ssh://repo.or.cz/srv/git/Worg
[Worg.git] / org-tutorials / org-meeting-tasks.org
blob66ff040f8049622b963b77b755820960ab8724c8
2 #+TITLE:     Tracking actions through a series of meetings
3 #+AUTHOR:    Carsten Dominik
4 #+EMAIL:     carsten.dominik@gmail.com
5 #+DATE:      2011-03-30
6 #+DESCRIPTION: 
7 #+KEYWORDS: 
8 #+LANGUAGE:  en
9 #+OPTIONS:   H:4 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
10 #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
11 #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
12 #+LINK_UP:   
13 #+LINK_HOME: 
15 #+STARTUP: oddeven
17 * Introduction
19 Org-mode can be used very well for taking notes and for capturing
20 action items during the meeting.  This keeps the tasks inside the
21 notes and works really well for planning out projects.
23 When documenting a series of meetings with Org-mode, a different work
24 flow is required.  Such a meeting series usually has a set of tasks
25 which are continuously being defined during the meetings, and which
26 need to be tracked from meeting to meeting until completion.  So
27 usually the meeting notes contains the current list of tasks.  Done
28 tasks disappear from the meeting notes, but still need to be available
29 to the person who is running the series of meeting.
31 * Requirements
33 To use the work flow described here, you will need the bleeding edge
34 git version of 2011-03-30 or any release that was created after this
35 date.  Basic task tracking has been possible with Org, of course, since
36 day one, but exporting without DONE tasks is a only recent addition.
38 Also, this tutorial assumes that you are using the helper functions
39 shown in section [[id:F18E5D49-BFAC-4C17-A108-E069E46F141E][Custom code]].  This is not strictly necessary - you
40 could do the corresponding steps by hand - but if you are using this
41 work flow more often, you may appreciate these tools.
43 * Setup
45 Use a special Org file to document the meetings and to track the
46 actions.  In the file,  I have the following setup.
48 #+begin_src org
49   ,#+TODO: TODO(t) | CANCELED(c) DONE(d)
50   ,#+OPTIONS: tasks:todo
51 #+end_src
53 Of course you can define the TODO keywords any way you like.  The
54 =#+OPTIONS= line arranges for DONE tasks to be excluded from export,
55 so that when you send around the list of actions to the participants,
56 these completed tasks will not clutter the list.  If you want to keep DONE tasks
57 in the list, either always or occasionally, modify this line to say
58 =#+OPTIONS: tasks:t=.
60 * How to identify tasks
62 It is useful to identify a task in a unique way, so that you can get
63 back to it easily in the next meeting.  The method I am choosing here
64 is to simply number the tasks sequentially, in the sequence they come
65 up.  The [[id:F18E5D49-BFAC-4C17-A108-E069E46F141E][custom code]] below defines a command to create tasks in this
66 way, to ensure that the sequential number is indeed not already taken.
67 To bind this command to a key, use (for example)
69 #+begin_src emacs-lisp
70 (define-key org-mode-map "\C-cn" 'org-mactions-new-numbered-action)
71 #+end_src
73 The command =org-mactions-new-numbered-action= uses the specification
74 in =org-mactions-numbered-action-format= to insert a task like this:
76 #+begin_src org
77    ,** TODO Action #2:                                 :#2:
78 #+end_src
80 You can also call the command with a prefix argument in order to
81 insert an inline-task.
83 With the default setup, the action starts with "Action #2", and it is
84 tagged by "#2" to that I can tag other stuff relating to this action
85 and search for it.
87 * The work flow
89 ** Before a meeting
91 For each meeting I start a new top-level section in the document for
92 the notes.  In the notes I create new actions and leave them there for
93 the time being.
95 I also have a top-level section "ACTIONS" in the file.  This section
96 contains all the actions from previous meetings, each action
97 identified by its unique number.  I have this section right after the
98 meeting notes sections, so that I can easily export the latest meeting
99 notes together with the action list, simply by narrowing the buffer to
100 the two sequential trees.  Here is an example what this might look
101 like
103 #+begin_src org
104   ,* Notes from <2011-03-16 Wed>                                       :ARCHIVE:
105   ,* Notes from <2011-03-23 Wed>                                       :ARCHIVE:
106   ,* Notes from <2011-03-30 Wed>
107   ,** Present at meeting
108   ,   - [X] Peter
109   ,   - [X] Sarah
110   ,   - [X] Sam
111   ,** Agenda
112   ,   - Comments and corrections to last meting notes
113   ,   - Reports from the sub teams
114   ,   - Discussion
115   ,   - Final round
116   ,** Notes
117   ,   ...
118   , 
119   ,* ACTIONS
120   ,  This is the general list of Actions
121   ,** DONE Action #1 Inventory of equipment                           :#1:Sarah:
122   ,** DONE Action #2 Definition of main goals                         :#2:Peter:
123   ,** TODO Action #4 Talk to companies                                  :#4:Sam:
124   
125 #+end_src
127 ** During the meeting
129 During the meeting, take notes and create new actions.  You could add
130 these new actions immediately to the global list, or you could define
131 the actions inside the notes for now.  Below I will show how to copy
132 or move the actions to the general list.
134 When I create actions, I also tag them with the names of people who
135 are responsible, so that it later becomes easy to track progress and
136 to send reminders.
138 ** After the meeting
140 After the meeting, I organize the notes of the current meeting until
141 they are ready to be sent out.  I like to keep the newly defined
142 actions inside the meeting notes, to highlight them as new.  Once
143 satisfied with the notes, the new actions need to be integrated with
144 the general list of actions.
146 *** Copying the actions from the meeting notes to the action list
148 I then *copy* the new actions from the last meeting to the ACTIONS
149 section.  For this task I use the command =M-x
150 org-mactions-collect-todos-in-subtree=.  It will copy all the actions
151 in a subtree and put them into the kill ring, so that I can simply
152 paste them with =C-c C-x C-y= into the ACTIONS list.  There I organize
153 the actions, change the sequence, create subsections with related
154 actions together etc.  Some groups have trivial task lists, then the
155 list just stays simple and flat.  For complex consortia I do a lot of
156 analysis, structuring, and ordering.
158 *** Sending out the notes
160 To send the meeting notes and the current list of actions, I narrow
161 the buffer to the node with the meeting notes and the node with the
162 action list, export to the desired format, and mail it out.
164 *** Deactivate tasks in the meeting notes
166 I then deactivate any actions in the meeting notes I just sent around
167 by marking the entire new notes tree with an ARCHIVE tag.  Then, TODO
168 lists and other Agenda views will get entries only from the ACTIONS
169 tree, not from the meeting notes.  Instead of copying, you could also
170 *move* (refile) the actions to the ACTIONS tree, but I like to keep
171 them deactivated in the notes, so that I have a copy of the notes
172 exactly as sent around, in the file.  The idea is that the meeting
173 notes are fixed, and all procedural stuff with the actions will be
174 added and tracked in the ACTIONS tree.
176 ** Between meetings
178 Between meetings, I use the ACTIONS tree to generate reminders for
179 people in the list, check DONE tasks off etc.  Before the next
180 meeting, I create an agenda view to show me which actions have been
181 closed during the last period.  I create this view in the following
182 way:  With the cursor in the actions tree I do
184 : C-c a < < a         ;; Agenda view restricted on subtree
185 : v L                 ;; turn on logging
187 I extract what needs to be reported to the group and add that to the
188 invitation mailing for the next meeting.  I also attach an export of
189 the current ACTIONS tree to the agenda, for reference during the
190 following meeting.  The DONE items will not be on that tree anymore.
191 The nice thing is that the members of the meeting always have an
192 uncluttered list of actions, while I as the responsible person still
193 have all the old tasks and the history of the entire project at my
194 finger tips.
196 * Conclusion
198 This setup has worked really well for me, both for meetings that
199 happen locally, and for meetings with international groups who meet
200 via telephone/video conferencing.
202 In the section below, I welcome contributions by anyone, describing
203 additional ideas and modification to the workflow.
205 * Custom code
206   :PROPERTIES:
207   :ID:       F18E5D49-BFAC-4C17-A108-E069E46F141E
208   :END:
210 Here is some custom code to help entering numbered actions, and to
211 collect TODO items in a subtree into a flat list.
213 #+begin_src emacs-lisp
214   (defcustom org-mactions-numbered-action-format "TODO Action #%d "
215     "Default structure of the headling of a new action.
216       %d will become the number of the action."
217     :group 'org-edit-structure
218     :type 'string)
219   
220   (defcustom org-mactions-change-id-on-copy t
221     "Non-nil means make new IDs in copied actions.
222   If an action copied with the command `org-mactions-collect-todos-in-subtree'
223   contains an ID, that ID will be replaced with a new one."
224     :group 'org-edit-structure
225     :type 'string)
226     
227   (defun org-mactions-new-numbered-action (&optional inline)
228     "Insert a new numbered action, using `org-mactions-numbered-action-format'.
229       With prefix argument, insert an inline task."
230     (interactive "P")
231     (let* ((num (let ((re "\\`#\\([0-9]+\\)\\'"))
232                   (1+ (apply 'max 0
233                              (mapcar
234                               (lambda (e)
235                                 (if (string-match re (car e))
236                                     (string-to-number (match-string 1 (car e)))
237                                   0))
238                               (org-get-buffer-tags))))))
239            (tag (concat "#" (number-to-string num))))
240       (if inline
241           (org-inlinetask-insert-task)
242         (org-insert-heading 'force))
243       (unless (eql (char-before) ?\ ) (insert " "))
244       (insert (format org-mactions-numbered-action-format num))
245       (org-toggle-tag tag 'on)
246       (if (= (point-max) (point-at-bol))
247           (save-excursion (goto-char (point-at-eol)) (insert "\n")))
248       (unless (eql (char-before) ?\ ) (insert " "))))
249     
250   (defun org-mactions-collect-todos-in-subtree ()
251     "Collect all TODO items in the current subtree into a flat list."
252     (interactive)
253     (let ((buf (get-buffer-create "Org TODO Collect"))
254           (cnt 0) beg end string s)
255       (with-current-buffer buf (erase-buffer) (org-mode))
256       (org-map-entries
257        (lambda ()
258          (setq beg (point) end (org-end-of-subtree t t) cnt (1+ cnt)
259                string (buffer-substring beg end)
260                s 0)
261          (when org-mactions-change-id-on-copy
262            (while (string-match "^\\([ \t]*:ID:\\)[ \t\n]+\\([^ \t\n]+\\)[ \t]*$"
263                                 string s)
264              (setq s (match-end 1)
265                    string (replace-match (concat "\\1 "
266                                                  (save-match-data (org-id-new)))
267                                          t nil string))))
268          (with-current-buffer buf (org-paste-subtree 1 string)
269                               (goto-char (point-max))))
270        (format "TODO={%s}" (regexp-opt org-not-done-keywords))
271        'tree)
272       (if (= cnt 0)
273           (message "No TODO items in subtree")
274         (message "%d TODO entries copied to kill ring" cnt)
275         (prog1 (with-current-buffer buf
276                  (kill-new (buffer-string)))
277           (kill-buffer buf)))))
278 #+end_src
280 * Other ideas and remarks about this workflow
282 ** Exporting to LaTeX (by Eric S Fraga)
284 I use LaTeX to create the minutes I circulate to the people that
285 attended a meeting.  I have adopted Carsten's workflow but have
286 customised some of the behaviour to better suit the LaTeX export.
287 The customisations address primarily the formatting of the
288 actions and identifying the person responsible for each action.
290 1. I customise the export options to not include TODO keywords or
291    tags and to not number the sections, using:
292          
293    : #+OPTIONS: tags:nil todo:nil num:nil toc:nil
294          
295    The =toc= option is not strictly necessary but minutes of
296    meetings are typically only a few pages so a table of contents
297    is seldom required.  However, it *can* be useful for generating
298    a list of actions.
300 2. The numbering of actions is done by explicitly putting
301    the number into the headline.  I do this by customising the
302    =org-numbered-action-format= variable to the string
303          
304    : "TODO %d. \\action{?}"
306 3. To support this type of headline, I have defined the =\action= LaTeX macro:
307          
308    : #+latex_header: \newcommand{\action}[1]{\marginpar{\fbox{#1}}}
310    I will typically put the name or initials of the person
311    responsible for taking the action in lieu of the =?= as the
312    argument to the action macro in the headline, such as:
313          
314    #+begin_src org
315      , ** TODO 3. \action{ESF} Prepare plan.         :#3:
316    #+end_src
318    The macro, on export, will place the person's name or initials
319    in the right margin of the page with a box around it, making
320    it very easy to identify who has actions and who does not.
322  I do customise the LaTeX export further but those customisations
323  are not specific to minute taking.