Table Of Contents

1. How To Use This Document

2. License

3. Change History - What's new

4. Getting Started
4.1. Org-Mode Setup
4.2. Organizing Your Life Into Org Files
4.3. Agenda Setup
4.4. Org File Structure
4.5. Key bindings

4.1. Org-Mode Setup

4.2. Organizing Your Life Into Org Files

4.3. Agenda Setup

4.4. Org File Structure

4.5. Key bindings

5. Tasks and States
5.1. TODO keywords
5.1.1. Task States
5.2. Fast Todo Selection
5.3. TODO state triggers

5.1. TODO keywords
5.1.1. Task States

5.1.1. Task States

5.2. Fast Todo Selection

5.3. TODO state triggers

6. Adding New Tasks Quickly with Org Capture
6.1. Capture Templates
6.2. Separate file for Capture Tasks
6.3. Capture Tasks is all about being FAST

6.1. Capture Templates

6.2. Separate file for Capture Tasks

6.3. Capture Tasks is all about being FAST

7. Refiling Tasks
7.1. Refile Setup
7.2. Refiling Tasks
7.3. Refiling Notes
7.4. Refiling Phone Calls and Meetings

7.1. Refile Setup

7.2. Refiling Tasks

7.3. Refiling Notes

7.4. Refiling Phone Calls and Meetings

8. Custom agenda views
8.1. Setup
8.2. What do I work on next?
8.2.1. Why keep it all on the NEXT list?
8.3. Reading email, newsgroups, and conversations on IRC
8.4. Filtering
8.4.1. Automatically removing context based tasks with / RET

8.1. Setup

8.2. What do I work on next?
8.2.1. Why keep it all on the NEXT list?

8.2.1. Why keep it all on the NEXT list?

8.3. Reading email, newsgroups, and conversations on IRC

8.4. Filtering
8.4.1. Automatically removing context based tasks with / RET

8.4.1. Automatically removing context based tasks with / RET

9. Time Clocking
9.1. Clock Setup
9.2. Clocking in
9.2.1. Setting a default clock task
9.2.2. Using the clock history to clock in old tasks
9.3. Clock Everything - Create New Tasks
9.4. Finding tasks to clock in
9.5. Editing clock entries

9.1. Clock Setup

9.2. Clocking in
9.2.1. Setting a default clock task
9.2.2. Using the clock history to clock in old tasks

9.2.1. Setting a default clock task

9.2.2. Using the clock history to clock in old tasks

9.3. Clock Everything - Create New Tasks

9.4. Finding tasks to clock in

9.5. Editing clock entries

10. Time reporting and tracking
10.1. Billing clients based on clocked time
10.1.1. Verify that the clock data is complete and correct
10.1.2. Using clock reports to summarize time spent
10.2. Task Estimates and column view
10.2.1. Creating a task estimate with column mode
10.2.2. Saving your estimate
10.2.3. Reviewing your estimate
10.3. Providing progress reports to others

10.1. Billing clients based on clocked time
10.1.1. Verify that the clock data is complete and correct
10.1.2. Using clock reports to summarize time spent

10.1.1. Verify that the clock data is complete and correct

10.1.2. Using clock reports to summarize time spent

10.2. Task Estimates and column view
10.2.1. Creating a task estimate with column mode
10.2.2. Saving your estimate
10.2.3. Reviewing your estimate

10.2.1. Creating a task estimate with column mode

10.2.2. Saving your estimate

10.2.3. Reviewing your estimate

10.3. Providing progress reports to others

11. Tags
11.1. Tags
11.2. Filetags
11.2.1. Non-work related org-mode files
11.2.2. Work related org-mode files
11.2.3. Refile tasks
11.3. State Trigger Tags

11.1. Tags

11.2. Filetags
11.2.1. Non-work related org-mode files
11.2.2. Work related org-mode files
11.2.3. Refile tasks

11.2.1. Non-work related org-mode files

11.2.2. Work related org-mode files

11.2.3. Refile tasks

11.3. State Trigger Tags

12. Handling Notes

13. Handling Phone Calls

14. GTD stuff
14.1. Weekly Review Process
14.2. Project definition and finding stuck projects

14.1. Weekly Review Process

14.2. Project definition and finding stuck projects

15. Archiving
15.1. Archiving Subtrees
15.2. Archive Setup
15.3. Archive Tag - Hiding Information
15.4. When to Archive

15.1. Archiving Subtrees

15.2. Archive Setup

