+ (setq org-todo-keyword-faces
+ (quote (("TODO" :foreground "red" :weight bold)
+ ("NEXT" :foreground "blue" :weight bold)
+ ("DONE" :foreground "forest green" :weight bold)
+ ("WAITING" :foreground "orange" :weight bold)
+ ("HOLD" :foreground "magenta" :weight bold)
+ ("CANCELLED" :foreground "forest green" :weight bold)
+ ;; ("MEETING" :foreground "forest green" :weight bold)
+ ;; ("PHONE" :foreground "forest green" :weight bold)
+ )))
+#+END_SRC
+
+Fast todo selections
+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (setq org-use-fast-todo-selection t)
+ (setq org-treat-S-cursor-todo-selection-as-state-change nil)
+#+END_SRC
+
+TODO state triggers and tags, [[http://doc.norang.ca/org-mode.html][Organize Your Life in Plain Text]]
+
+- Moving a task to =CANCELLED=, adds a =CANCELLED= tag
+- Moving a task to =WAITING=, adds a =WAITING= tag
+- Moving a task to =HOLD=, add =HOLD= tags
+- Moving a task to =DONE=, remove =WAITING=, =HOLD= tag
+- Moving a task to =NEXT=, remove all waiting/hold/cancelled tags
+
+This tags are used to filter tasks in agenda views
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (setq org-todo-state-tags-triggers
+ (quote (("CANCELLED" ("CANCELLED" . t))
+ ("WAITING" ("WAITING" . t))
+ ("HOLD" ("WAITING") ("HOLD" . t))
+ (done ("WAITING") ("HOLD"))
+ ("TODO" ("WAITING") ("CANCELLED") ("HOLD"))
+ ("NEXT" ("WAITING") ("CANCELLED") ("HOLD"))
+ ("DONE" ("WAITING") ("CANCELLED") ("HOLD")))))
+#+END_SRC
+
+Logging Stuff
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ ;; log time when task done
+ ;; (setq org-log-done (quote time))
+ ;; save clocking into to LOGBOOK
+ (setq org-clock-into-drawer t)
+ ;; save state change notes and time stamp into LOGBOOK drawer
+ (setq org-log-into-drawer t)
+ (setq org-clock-into-drawer "CLOCK")
+#+END_SRC
+
+*** Tags
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (setq org-tag-alist (quote ((:startgroup)
+ ("@office" . ?e)
+ ("@home" . ?h)
+ (:endgroup)
+ ("WAITING" . ?w)
+ ("HOLD" . ?h)
+ ("CANCELLED" . ?c))))
+
+ ;; Allow setting single tags without the menu
+ (setq org-fast-tag-selection-single-key (quote expert))
+#+END_SRC
+
+*** Capture - Refile - Archive
+
+Capture lets you quickly store notes with little interruption of your work flow.
+
+**** Capture Templates
+
+When a new taks needs to be added, categorize it as
+
+All captured file which need next actions are stored in =refile.org=,
+- A new task / note (t) =refile.org=
+- A work task in office =office.org=
+- A jourenl =diary.org=
+- A new habit (h) =refile.org=
+
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+ (setq org-directory "~/org")
+ (setq org-default-notes-file "~/org/refile.org")
+ (setq sd/org-diary-file "~/org/diary.org")
+
+ (global-set-key (kbd "C-c c") 'org-capture)
+
+ (setq org-capture-templates
+ (quote (("t" "Todo" entry (file org-default-notes-file)
+ "* TODO %?\n:LOGBOOK:\n- Added: %U\t\tAt: %a\n:END:")
+ ("n" "Note" entry (file org-default-notes-file)
+ "* %? :NOTE:\n:LOGBOOK:\n- Added: %U\t\tAt: %a\n:END:")
+ ("j" "Journal" entry (file+datetree sd/org-diary-file)
+ "* %?\n:LOGBOOK:\n:END:" :clock-in t :clock-resume t)
+ ("h" "Habit" entry (file org-default-notes-file)
+ "* NEXT %?\n:LOGBOOK:\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:END:\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n "))))
+#+END_SRC