Yanyg - Software Engineer

Getting Things Done

目录

开始玩儿EMACS是因为Org GTD。GTD工作流程主要包括下面几部分:

Capture
记录想法
Agenda
查看计划
Clock
记录时间花费
State
TODO/DONE状态转换
Refile
调整结构
Archive
结束归档

1 配置

1.1 directory

设置GTD工作目录文件: ~/docs/gtd:

(defconst y/org-directory (expand-file-name "~/docs")
  "Directory for org mode.")
(defvar y/gtd-directory (concat y/org-directory "/gtd")
  "Getting things done directory.")
(defun y/gtd-file-meeting()
  "GTD filename for meeting."
  (concat y/gtd-directory "/meeting.org"))
(defun y/gtd-file-code()
  "GTD filename for code."
  (concat y/gtd-directory "/code.org"))

(defun y/gtd-file-idea()
  "GTD filename for idea."
  (concat y/gtd-directory "/idea.org"))

(defun y/gtd-file-blog()
  "GTD filename for blog."
  (concat y/gtd-directory "/blog.org"))

(defun y/gtd-file-task()
  "GTD filename for task."
  (concat y/gtd-directory "/task.org"))

(defvar y/gtd-file-archive
  "GTD filename for refile."
  (concat y/gtd-directory "/archive.org"))

1.2 variable

  • 使用相对路径
  • 设置时间格式
  • 如果设置LANG/LC_CTYPE是zh_CN.UTF-8,设置 system-time-locale 依然使用英文格式时间
(setq system-time-locale "C") ;; show english date even LANG to zh_CN.UTF-8
(setq-default org-display-custom-times t)
(setq org-src-fontify-natively t
      org-adapt-indentation nil
      org-link-file-path-type 'relative
      org-support-shift-select t
      org-directory y/org-directory
      org-default-notes-file (concat y/org-directory "/notes.org")
      org-agenda-files (list y/gtd-directory
                             org-default-notes-file)
      org-refile-targets '((org-agenda-files :maxlevel . 3))
      ;; org-refile-targets '((y/gtd-file-archive :maxlevel . 3))
      org-time-stamp-custom-formats '("<%F %a>" .
                                      "<%F %a %H:%M>"))

2 任务类型

From https://www.zhihu.com/question/20247508:

  • 重要紧急:救火
  • 重要不紧急:规划
  • 不重要但紧急:琐事
  • 不重要不紧急:休闲

2.1 capture template

(setq org-capture-templates
      '(("m" "Meeting" entry
         (file+headline y/gtd-file-meeting "Meetings")
         "* %?\nSCHEDULED: %^T\nFrom: %a\n:END:\n")
        ("c" "Code" entry
         (file+headline y/gtd-file-code "CodeRef")
         "* %?\n%a\n:END:\n")
        ("i" "Idea" entry
         (file+headline y/gtd-file-idea "Ideas")
         "* %?\nSCHEDULED: %T\n:END:\n")
        ("b" "Blog" entry
         (file+headline y/gtd-file-blog "Blogs")
         "* %?\nSCHEDULED: %T\n:END:\n")
        ("t" "Task" entry
         (file+headline y/gtd-file-task "Tasks")
         "* %?\nSCHEDULED: %T\n:END:\n")))

2.2 keybinding

(y/keymap-set-key (kbd "C-c c") #'org-capture)
(y/keymap-set-key (kbd "C-c a") #'org-agenda)
(y/keymap-set-key (kbd "C-c t") #'org-insert-structure-template)

3 使用

  • Capture: C-c c
  • Agenda: C-c a

Agenda Example:

Friday     27 November 2020
Saturday   28 November 2020
               8:00...... ----------------
              10:00...... ----------------
              12:00...... ----------------
              14:00...... ----------------
  archive:    15:35......
              16:00...... ----------------
  task:       17:04...... Scheduled:  TODO Read paper dynamo
              18:00...... ----------------
              20:00...... ----------------
              23:37...... now - - - - - - - - - - - - - - - - - - - - - - - - -
  notes:      Scheduled:  TODO Summary GFS key points
  notes:      In   2 d.:  TODO Summary GFS key points
Sunday     29 November 2020
  notes:      12:19...... Scheduled:  MEETING to discuss HDFS

4 Reference