15.3. Archive Tag - Hiding Information

15.4. When to Archive

16. Publishing and Exporting
16.1. New Exporter Setup
16.1.1. Conversion from the old exporter to the new exporter
16.2. Org-babel Setup
16.3. Playing with ditaa
16.4. Playing with graphviz
16.5. Playing with PlantUML
16.5.1. Sequence Diagram
16.5.2. Activity Diagram
16.5.3. Usecase Diagram
16.5.4. Object Diagram
16.5.5. State Diagram
16.6. Publishing Single Files
16.7. Publishing Projects
16.8. Miscellaneous Export Settings
16.8.1. Fontify Latex listings for source blocks
16.8.2. Export HTML without XML header
16.8.3. Allow binding variables on export without confirmation

16.1. New Exporter Setup
16.1.1. Conversion from the old exporter to the new exporter

16.1.1. Conversion from the old exporter to the new exporter

16.2. Org-babel Setup

16.3. Playing with ditaa

16.4. Playing with graphviz

16.5. Playing with PlantUML
16.5.1. Sequence Diagram
16.5.2. Activity Diagram
16.5.3. Usecase Diagram
16.5.4. Object Diagram
16.5.5. State Diagram

16.5.1. Sequence Diagram

16.5.2. Activity Diagram

16.5.3. Usecase Diagram

16.5.4. Object Diagram

16.5.5. State Diagram

16.6. Publishing Single Files

16.7. Publishing Projects

16.8. Miscellaneous Export Settings
16.8.1. Fontify Latex listings for source blocks
16.8.2. Export HTML without XML header
16.8.3. Allow binding variables on export without confirmation

16.8.1. Fontify Latex listings for source blocks

16.8.2. Export HTML without XML header

16.8.3. Allow binding variables on export without confirmation

17. Reminders
17.1. Reminder Setup

17.1. Reminder Setup

18. Productivity Tools
18.1. Abbrev-mode and Skeletons
18.1.1. Example PlantUml Activity Diagram Generation
18.2. Focus On Current Work
18.2.1. Narrowing to a subtree with bh/org-todo
18.2.2. Limiting the agenda to a subtree
18.2.3. Limiting the agenda to a file
18.3. Tuning the Agenda Views
18.3.1. Highlight the current agenda line
18.3.2. Keep tasks with timestamps visible on the global todo lists
18.3.3. Use the Diary for Holidays and Appointments
18.3.4. Searches include archive files
18.3.5. Agenda view tweaks
18.3.6. Sticky Agendas
18.4. Checklist handling
18.5. Backups
18.6. Handling blocked tasks
18.7. Org Task structure and presentation
18.7.1. Controlling display of leading stars on headlines
18.7.2. org-indent mode
18.7.3. Handling blank lines
18.7.4. Adding new tasks quickly without disturbing the current task content
18.7.5. Notes at the top
18.7.6. Searching and showing results
18.7.7. Editing and Special key handling
18.8. Attachments
18.9. Deadlines and Agenda Visibility
18.10. Exporting Tables to CSV
18.11. Minimize Emacs Frames
18.12. Logging stuff
18.13. Limiting time spent on tasks
18.14. Habit Tracking
18.15. Habits only log DONE state changes
18.16. Auto revert mode
18.17. Handling Encryption
18.17.1. Auto Save Files
18.18. Speed Commands
18.19. Org Protocol
18.20. Require a final newline when saving files
18.21. Insert inactive timestamps and exclude from export
18.22. Return follows links
18.23. Highlight clock when running overtime
18.24. Meeting Notes
18.25. Remove Highlights after changes
18.26. Getting up to date org-mode info documentation
18.27. Prefer future dates or not?
18.28. Automatically change list bullets
18.29. Remove indentation on agenda tags view
18.30. Fontify source blocks natively
18.31. Agenda persistent filters
18.32. Add tags for flagged entries
18.33. Mail links open compose-mail
18.34. Composing mail from org mode subtrees
18.35. Use smex for M-x ido-completion
18.36. Use Emacs bookmarks for fast navigation
18.37. Using org-mime to email
18.38. Remove multiple state change log details from the agenda
18.39. Drop old style references in tables
18.40. Use system settings for file-application selection
18.41. Use the current window for the agenda
18.42. Delete IDs when cloning
18.43. Cycling plain lists
18.44. Showing source block syntax highlighting
18.45. Inserting Structure Template Blocks
18.46. NEXT is for tasks
18.47. Startup in folded view
18.48. Allow alphabetical list entries
18.49. Using orgstruct mode for mail
18.50. Using flyspell mode to reduce spelling errors
18.51. Preserving source block indentation
18.52. Prevent editing invisible text
18.53. Use utf-8 as default coding system
18.54. Keep clock durations in hours
18.55. Create unique IDs for tasks when linking

