Skip to content

Org-mode TODO statesλ︎

Show progress by adding TODO states to the headings of an .org document. The default states are TODO DOING and DONE. States can be added to any org document by simply typing them, or using commands to cycle through the states.

, t calls org-todo which cycles through all the TODO states for the current heading. If the current line is not a heading, the parent heading is updated.

, L or Shift+Right (org-shiftright) move the current TODO state forward to the next. , H or Shift+Left move to the previous TODO states.

Custom TODO Statesλ︎

A custom set of states can be configured, although it seems useful to keep the defaults and simply add custom states.

Practicalli/spacemacs.d includes a simple kanban style of states. The | character denotes closed TODO states.

In dotspacemacs/user-config in the .spacemacs file, define states and workflow for all .org files

  (with-eval-after-load 'org
    (setq org-todo-keywords
         '((sequence "TODO" "DOING" "BLOCKED" "REVIEW" "|" "DONE" "ARCHIVED"))))
Use with-eval-after-load as a hook to call this setting when org-mode is first run by Spacemacs.

Automatically log completion date-timeλ︎

Commands can be triggered when entering a specific TODO state.

To add a closed: property with current date-time stamp when the status is DONE. Changing the status will remove the closed property.

  (with-eval-after-load 'org
    (setq org-log-done 'time))

Custom colors (faces)λ︎

Using colors for the TODO states makes them easier to distinguish, especially in a long list of items.

org-todo-keyword-faces is a defcustom function for setting colors for the TODO state faces. Using the X11 color names gives colours that are easy to notice but are not to strong.

In dotspacemacs/user-config in the .spacemacs file, add following to configure custom colors

  (with-eval-after-load 'org
    (setq org-todo-keyword-faces
         '(("todo" . "SlateGray")
           ("doing" . "DarkOrchid")
           ("blocked" . "Firebrick")
           ("review" . "Teal")
           ("done" . "ForestGreen")
           ("archived" .  "SlateBlue"))))

Theme faces may over-ride your custom color settings

Space h d F will list all the faces used with the current buffer. RET on a face name to find out where it is defined.

Use the `SPC SPC customize` command to explore and change faces

colour names such as `green`, `blue`, `yellow` are easier to undertand than colour codes, such as `#242424`

Automatically log completion date-timeλ︎

When a heading status enters DONE, add a closed: property with current date-time stamp

  (with-eval-after-load 'org
    (setq org-log-done 'time))