[Orgmode] TODO state tracking in org-mode

2008-03-21 Thread Bernt Hansen
Here's my attempt at documenting how I use task todo keywords and state
change tracking in org-mode.

* Some Background

I am a consultant who works with multiple clients doing programming and
system maintenance projects.

I have multiple org files which are in my org-agenda-files variable so
any tasks added to these end up in my agenda.  I live in the agenda.
Due to the number of tasks I have to work on the 'hot topics' end up
being scheduled so they are 'in my face' on the daily agenda until they
are completed.  Only when the agenda has no pending work to do for today
do I look for NEXT tasks to work on.

I typically have one org file per client with lots of projects and tasks
in it.  I archive completed projects/tasks monthly to de-clutter my org
files.  I throw lots of details into my org files so they tend to get
rather long.  Active Org files for clients are at least 1,000 lines long
normally; one of them is approaching 10,000 lines.  The archives are
bigger.

* Task States

I have a few different types of tasks in my org files.  They roughly
break down into the following groups with the keywords listed.

 - Notes and documentation
   (these don't get a todo keyword)
 - Purchase Orders
   - OPEN
   - CLOSED
 - Regular Tasks
   - TODO
   - NEXT
   - DONE
   - WAITING
   - CANCELLED
   - SOMEDAY
   - ONGOING

Notes and documentation normally do not get a task todo keyword.  It's
just a heading level under some project which I use to help organize
things.

I use OPEN and CLOSED todo keywords for Purchase orders only -- these
aren't normal tasks where you do things and then they're done.  The
purchase order is OPEN as long as you can bill against it and CLOSED
after that.  This just feels more natural to me than TODO/DONE.

I use ONGOING for tasks that do not have a well defined start and end.
Things like org-mode tuning :), reading email, administrative tasks for
clients etc.  I clock everything (or try to) so when I find I'm working
on something that isn't project specific but is more about organizing
things for a client/project I start clocking the appropriate ONGOING
task until I move on to something else.

All of the remaining task states are for regular tasks.  Tasks normally
go TODO -> NEXT -> DONE.  But things in life rarely go according to plan
so a task will often go to WAITING status, or be postponed indefinitely
(to SOMEDAY), or be CANCELLED without being complete.

* Task State Change Logging

I normally use a Remember template to create new project tasks.  This
creates the new task with a TODO keyword and today's date as the date
the task came into existence.  Subtasks are created when outlining the
project and no dates are normally recorded when they are created.

For a given task I want to record things like the following:

  - Why/What a task is waiting for when it goes to WAITING status
  - When a task is complete
  - When a task is cancelled
  - When a task is reopened (it was complete but now has work to do again)
  - When a task is finished waiting for something
  - When a purchase order is opened or closed

* Setup

I use the following setup in my .emacs for org-mode tasks.  Since I have
multiple org files I don't want to duplicate the settings for every
file.  I use an identical setup for every org file I use so I define
these globally.  I hate maintaining duplicated definitions.