18.1. Abbrev-mode and Skeletons
18.1.1. Example PlantUml Activity Diagram Generation

18.1.1. Example PlantUml Activity Diagram Generation

18.2. Focus On Current Work
18.2.1. Narrowing to a subtree with bh/org-todo
18.2.2. Limiting the agenda to a subtree
18.2.3. Limiting the agenda to a file

18.2.1. Narrowing to a subtree with bh/org-todo

18.2.2. Limiting the agenda to a subtree

18.2.3. Limiting the agenda to a file

18.3. Tuning the Agenda Views
18.3.1. Highlight the current agenda line
18.3.2. Keep tasks with timestamps visible on the global todo lists
18.3.3. Use the Diary for Holidays and Appointments
18.3.4. Searches include archive files
18.3.5. Agenda view tweaks
18.3.6. Sticky Agendas

18.3.1. Highlight the current agenda line

18.3.2. Keep tasks with timestamps visible on the global todo lists

18.3.3. Use the Diary for Holidays and Appointments

18.3.4. Searches include archive files

18.3.5. Agenda view tweaks

18.3.6. Sticky Agendas

18.4. Checklist handling

18.5. Backups

18.6. Handling blocked tasks

18.7. Org Task structure and presentation
18.7.1. Controlling display of leading stars on headlines
18.7.2. org-indent mode
18.7.3. Handling blank lines
18.7.4. Adding new tasks quickly without disturbing the current task content
18.7.5. Notes at the top
18.7.6. Searching and showing results
18.7.7. Editing and Special key handling

18.7.1. Controlling display of leading stars on headlines

18.7.2. org-indent mode

18.7.3. Handling blank lines

18.7.4. Adding new tasks quickly without disturbing the current task content

18.7.5. Notes at the top

18.7.6. Searching and showing results

18.7.7. Editing and Special key handling

18.8. Attachments

18.9. Deadlines and Agenda Visibility

18.10. Exporting Tables to CSV

18.11. Minimize Emacs Frames

18.12. Logging stuff

18.13. Limiting time spent on tasks

18.14. Habit Tracking

18.15. Habits only log DONE state changes

18.16. Auto revert mode

18.17. Handling Encryption
18.17.1. Auto Save Files

18.17.1. Auto Save Files

18.18. Speed Commands

18.19. Org Protocol

18.20. Require a final newline when saving files

18.21. Insert inactive timestamps and exclude from export

18.22. Return follows links

18.23. Highlight clock when running overtime

18.24. Meeting Notes

18.25. Remove Highlights after changes

18.26. Getting up to date org-mode info documentation

18.27. Prefer future dates or not?

18.28. Automatically change list bullets

18.29. Remove indentation on agenda tags view

18.30. Fontify source blocks natively

18.31. Agenda persistent filters

18.32. Add tags for flagged entries

18.33. Mail links open compose-mail

18.34. Composing mail from org mode subtrees

18.35. Use smex for M-x ido-completion

18.36. Use Emacs bookmarks for fast navigation

18.37. Using org-mime to email

18.38. Remove multiple state change log details from the agenda

18.39. Drop old style references in tables

18.40. Use system settings for file-application selection

18.41. Use the current window for the agenda

18.42. Delete IDs when cloning

18.43. Cycling plain lists

18.44. Showing source block syntax highlighting

18.45. Inserting Structure Template Blocks

18.46. NEXT is for tasks

18.47. Startup in folded view

18.48. Allow alphabetical list entries

18.49. Using orgstruct mode for mail

18.50. Using flyspell mode to reduce spelling errors

18.51. Preserving source block indentation

18.52. Prevent editing invisible text

18.53. Use utf-8 as default coding system

18.54. Keep clock durations in hours

18.55. Create unique IDs for tasks when linking

19. Things I Don't Use (Anymore)
19.1. Archive Sibling
19.2. Strike-through emphasis
19.3. Subscripts and Superscripts
19.4. Yasnippet
19.5. Show headings at odd levels only or odd-even levels
19.6. Propagate STARTED to parent tasks
19.7. Automatically clocking tasks
19.8. q buries the agenda view buffer
19.9. Task Priorities

19.1. Archive Sibling

19.2. Strike-through emphasis

19.3. Subscripts and Superscripts

19.4. Yasnippet

19.5. Show headings at odd levels only or odd-even levels

19.6. Propagate STARTED to parent tasks

19.7. Automatically clocking tasks

19.8. q buries the agenda view buffer

19.9. Task Priorities

20. Using Git for Automatic History, Backups, and Synchronization
20.1. Automatic Hourly Commits
20.1.1. ~/bin/org-git-sync.sh
20.2. Git - Edit files with confidence
20.3. Git Repository synchronization

20.1. Automatic Hourly Commits
20.1.1. ~/bin/org-git-sync.sh

20.1.1. ~/bin/org-git-sync.sh

20.2. Git - Edit files with confidence

20.3. Git Repository synchronization

Org-mode is a fabulous organizational tool originally built by Carsten Dominik that operates on plain text files. Org-mode is part of Emacs.

1. How To Use This Document

This document assumes you've had some exposure to org-mode already so concepts like the agenda, capture mode, etc. won't be completely foreign to you. More information about org-mode can be found in the Org-Mode Manual and on the Worg Site.

I have been using org-mode as my personal information manager for years now. I started small with just the default TODO and DONE keywords. I added small changes to my workflow and over time it evolved into what is described by this document.

I still change my workflow and try new things regularly. This document describes mature workflows in my current org-mode setup. I tend to document changes to my workflow 30 days or more after implementing them (assuming they are still around at that point) so that the new workflow has a chance to mature.

Some of the customized Emacs settings described in this document are set at their default values. This explicitly shows the setting for important org-mode variables used in my workflow and to keep my workflow behaviour stable in the event that the default value changes in the future.

This document is available as an org file which you can load in Emacs and tangle with C-c C-v C-t which will create org-mode.el in the same directory as the org-mode.org file. This will extract all of the elisp examples in this document into a file you can include in your .emacs file.

2. License

This document http://doc.norang.ca/org-mode.html (either in its HTML format or in its Org format) is licensed under the GNU Free Documentation License version 1.3 or later (http://www.gnu.org/copyleft/fdl.html).

