这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
blog:ease:org-mode简明教程 [12:46 - 03月27日] ease [Org-mode 简明教程【转载】] |
blog:ease:org-mode简明教程 [03:42 - 09月02日] (当前版本) |
||
---|---|---|---|
行 1: | 行 1: | ||
- | =======Org-mode 简明教程【转载】======= | + | ====== Org-mode 简明教程 ====== |
- | Original Version: http:// | + | |
- | 中文版:水木社区:发信人: | + | 【转载】Original Version: |
+ | 中文版:水木社区:发信人: | ||
+ | |||
+ | > 博主注:本教程讲述了org-mode 的入门和概要的使用。内容面比较宽,但内容太过「简明」初学者看过本教程,可以对org-mode有个整体的了解。但是要想使用好,最好结合其他《参考手册》类的org-mode文档。< | ||
- | > 博主注:本教程讲述了org-mode 的入门和概要的使用。内容面比较宽,但内容太过「简明」 | ||
- | > 初学者看过本教程,可以对org-mode有个整体的了解。但是要想使用好,最好结合其他 | ||
- | > 《参考手册》类的org-mode文档。 | ||
====== 简介 ====== | ====== 简介 ====== | ||
行 12: | 行 12: | ||
Org-mode is a personal information management and outlining tool for Emacs. This document is intended to give the reader a " | Org-mode is a personal information management and outlining tool for Emacs. This document is intended to give the reader a " | ||
- | **Update** | + | **Update** |
Org-Mode是为Emacs编写的个人信息管理以及编写大纲的工具。本文档将使用逐步的用法 说明和丰富的截图,教给读者Org-Mode基本的应用,让读者对它有基本的认识。本文不是 官方手册的替代品,只涵盖了Org-Mode的特性的一个子集。 | Org-Mode是为Emacs编写的个人信息管理以及编写大纲的工具。本文档将使用逐步的用法 说明和丰富的截图,教给读者Org-Mode基本的应用,让读者对它有基本的认识。本文不是 官方手册的替代品,只涵盖了Org-Mode的特性的一个子集。 | ||
行 41: | 行 41: | ||
(define-key global-map " | (define-key global-map " | ||
(setq org-log-done t) | (setq org-log-done t) | ||
- | |||
</ | </ | ||
- | This will make sure org gets loaded, and some basic global key combinations are defined. We'll go over what " | + | |
+ | | ||
这样,就能加载Org-Mode并且定义了它的快捷键。我们将在本文档讲述org-store-link 和org-agenda两种模式。 | 这样,就能加载Org-Mode并且定义了它的快捷键。我们将在本文档讲述org-store-link 和org-agenda两种模式。 | ||
- | One more thing---it's best to set aside a separate directory where your org files will be kept. I recommend using ~/org. | + | One more thing—it's best to set aside a separate directory where your org files will be kept. I recommend using ~/org. |
另外,最好用一个独立的目录来放你的org文件。我推荐用~/ | 另外,最好用一个独立的目录来放你的org文件。我推荐用~/ | ||
行 87: | 行 87: | ||
在Org-Mode里,所有的TODO项目都是以标题形式存在。我现在输入一个TODO项目: "Start new org file for tutorial." | 在Org-Mode里,所有的TODO项目都是以标题形式存在。我现在输入一个TODO项目: "Start new org file for tutorial." | ||
- | http:// | + | [[http:// |
This is a bit silly, because we've already started a new file. So, let's mark the TODO item DONE by moving the cursor onto that line and hitting C-c C-t, which runs the command org-todo. | This is a bit silly, because we've already started a new file. So, let's mark the TODO item DONE by moving the cursor onto that line and hitting C-c C-t, which runs the command org-todo. | ||
行 95: | 行 95: | ||
Here is the result: | Here is the result: | ||
- | 这里是结果: http:// | + | 这里是结果: |
Notice how org-mode uses a timestamp to record when a TODO item was closed. | Notice how org-mode uses a timestamp to record when a TODO item was closed. | ||
行 103: | 行 103: | ||
Let's add some more TODO items. Position the cursor on the next line, and hit M-shift-RET to call org-insert-todo-heading. You can hit it several times to add several TODOs. | Let's add some more TODO items. Position the cursor on the next line, and hit M-shift-RET to call org-insert-todo-heading. You can hit it several times to add several TODOs. | ||
- | 让我们输入更多的TODO项目。光标移到下一行,按Meta-Shift-Enter,调出 org-insert-todo-heading,按多若干次,就能加入若干个TODO项目了。 http:// | + | 让我们输入更多的TODO项目。光标移到下一行,按Meta-Shift-Enter,调出 org-insert-todo-heading,按多若干次,就能加入若干个TODO项目了。 |
===== 使用“标题”功能建构一篇文档 ===== | ===== 使用“标题”功能建构一篇文档 ===== | ||
行 119: | 行 119: | ||
Here is what it looked like after I finished outlining the document: | Here is what it looked like after I finished outlining the document: | ||
- | 我完成本文档的大纲后,效果如下图: http:// | + | 我完成本文档的大纲后,效果如下图: |
Notice I marked " | Notice I marked " | ||
行 131: | 行 131: | ||
You can easily add body text underneath any headline. | You can easily add body text underneath any headline. | ||
- | 你能在任何标题的下面加入正文。 http:// | + | 你能在任何标题的下面加入正文。 |
===== 到其他地方的链接 ===== | ===== 到其他地方的链接 ===== | ||
行 143: | 行 143: | ||
< | < | ||
[[link][ description ]] | [[link][ description ]] | ||
- | |||
</ | </ | ||
- | Watch how I first type the link and description, | ||
- | 看我是怎样输入这个链接和它的描述,不输入最后的半边方括号: http:// | + | Watch how I first type the link and description, |
+ | |||
+ | 看我是怎样输入这个链接和它的描述,不输入最后的半边方括号: | ||
Then when I type the last bracket, the link " | Then when I type the last bracket, the link " | ||
- | 然后我输入这半边方括号,该链接消失,只显示它的描述。 http:// | + | 然后我输入这半边方括号,该链接消失,只显示它的描述。 |
Try moving the cursor over the link and press C-c C-o for org-open-at-point. | Try moving the cursor over the link and press C-c C-o for org-open-at-point. | ||
行 157: | 行 157: | ||
移动光标到该链接上,按Ctrl-c和Ctrl-o,调用org-open-at-point。 | 移动光标到该链接上,按Ctrl-c和Ctrl-o,调用org-open-at-point。 | ||
- | You can also link to local files. Try visiting another file ---for example, your emacs initialization file. Then hit C-c l to call org-store-link. You'll see a message that a link was stored to the current location in the file you're visiting. | + | You can also link to local files. Try visiting another file —for example, your emacs initialization file. Then hit C-c l to call org-store-link. You'll see a message that a link was stored to the current location in the file you're visiting. |
你也能链接到本地文件。试试看浏览另外一个文件,比如说你的emacs初始化文件 (.emacs),然后连续按Ctrl-c和l键调用org-store-link。你会看到一条信息, 说已经把你正在浏览的文件中的位置存为一个链接。 | 你也能链接到本地文件。试试看浏览另外一个文件,比如说你的emacs初始化文件 (.emacs),然后连续按Ctrl-c和l键调用org-store-link。你会看到一条信息, 说已经把你正在浏览的文件中的位置存为一个链接。 | ||
行 171: | 行 171: | ||
By this time, my document is getting longer and I can no longer fit it all on one screen. Org-mode makes it easy to get an overview of your document by pressing shift-TAB. | By this time, my document is getting longer and I can no longer fit it all on one screen. Org-mode makes it easy to get an overview of your document by pressing shift-TAB. | ||
- | 这时,我的文档更长了,一个屏幕容纳不下它的全部内容。使用shift-tab这个组合键, Org-Mode能让你更容易了解你的文档的概要。 http:// | + | 这时,我的文档更长了,一个屏幕容纳不下它的全部内容。使用shift-tab这个组合键, Org-Mode能让你更容易了解你的文档的概要。 |
Notice that just the top-level headings are shown. You can hit shift-TAB again to show all headings, including TODO items: | Notice that just the top-level headings are shown. You can hit shift-TAB again to show all headings, including TODO items: | ||
- | 需要注意的是只会显示最高层的标题。再次按下shift-tab的组合键,所有的标题和 TODO项目就会显示出来: http:// | + | 需要注意的是只会显示最高层的标题。再次按下shift-tab的组合键,所有的标题和 TODO项目就会显示出来: |
Then hit it again to show a normal view of the document, with section bodies shown: | Then hit it again to show a normal view of the document, with section bodies shown: | ||
- | 然后,再按这个组合键,显示正常情况的,包含各个章节的整个文档: http:// | + | 然后,再按这个组合键,显示正常情况的,包含各个章节的整个文档: |
===== 给任务加注说明 ===== | ===== 给任务加注说明 ===== | ||
行 189: | 行 189: | ||
你能把你所需要的尽可能多的文字放在一个TODO项目的标题之后。甚至,你能把副标题 放在一个TODO项目的下面,把TODO项目嵌套起来。 | 你能把你所需要的尽可能多的文字放在一个TODO项目的标题之后。甚至,你能把副标题 放在一个TODO项目的下面,把TODO项目嵌套起来。 | ||
- | Being able to annotate tasks makes it easy to collect related links and thoughts along with a task. Being able to nest tasks is great for modeling workflow---quite often, a larger task is broken into smaller subtasks you want to check off as you do them. | + | Being able to annotate tasks makes it easy to collect related links and thoughts along with a task. Being able to nest tasks is great for modeling workflow—quite often, a larger task is broken into smaller subtasks you want to check off as you do them. |
对任务进行注释,让收集和处理和某个任务相关的链接和想法更容易。任务的层次化嵌套 对工作流程的模式化很有帮助――通常,一个大的任务会细分为更小的,可以逐项完成的 子任务供你察看。 | 对任务进行注释,让收集和处理和某个任务相关的链接和想法更容易。任务的层次化嵌套 对工作流程的模式化很有帮助――通常,一个大的任务会细分为更小的,可以逐项完成的 子任务供你察看。 | ||
行 209: | 行 209: | ||
首先,你必须设置变量org-agenda-files,以便让Org-Mode知道在哪些文件 里搜寻TODO和计划项目。 | 首先,你必须设置变量org-agenda-files,以便让Org-Mode知道在哪些文件 里搜寻TODO和计划项目。 | ||
- | Let's imagine you already have several org files---say, one for work, one for home, and one for school. | + | Let's imagine you already have several org files—say, one for work, one for home, and one for school. |
假设,你已经有了几个org文件,比如说,一个工作用的org文件,一个家务用的 org文件,一个学校用的org文件。 | 假设,你已经有了几个org文件,比如说,一个工作用的org文件,一个家务用的 org文件,一个学校用的org文件。 | ||
行 221: | 行 221: | ||
" | " | ||
" | " | ||
- | |||
</ | </ | ||
+ | |||
===== 全局TODO列表 ===== | ===== 全局TODO列表 ===== | ||
行 229: | 行 229: | ||
Press C-c a t to enter the global todo list. Org-mode will scan the files in org-agenda-files and present a listing of all the open TODO items: | Press C-c a t to enter the global todo list. Org-mode will scan the files in org-agenda-files and present a listing of all the open TODO items: | ||
- | 按Ctrl-c a t进入全局TODO列表。Org-Mode将在org-agenda-files里的文件中 搜索开放的TODO项目,并列出项目的列表: http:// | + | 按Ctrl-c a t进入全局TODO列表。Org-Mode将在org-agenda-files里的文件中 搜索开放的TODO项目,并列出项目的列表: |
You can move the cursor around to the different todo items, and hit " | You can move the cursor around to the different todo items, and hit " | ||
行 241: | 行 241: | ||
Let's say I want to schedule " | Let's say I want to schedule " | ||
- | 我计划今天来做“Finish documnet”(“完成文档”)。我把光标移到TODO项目“Finish documnet”(“完成文档”)上,按Ctrl-c和Ctrl-s来运行org-schedule命令。日历跳 了出来,我能输入或者点击我选择的日期: http:// | + | 我计划今天来做“Finish documnet”(“完成文档”)。我把光标移到TODO项目“Finish documnet”(“完成文档”)上,按Ctrl-c和Ctrl-s来运行org-schedule命令。日历跳 了出来,我能输入或者点击我选择的日期: |
Once I select the date, org-mode inserts a scheduling timestamp after the TODO item: | Once I select the date, org-mode inserts a scheduling timestamp after the TODO item: | ||
- | 当我选择好日期,Org Mode在这个TODO项目后插入了一个时间戳: http:// | + | 当我选择好日期,Org Mode在这个TODO项目后插入了一个时间戳: |
Now save your file, and hit C-c a a for org-agenda. A display of this week's scheduled items are displayed: | Now save your file, and hit C-c a a for org-agenda. A display of this week's scheduled items are displayed: | ||
- | 现在把你的文档存盘,并依次键入Ctrl-c、a、a来进入org-agenda模式。本星期的 计划中项目显示了出来: http:// | + | 现在把你的文档存盘,并依次键入Ctrl-c、a、a来进入org-agenda模式。本星期的 计划中项目显示了出来: |
Now press " | Now press " | ||
- | 现在按l键(L的小写字母)显示日志(log)。这样会显示所有已经完成的任务和它们完成 的时间。 http:// | + | 现在按l键(L的小写字母)显示日志(log)。这样会显示所有已经完成的任务和它们完成 的时间。 |
====== 再会 ====== | ====== 再会 ====== |