RSS | Source | License

Organize Life with Org Mode

Table of Contents

Some references

Org Agenda


Set a todo file:

(setq org-agenda-files (list moon-todo-file))

Set some TODO keywords:

(setq org-todo-keywords
      '((sequence "TODO"

Keywords after the bar is considered finished state. I set a custom "defer" face so it doesn't stand out (as it shouldn't):

(setq org-todo-keyword-faces
      '(("DEFER" . (:inherit default :weight bold))))

Agenda view

Add a custom view:

(setq org-agenda-custom-commands
      '(("d" "Default Agenda View"
         ((agenda "")
          (todo ""
                ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline))
                 (org-agenda-overriding-header "Unscheduled/deadline tasks:")))))))

This view skips todo entries that are marked "scheduled" and "deadline", because they appear in agenda view already. My current agenda looks like

Week-agenda (W51):
Monday     17 December 2018 W51
  Other:      Scheduled:  DONE [#A] Write to professors
Tuesday    18 December 2018
Wednesday  19 December 2018
Thursday   20 December 2018
Friday     21 December 2018
Saturday   22 December 2018
Sunday     23 December 2018

Unscheduled/deadline tasks:
  Other:      TODO [#A] resend pencil to sister alice
  Emacs:      TODO blog on org agenda
  Emacs:      DEFER moon shape based on day in month
  Emacs:      TODO Revise magic-font-book
  School:     WAIT Rent house for Spring
  Other:      TODO album list
  Other:      TODO 汉服资料
  Other:      TODO 完成财产目录
  Other:      TODO 完成好东西目录
  Other:      TODO Read about Maude programming lang
  Other:      TODO blog about uikit
  Other:      TODO blog about lodge skillet
  Other:      TODO read http://www.paulgraham.com/rootsoflisp.html
  Other:      TODO 用Common Lisp实现照片日志系统,ditch Apple Notes
  Other:      TODO blog: shrink code font size, fix code wrap
  Other:      TODO read art of meta
  Other:      TODO read on lisp
  Other:      TODO read GEB (book)
  Other:      TODO read little typer
  Other:      TODO [#C] take photo for album arts
  Other:      DEFER [#C] collapse for blog
  Other:      DEFER [#C] Embroidery
  Other:      DEFER [#C] twitter cwraler

Noticed the [#A]'s? They are priorities. (manual node) I set custom faces to them:

(setq org-priority-faces
      '((?A . (:inherit font-lock-warning-face))
        (?B . (:inherit default))
        (?C . (:inherit font-lock-comment-face))))

You can also add categories to you todo headers, Emacs, Other, School are my categories. Categories are just header properties, this is the "Emacs" header of my TODO file.

* Emacs


Some useful default bindings:

Key Description
C-c C-s schedule
C-c C-d set deadline
S-<left>/<right> shift TODO state
t (in agenda) toggle TODO state
S-<up>/<down> shift priorities

Org Capture

I use it to quickly add entries to my TODO file. Here is my setup:

(setq org-default-notes-file "~/note/index.org")
(setq org-capture-templates
      (append org-capture-templates
              `(("t" "TODOs")
                ("te" "Emacs" entry (file+olp "~/note/todo.org" "Emacs") "*** TODO %?")
                ("th" "Homework" entry (file+olp "~/note/todo.org" "Homework") "*** TODO %?")
                ("to" "Other" entry (file+olp "~/note/todo.org" "Other") "*** TODO %?")
                ("ts" "School" entry (file+olp "~/note/todo.org" "School") "*** TODO %?")

org-capture-templates's documentation is easy to follow, the file+olp part is like (file+olp file-path header1 sub-header2 sub-sub-header3 ...).

Written by Yuan Fu

First Published on 2018-11-26 Mon 00:00

Last modified on 2020-09-12 Sat 16:10

Send your comment to archive.casouri.cat@gmail.com