The code examples and CSS stylesheets are licensed under the GNU General Public License v3 or later (http://www.gnu.org/licenses/gpl.html).

3. Change History - What's New

This is version 2023.05-1-ga8dff of this document. This document is created using the publishing features of org-mode 9.7.15.

The source for this document can be found as a plain text org


<think>
Now I have a comprehensive understanding of this article. Let me provide a thorough summary.

This is a very famous article - "Org Mode - Organize Your Life In Plain Text!" by Bernt Hansen ( bernt@norang.ca). It describes how to use Org-mode as a complete personal information management (PIM) system based on GTD (Getting Things Done) methodology. It's one of the most well-known Org-mode tutorials.

Key sections:
1. Getting Started - setup and org files structure
2. Tasks and States - TODO keywords, task states
3. Capture - quickly adding new tasks

4. Refiling - moving tasks to proper locations
5. Custom agenda views - what to work on next
6. Time Clocking - tracking time spent
7. Time reporting and tracking - billing clients, estimates
8. Tags - organizing and filtering
9. Handling Notes
10. Handling Phone Calls
11. GTD stuff - weekly review, projects
12. Archiving - archiving completed tasks
13. Publishing and Exporting - exporting to various formats
14. Reminders
15. Productivity Tools
16. Things I Don't Use
17. Using Git for backup and sync
</think>

主公，此乃** Emacs 圈最负盛名的 Org-mode 实战教程**，亮为您呈上完整总结。

---

## 文章总结：Org Mode - Organize Your Life In Plain Text!

**作者：** Bernt Hansen
**来源：** [doc.norang.ca/org-mode.html](http://doc.norang.ca/org-mode.html)
**性质：** 开源文档（GFDL 许可证），提供 `.org` 源文件下载
**篇幅：** 20 个大章节，逾百个子章节，堪称 Org-mode 百科全书

---

### 一、核心定位

> **"Org-mode is a fabulous organizational tool...that operates on plain text files."**

作者将 Org-mode 打造成一套完整的**个人信息系统（Personal Information Manager）**，基于 **GTD（Getting Things Done）** 方法论，用纯文本管理工作与生活的一切。

---

### 二、核心架构：GTD 闭环

```
收集(Capture) → 整理(Refile) → 执行(Clock) → 回顾(Review) → 归档(Archive)
                    ↓
              项目管理(Projects)
                    ↓
              Agenda 视图（今日任务）
```

---

### 三、核心模块详解

#### ① 任务状态（Tasks and States）

采用 TODO → NEXT → DONE 状态机：

| 状态 | 含义 | 触发动作 |
|------|------|---------|
| `TODO` | 待处理 | 可设置时间戳/截止日期 |
| `NEXT` | 即将执行 | 只用于下一个要做的任务 |
| `STARTED` | 开始中 | 自动 clock 计时开始 |
| `DONE` | 已完成 | 自动记录完成时间 |
| `WAITING` | 等待中 | 等待外部依赖 |
| `CANCELLED` | 已取消 | 归档 |

**状态触发器：** 完成子任务时自动更新父任务状态。

#### ② 快速收集（Org Capture）

```
全局快捷键 → 弹出 Capture 模板 → 记录任务/笔记 → 自动归档到 Inbox
```

核心原则：**天下武功，唯快不破**——捕获任务必须小于 30 秒，否则人会放弃记录。

#### ③ 任务整理（Refiling）

新任务进入 Inbox 后，通过 `C-c C-w` 快速重新分类到：
- 项目（Projects）
- 上下文（Contexts）
- someday/maybe

#### ④ 自定义 Agenda 视图

核心问题：**"What do I work on next?"**

Agenda 通过标签/时间/状态过滤，呈现：
- 今日待办
- 本周日程
-  stuck projects（卡住的项目）

**NEXT 列表原则：** 所有"即将执行"的任务集中在一处，不分散在各个项目中。

#### ⑤ 时间追踪（Time Clocking）

```
C-c C-x C-i  → 开始计时
C-c C-x C-o  → 停止计时
```

- 可记录每个任务花费的时间
- 自动生成时间报告（可用于客户计费）
- 支持任务预估时间（Column View）

#### ⑥ GTD 每周回顾

```
收集（Inbox）→ 整理（Refile）→ 清除（Clean）
→ 检查（Review）→ 计划（Plan）
```

#### ⑦ 归档（Archiving）

完成的任务子树移入 `*_archive.org` 文件，保持主文件精简，同时保留完整历史。

#### ⑧ 出版与导出（Publishing）

Org-mode 内置导出器，可将 `.org` 文件导出为：
- HTML（静态网站）
- LaTeX / PDF
- Markdown
- 并支持 PlantUML、Graphviz、ditaa 等图表演示

#### ⑨ Git 版本控制

```
每小时自动提交 → Git 同步 → 历史记录永不丢失
```

---

### 四、Org 文件结构

作者建议按生活领域分文件：

```
TODO: 工作项目
projects.org     → 所有项目
tasks.org        → 杂项任务
tickler.org      → 提醒事项
calendar.org     → 日历/约会
notes.org        → 笔记
@home.org        → 家庭事务
@computer.org    → 电脑相关
```

---

### 五、关键特色功能

| 功能 | 说明 |
|------|------|
| **Habit Tracking** | 习惯追踪（周期性任务） |
| **Attachments** | 附件管理 |
| **Org Protocol** | 外部链接触发 Capture |
| **Encryption** | 内容加密 |
| **Speed Commands** | 快捷键导航 |
| **Checklist** | 任务清单勾选 |
| **Column View** | 任务预估与实际对比 |
| **Tags + Filetags** | 跨文件标签分类 |

---

### 六、文章风格与价值

- **作者历程**：从"小改动 → 逐步迭代"，历时多年打磨
- **实操导向**：每个功能都有具体 Elisp 配置代码
- **文档本身即 Org 文件**：可用 `C-c C-v C-t` 导出为配置脚本
- **开源精神**：GPL + GFDL 双许可证，可自由使用修改

---

### 七、总结

此文将 Org-mode 从一个** Emacs 编辑器插件**升华为一整套**人生管理系统**。核心哲学：

> **一切皆文本，文本即永恒。**

用纯文本 + GTD 方法论 + Org-mode，实现：
- ✅ 任务管理（替代 OmniFocus）
- ✅ 时间追踪（替代 Clockify）
- ✅ 知识笔记（替代 OneNote）
- ✅ 项目管理（替代各类项目管理软件）
- ✅ 网站出版（替代静态博客工具）

**门槛**：需熟悉 Emacs（约一年以上），学习曲线陡峭，但一旦掌握则终身受益。

臣等正欲死战，陛下何故先降！？