,[ .emacs settings ]
| (setq org-log-done t
|   org-use-fast-todo-selection t)
| 
| (setq org-todo-keyword-faces
|   '(("TODO"  . (:foreground "red" :weight bold))
|   ("NEXT"  . (:foreground "red" :weight bold))
|   ("DONE"  . (:foreground "forest green" :weight bold))
|   ("WAITING"  . (:foreground "orange" :weight bold))
|   ("CANCELLED"  . (:foreground "forest green" :weight bold))
|   ("SOMEDAY"  . (:foreground "orange" :weight bold))
|   ("OPEN"  . (:foreground "red" :weight bold))
|   ("CLOSED"  . (:foreground "forest green" :weight bold))
|   ("ONGOING"  . (:foreground "orange" :weight bold
| 
| (setq org-todo-keywords
|   '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)")
|   (sequence "WAITING(w@/!)" "|" "CANCELLED(c!/!)")
|   (sequence "SOMEDAY(s!/!)" "|")
|   (sequence "OPEN(O!)" "|" "CLOSED(C!)")
|   (sequence "ONGOING(o)" "|")))
`

Defining org-log-done to true tells org-mode to record a CLOSED: tag and
date/time stamp when a task is completed (either DONE, CANCELLED, or
CLOSED).  Moving the task back to an active todo state removes this tag.

org-todo-keyword-faces defines what colours to use for the various todo
keywords.  It's not strictly necessary but it's nice :)

org-todo-keywords defines the todo keywords and when extra information
should be recorded.  I only use sequence todo keywords. Keywords to the
left of the '|' are todo states and keywords to the right of the '|' are
done (completed) states in the sequence.  S-left and S-right cycles
through the states in the sequence.

  - TODO(t) sets the key 't' to be th

[Orgmode] Re: Add anniversary and org-mode

2008-03-21 Thread Thomas Baumann
Bastien Guerry <[EMAIL PROTECTED]> writes:
>
> I use this:
>
> (add-hook 'list-diary-entries-hook 'bbdb-include-anniversaries)
>
> -- 
> Bastien


For those who hardly use the diary (like me), here's a
wrapper/replacement to bbdb-anniv.el.

Add 

%%(org-bbdb-anniversaries) 

somewhere in your org-file and all the anniversaries from the bbdb will
be included in the diary. The format for birthdays, weddings, ... , can
be customized in bbdb-anniv.

Thomas



;;; org-bbdb-anniv.el --- Get anniversaries from BBDB

;; Copyright (C) 2008 Thomas Baumann

;; Author: Thomas Baumann <[EMAIL PROTECTED]>
;; based on bbdb-anniv.el by Ivar Rummelhoff <[EMAIL PROTECTED]>
;; Maintainer: Thomas Baumann <[EMAIL PROTECTED]>
;; Created: 21 March 2008
;; Keywords: calendar org

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; If you have not received a copy of the GNU General Public License
;; along with this software, it can be obtained from the GNU Project's
;; World Wide Web server (http://www.gnu.org/copyleft/gpl.html), from
;; its FTP server (ftp://ftp.gnu.org/pub/gnu/GPL), by sending an electronic
;; mail to this program's maintainer or by writing to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

;;; Commentary:

;; (require 'org-bbdb-anniv)
;; %%(org-bbdb-anniversaries)
;;
;; will include BBDB-anniversaries in the agenda view
;;
;; From bbdb-anniv.el
;; The anniversaries are stored in BBDB in the field `anniversary'
;; in the format
;;
;; [-MM-DD CLASS-OR-FORMAT-STRING]
;; {\n-MM-DD CLASS-OR-FORMAT-STRING}*
;;
;; CLASS-OR-FORMAT-STRING is one of two things:
;;
;;  * an identifier for a class of anniversaries (eg. birthday or
;;wedding) from `bbdb-anniversary-format-alist'.
;;  * the (format) string displayed in the diary.
;;
;; It defaults to the value of `bbdb-default-anniversary-format'
;; ("birthday" by default).
;;
;; The substitutions in the format string are (in order):
;;  * the name of the record containing this anniversary
;;  * the number of years
;;  * an ordinal suffix (st, nd, rd, th) for the year
;;
;; See the documentation of `bbdb-anniversary-format-alist' for
;; further options.
;;
;; Example (my own record):
;;
;;   1973-06-22 
;;   20??-??-?? wedding
;;   1998-03-12 %s created bbdb-anniv.el %d years ago
;;
;; If you use the hook `sort-diary-entries', you should make sure that
;; it is executed after `bbdb-include-anniversaries'.
;;

(require 'bbdb-anniv)

;;;###autoload
(defun org-bbdb-anniversaries ()
  "Extract anniversaries from BBDB for display in the agenda." 
  (let ((dates (list (cons (cons (extract-calendar-month date)
 (extract-calendar-day date))
   (extract-calendar-year date
(text ())
annivs date years
split class form)
(dolist (rec (bbdb-records))
  (when (setq annivs (bbdb-record-getprop
  rec bbdb-anniversary-field))
(setq annivs (bbdb-split annivs "\n"))
(while annivs
  (setq split (bbdb-anniv-split (pop annivs)))
  (multiple-value-bind (m d y)
  (funcall bbdb-extract-date-fun (car split))

(when (and (or (setq date (assoc (cons m d) dates))
   (and (= d 29)
(= m 2)
(setq date (assoc '(3 . 1) dates))
(not (calendar-leap-year-p (cdr date)
   (< 0 (setq years (-  (cdr date) y
  (let* ((class (or (cadr split)
bbdb-default-anniversary-format))
 (form (or (cdr (assoc class
   bbdb-anniversary-format-alist))
   class))  ; (as format string)
 (name (bbdb-record-name rec))
 (suffix (diary-ordinal-suffix years))
 (tmp (cond
   ((functionp form)
(funcall form name years suffix))
   ((listp form) (eval form))
   (t (format form name years suffix)
(if text
(setq text (append text (list tmp)))
  (setq text (list tmp
  )
(when text
  (mapconcat 'identity text "; "
  
(provide 'org-bbdb-anniv)

;;; org-bbdb-anniv.el ends here



___
Emacs

[Orgmode] Re: Todo Templates

2008-03-21 Thread Bernt Hansen
Russell Adams <[EMAIL PROTECTED]> writes:

> I completely overlooked the fact that in column mode editing an item
> with no properties creates those properties.
>
> Thats 90% of the way there.
>
> Is there a way to specify a default?

I don't know of a way to specify a default currently but I may have
missed something - org-mode has so many useful features :)

Bernt



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Todo Templates

2008-03-21 Thread Russell Adams
I completely overlooked the fact that in column mode editing an item
with no properties creates those properties.

Thats 90% of the way there.

Is there a way to specify a default?

On Fri, Mar 21, 2008 at 01:20:04PM -0400, Bernt Hansen wrote:
> Russell Adams <[EMAIL PROTECTED]> writes:
> 
> > So I'm setting up a sample project using column view to experiment
> > with durations, assignment, etc.
> >
> > I've noticed that I'm duplicating my property drawer manually, and was
> > curious if there is a way to setup a default property drawer for new
> > items or a new todo hook I can tap into.
> 
> If you use column view (C-c C-x C-c) and enter durations it creates
> property drawers in tasks that don't already have them.
> 
> There's also a function org-insert-property-drawer.
> 
> I've got the following setup:
> 
> (setq org-global-properties '(("Effort_ALL" . "0 0:10 0:30 1:00 2:00 3:00 
> 4:00 5:00 6:00 7:00 8:00")))
> (setq org-columns-default-format "%40ITEM(Task) %17Effort(Estimated 
> Effort){:} %CLOCKSUM")
> 
> and I just C-c C-x C-c on a parent task and use S-right to assign the
> effort durations to each task.
> 
> HTH,
> Bernt
> 
> 
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


--
Russell Adams[EMAIL PROTECTED]

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Todo Templates

2008-03-21 Thread Bernt Hansen
Russell Adams <[EMAIL PROTECTED]> writes:

> So I'm setting up a sample project using column view to experiment
> with durations, assignment, etc.
>
> I've noticed that I'm duplicating my property drawer manually, and was
> curious if there is a way to setup a default property drawer for new
> items or a new todo hook I can tap into.

If you use column view (C-c C-x C-c) and enter durations it creates
property drawers in tasks that don't already have them.

There's also a function org-insert-property-drawer.

I've got the following setup:

(setq org-global-properties '(("Effort_ALL" . "0 0:10 0:30 1:00 2:00 3:00 4:00 
5:00 6:00 7:00 8:00")))
(setq org-columns-default-format "%40ITEM(Task) %17Effort(Estimated Effort){:} 
%CLOCKSUM")

and I just C-c C-x C-c on a parent task and use S-right to assign the
effort durations to each task.

HTH,
Bernt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Selectively inheriting tags

2008-03-21 Thread Michael Ekstrand
Carsten Dominik <[EMAIL PROTECTED]> writes:
> Excellent idea, thank you very much.  In fact, this is an obvious
> companion to selective property inheritance.
>
> I have push the relevant changes to the git repository.

Excellent.

I just started heavily using Emacs over the last winter break, and I
must say, between this and the response to a bug report I sent to the
Gnus maintainers, I am rather impressed with the spirit of service and
helpfulness in the Emacs community, or at least the portions of it that
I've begun to watch.

Thank you for making such wonderfully useful software, and your
eagerness to make it better meet the needs of users.

- Michael

-- 
mouse, n: A device for pointing at the xterm in which you want to type.



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Todo Templates

2008-03-21 Thread Russell Adams
One more. ;]

So I'm setting up a sample project using column view to experiment
with durations, assignment, etc.

I've noticed that I'm duplicating my property drawer manually, and was
curious if there is a way to setup a default property drawer for new
items or a new todo hook I can tap into.

Thanks.

--
Russell Adams[EMAIL PROTECTED]

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Inactive Timestamps

2008-03-21 Thread Russell Adams
I routinely use inactive timestamps during long tasks to document when
items occurred. I use inactive timestamps because I don't want to
litter my agenda view during normal use.

However I recently discovered the agenda timeline view, which is a
great way for me to review when things occurred. The flip side is that
I'm not seeing details because of my use of inactive timestamps.

Could a toggle be added to turn on/off viewing of inactive timestamps?
I don't want to clutter my normal agenda view, but have the ability to
turn on detail if needed.

Thanks.

--
Russell Adams[EMAIL PROTECTED]

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Add anniversary and org-mode

2008-03-21 Thread Bastien Guerry
Thomas Baumann <[EMAIL PROTECTED]> writes:

> just another question, did you include the anniversaries via inclusion
> of the diary (does work here) or directly with
> %%(bbdb-include-anniversaries) or alike?

I use this:

(add-hook 'list-diary-entries-hook 'bbdb-include-anniversaries)

-- 
Bastien


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Add anniversary and org-mode

2008-03-21 Thread Thomas Baumann
Bastien,

just another question, did you include the anniversaries via inclusion
of the diary (does work here) or directly with
%%(bbdb-include-anniversaries) or alike?

Thanks
Thomas



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Selectively inheriting tags

2008-03-21 Thread Carsten Dominik

Excellent idea, thank you very much.  In fact, this is an obvious
companion to selective property inheritance.

I have push the relevant changes to the git repository.

- Carsten

On Mar 20, 2008, at 9:11 PM, Michael Ekstrand wrote:


I'm wondering if it's currently possible to selective inherit tags.
Either to mark specific tags as inheritable/non-inheritable, or with a
regular expression match (the latter would be particularly useful - I
want my context tags, beginning with '@', inherited, but not my
unprefixed tags such as 'PROJECT').  From what I've seen in the help
files and change logs, it doesn't look like this is currently  
supported,

but I'd love to be proved wrong.

If there is no such option at present, I'd love to see it added (and  
may

hack something up for it in my own setup).

- Michael

--
mouse, n: A device for pointing at the xterm in which you want to  
type.

Confused by the strange files?  I cryptographically sign my messages.
For more information see .



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode