+ -
当前位置:首页 → 问答吧 → emacs的org-mode手册翻译

emacs的org-mode手册翻译

时间:2008-03-18

来源:互联网

Org Mode Manual
Table of Contents

* Org Mode Manual
* 1 Introduction
o 1.1 Summary
o 1.2 Installation
o 1.3 Activation
o 1.4 Feedback
* 2 Document Structure
o 2.1 Outlines
o 2.2 Headlines
o 2.3 Visibility cycling
o 2.4 Motion
o 2.5 Structure editing
o 2.6 Archiving
+ 2.6.1 The ARCHIVE tag
+ 2.6.2 Moving subtrees
o 2.7 Sparse trees
o 2.8 Plain lists
o 2.9 Drawers
o 2.10 The Orgstruct minor mode
* 3 Tables
o 3.1 The built-in table editor
o 3.2 Narrow columns
o 3.3 Column groups
o 3.4 The Orgtbl minor mode
o 3.5 The spreadsheet
+ 3.5.1 References
+ 3.5.2 Formula syntax for Calc
+ 3.5.3 Emacs Lisp forms as formulas
+ 3.5.4 Field formulas
+ 3.5.5 Column formulas
+ 3.5.6 Editing and Debugging formulas
+ 3.5.7 Updating the Table
+ 3.5.8 Advanced features
* 4 Hyperlinks
o 4.1 Link format
o 4.2 Internal links
+ 4.2.1 Radio targets
o 4.3 External links
o 4.4 Handling links
o 4.5 Using links outside Org-mode
o 4.6 Link abbreviations
o 4.7 Search options in file links
o 4.8 Custom Searches
o 4.9 Remember
+ 4.9.1 Setting up remember
+ 4.9.2 Remember templates
+ 4.9.3 Storing notes
* 5 TODO items
o 5.1 Basic TODO functionality
o 5.2 Extended use of TODO keywords
+ 5.2.1 TODO keywords as workflow states
+ 5.2.2 TODO keywords as types
+ 5.2.3 Multiple keyword sets in one file
+ 5.2.4 Setting up keywords for individual files
o 5.3 Priorities
o 5.4 Breaking tasks down into subtasks
o 5.5 Checkboxes
* 6 Tags
o 6.1 Tag inheritance
o 6.2 Setting tags
o 6.3 Tag searches
* 7 Properties and Columns
o 7.1 Property Syntax
o 7.2 Special Properties
o 7.3 Property searches
o 7.4 Column View
+ 7.4.1 Defining Columns
# 7.4.1.1 Scope of column definitions
# 7.4.1.2 Column attributes
+ 7.4.2 Using Column View
o 7.5 The Property API
* 8 Timestamps
o 8.1 Time stamps, deadlines and scheduling
o 8.2 Creating timestamps
+ 8.2.1 The date/time prompt
+ 8.2.2 Custom time format
o 8.3 Deadlines and Scheduling
+ 8.3.1 Inserting deadline/schedule
+ 8.3.2 Repeated Tasks
o 8.4 Progress Logging
+ 8.4.1 Closing items
+ 8.4.2 Tracking TODO state changes
+ 8.4.3 Clocking work time
* 9 Agenda Views
o 9.1 Agenda files
o 9.2 The agenda dispatcher
o 9.3 The built-in agenda views
+ 9.3.1 The weekly/daily agenda
+ 9.3.2 The global TODO list
+ 9.3.3 Matching Tags and Properties
+ 9.3.4 Timeline for a single file
+ 9.3.5 Stuck projects
o 9.4 Presentation and sorting
+ 9.4.1 Categories
+ 9.4.2 Time-of-Day Specifications
+ 9.4.3 Sorting of agenda items
o 9.5 Commands in the agenda buffer
o 9.6 Custom agenda views
+ 9.6.1 Storing searches
+ 9.6.2 Block agenda
+ 9.6.3 Setting Options for custom commands
+ 9.6.4 Exporting Agenda Views
+ 9.6.5 Extracting Agenda Information for other programs
* 10 Embedded LaTeX
o 10.1 Math symbols
o 10.2 Subscripts and Superscripts
o 10.3 LaTeX fragments
o 10.4 Processing LaTeX fragments
o 10.5 Using CDLaTeX to enter math
* 11 Exporting
o 11.1 ASCII export
o 11.2 HTML export
+ 11.2.1 HTML export commands
+ 11.2.2 Quoting HTML tags
+ 11.2.3 Links
+ 11.2.4 Images
+ 11.2.5 CSS support
o 11.3 LaTeX export
+ 11.3.1 LaTeX export commands
+ 11.3.2 Quoting LaTeX code
o 11.4 XOXO export
o 11.5 iCalendar export
o 11.6 Text interpretation by the exporter
+ 11.6.1 Comment lines
+ 11.6.2 Text before the first headline
+ 11.6.3 Footnotes
+ 11.6.4 Enhancing text for export
+ 11.6.5 Export options
* 12 Publishing
o 12.1 Configuration
+ 12.1.1 The variable org-publish-project-alist
+ 12.1.2 Sources and destinations for files
+ 12.1.3 Selecting files
+ 12.1.4 Publishing Action
+ 12.1.5 Options for the HTML/LaTeX exporters
+ 12.1.6 Links between published files
+ 12.1.7 Project page index
o 12.2 Sample configuration
+ 12.2.1 Example: simple publishing configuration
+ 12.2.2 Example: complex publishing configuration
o 12.3 Triggering publication
* 13 Miscellaneous
o 13.1 Completion
o 13.2 Customization
o 13.3 Summary of in-buffer settings
o 13.4 The very busy C-c C-c key
o 13.5 A cleaner outline view
o 13.6 Using org-mode on a tty
o 13.7 Interaction with other packages
+ 13.7.1 Packages that Org-mode cooperates with
+ 13.7.2 Packages that lead to conflicts with Org-mode
o 13.8 Bugs
* Appendix A Extensions, Hooks and Hacking
o A.1 Third-***** extensions for Org-mode
o A.2 Adding hyperlink types
o A.3 Tables in arbitrary syntax
+ A.3.1 Radio tables
+ A.3.2 A LaTeX example
+ A.3.3 Translator functions
o A.4 Dynamic blocks
o A.5 Special Agenda Views
o A.6 Using the property API
* Appendix B History and Acknowledgments
* Index
* Key Index
org-mode模式手册
1.介绍
1.1摘要
1.2安装
1.3启动
1.4回馈
2.文档结构
2.1大纲
2.2标题
2.3可见性循环
2.4操作
2.5结构编辑
2.6档案
2.6.1档案标记
2.6.2移动子树
2.7分析树
2.8平坦列表
2.9制图者(抽屉)
2.10 Orgstruct 微型模式
3.表格
3.1内置表格编辑器
3.2窄列
3.3列组
3.4 Orgtbl微型模式
3.5电子表格
3.5.1参考文献(引文)
3.5.2 Calc的公式语法
3.5.3 Emacs Lisp格式的公式
3.5.4公式域
3.5.5列域
3.5.6编辑并调试公式
3.5.7更新表格
3.5.8高级特征
4.超链接
4.1链接格式
4.2内部链接
4.2.1圆形目标
4.3外部链接
4.4处理链接
4.5 Org-mod模式以外的链接
4.6链接缩写
4.7文件链接内的搜寻选项
4.8自定义搜寻
4.9成员
4.9.1设置成员
4.9.2成员模板
4.9.3存储便笺(notes)
5. TODO条目
5.1基本的TODO功能
5.2扩展的TODO关键词的应用
5.2.1工作流程状态的TODO关键词
5.2.2类型相关的TODO关键词
5.2.3单个文件内的多个关键词
5.2.4为个人文件设置关键词
5.3优先级
5.4将任务分解为子任务
5.5选框
6.标记
6.1标记的继承性
6.2设置标记
6.3标记搜索
7.属性和列
7.1属性语法
7.2特殊属性
7.3属性搜索
7.4列示图
7.4.1定义列
7.4.1.1列范围的定义
7.4.1.2列属性
7.4.2使用列示图
7.5属性应用程序接口
8.时间戳
8.1时间戳,限期和计划表
8.2创建时间戳
8.2.1日期时间提示
8.2.2自定义时间格式
8.3限期和计划表
8.4进程记录
8.4.1关闭条目
8.4.2跟踪TODO的状态变化
8.4.3计量工作时间
9.议事日程示图
9.1议程文件
9.2议程分配
9.3内置议程视图
9.3.1每周/每日的议程
9.3.2全局的TODO列表
9.3.3标记匹配和属性
9.3.4单个文件的预定时间表
9.3.5困难项目
9.4演示和分类
9.4.1类别
9.4.2某天某时的具体说明
9.4.3议程条目的分类
9.5议程缓存命令
9.6自定义议程视图
9.6.1存储搜索
9.6.2(分段)(阻塞)议事日程
9.6.3自定义命令的选项设置
9.6.4导出议程视图
9.6.5为其他程序提取议程信息
10.嵌入式latex
10.1数学符号
10.2下标和上表
10.3 LaTex片段
10.4 执行LaTex片段
10.5使用CDLaTex输入数学公式
11.导出
11.1 ASCII导出
11.2 HTML导出
11.2.1 HTML导出命令
11.2.2 引用HTML标记
11.2.3 链接
11.2.4 图像
11.2.5 CSS支持
11.3 LaTex导出
11.3.1 LaTex导出命令
11.3.2 引用LaTex代码
11.4 XOXO导出
11.5 iCalendar 导出
11.6 导出者的文本解释
11.6.1注释行
11.6.2第一个标题前的文本
11.6.3脚注
11.6.4增强文本的导出
11.6.5导出选项
12.发行
12.1配置
12.1.1 org-bulish-project-alist变量
12.1.2文件的源和目标
12.1.3选择文件
12.1.4发行操作
12.1.5 HTML/LaTex导出者的选项
12.1.6发行的文件之间的链接
12.1.7项目索引
12.2配置样本
12.2.1例子:简单的发行配置
12.2.2例子:复杂的发行配置
12.3触发发行
13.杂项
13.1完备(完成)
13.2自定义
13.3 in-buffer设置的总计
13.4最常用的C-c C-c键
13.5清理大纲视图
13.6在tty终端用org-mode模式
13.7与其他包交互
13.7.1 org-mode配合的包
13.7.2 与org-mode冲突的包
13.8 bugs

作者: xf3i   发布时间: 2008-03-18

1 Introduction

* Summary: Brief summary of what Org-mode does
综述:简单的总结一下什么是org-mode
* Installation: How to install a downloaded version of Org-mode
安装:怎么安装下载的org-mode版本
* Activation: How to activate Org-mode for certain buffers.
启动:怎样在一个缓冲区里启动org-mode
* Feedback: Bug reports, ideas, patches etc.
反馈:bug报告,想法和补丁

作者: xf3i   发布时间: 2008-03-18

1.1 Summary
综述

Org-mode is a mode for keeping notes, maintaining TODO lists, and doing project planning with a fast and effective plain-text system.

org-mode是一个用来管理notes,维护TODO列表和项目计划的系统,它使用快速有效的文本模式。

Org-mode develops organizational tasks around NOTES files that contain lists or information about projects as plain text.
org-mode开发有组织的任务,围绕着NOTES文件(NOTES文件包含list或项目信息,而且是一个普通文本)

Org-mode is implemented on top of outline-mode, which makes it possible to keep the content of large files well structured.
org-mode是在大纲模式之上实现的,这使得维护大文件更结构化

Visibility cycling and structure editing help to work with the tree.
可视的循环和结构编辑对用分析树操作更有用

Tables are easily created with a built-in table editor.
用内建的表格编辑器创建表格很容易。

Org-mode supports TODO items, deadlines, time stamps, and scheduling.
org-mode支持TODO条目,限期,时间戳和时刻表

It dynamically compiles entries into an agenda that utilizes and smoothly integrates much of the Emacs calendar and diary.
它动态的把条目编辑入议事日程(这议事日程应用和集成了emacs日历和日记功能)


Plain text URL-like links connect to websites, emails, Usenet messages, BBDB entries, and any files related to the projects.
普通文本链接入网址,email,usenet信息,BBDB条目和任何与项目相关的项目


For printing and sharing of notes, an Org-mode file can be exported as a structured ASCII file, as HTML, or (todo and agenda items only) as an iCalendar file.
为了打印和共享notes,一个org-mode文件可以导出到一个结构化的ASCII文件,如HTML或iCalendar文件


It can also serve as a publishing tool for a set of linked webpages.
它也可以作为相互链接的网页集的发行工具

An important design aspect that distinguishes Org-mode from for example Planner/Muse is that it encourages to store every piece of information only once.
一个重要的设计方面,区分org-mode和其他如Planner/Muse的方面是,他鼓励每一点信息仅存储一次。

In Planner, you have project pages, day pages and possibly other files, duplicating some information such as tasks.
在Planner中,你要有项目页,日文档及其他可能的文件,重复的项目信息等。

In Org-mode, you only have notes files.
在org-mode中你只有notes文件

In your notes you mark entries as tasks, label them with tags and timestamps.
在你的notes中,你标记条目为任务,并给他们并用标记(tag)和时间戳(timestamp)加上标签

All necessary lists like a schedule for the day, the agenda for a meeting, tasks lists selected by tags etc are created dynamically when you need them.
所有需要的列表例如一日的时刻表,一个会议的议事日程,用标记选中的任务,这些权都是在你需要的时候动态创建的。


Org-mode keeps simple things simple.
org-mode使得简单的事情简单化

When first fired up, it should feel like a straightforward, easy to use outliner.
当你第一次启动时,应该是一个直接的易用的大纲

Complexity is not imposed, but a large amount of functionality is available when you need it.
没有强加的复杂性,但是当量的功能当你需要的时候是可以得到的。

Org-mode is a toolbox and can be used in different ways, for example as:
org-mode是一个工具箱并有多种应用方法,例如

• outline extension with visibility cycling and structure editing
大纲扩展具有循环可视及结构化编辑特性

• ASCII system and table editor for taking structured notes
ASCII系统 ,表格编辑编辑器为结构化的列表提供便利

• ASCII table editor with spreadsheet-like capabilities
ASCII表格编辑器具有电子表格一样的功能

• TODO list editor
TODO列表编辑器

• full agenda and planner with deadlines and work scheduling
全部的议事日程和PLANNER具有限期和工作日程功能

• environment to implement David Allen's GTD system
实现David Allen's GTD系统的环境

• a basic database application
一个基本的数据库应用程序

• simple hypertext system, with HTML export
简单的超文本系统具有HTML导出功能

• publishing tool to create a set of interlinked webpages
发行工具可以创建内连的网页

Org-mode's automatic, context sensitive table editor with spreadsheet capabilities can be integrated into any major mode by activating the minor Orgtbl-mode.
org-mode的自动,上下文感知表格编辑器具有电子表格的功能能够可以集成到任一个主模式(通过激活微型orgtbl-mode)

Using a translation step, it can be used to maintain tables in arbitrary file types, for example in LaTeX.
用翻译方式,它可以用来维护表格

The structure editing and list creation capabilities can be used outside Org-mode with the minor Orgstruct-mode.
结构编辑和列表编辑能力可以用在org-mode之外应用orgstruct-mode

There is a website for Org-mode which provides links to the newest version of Org-mode, as well as additional information, frequently asked questions (FAQ), links to tutorials etc. This page is located at http://www.astro.uva.nl/~dominik/Tools/org/.

作者: xf3i   发布时间: 2008-03-18

1.2 Installation
安装
Important: If Org-mode is part of the Emacs distribution or an XEmacs package, please skip this section and go directly to Activation.
注意:如果org-mode作为Emacs发行的部分或,XEmacs包,请跳过这一节直接启动

If you have downloaded Org-mode from the Web, you must take the following steps to install it:
如果你从网上下载org-mode,你必须采取以下措施来安装

Go into the Org-mode distribution directory and edit the top section of the file Makefile.
直接到org-mode发行包目录并编辑makefile的顶部章节

You must set the name of the Emacs binary (likely either emacs or xemacs), and the paths to the directories where local Lisp and Info files are kept.
必须设置Emacs二进制文件的名字和本地保存的lisp和文件的目录

If you don't have access to the system-wide directories, create your own two directories for these files, enter them into the Makefile, and make sure Emacs finds the Lisp files by adding the following line to .emacs:
如果你没有访问system-wide目录的权限,在你自己的主目录下创建这几个文件,并加入Makefile文件,保证Emacs能够找到lisp文件(通过在.emacs中键入:
(setq load-path (cons "~/path/to/lispdir" load-path))

XEmacs users now need to install the file noutline.el from the xemacs subdirectory of the Org-mode distribution. Use the command:
XEmacs用户需要安装noutline.el在xemacs子目录内.
make install-noutline

Now byte-compile and install the Lisp files with the shell commands:
现在编译并安装
make
make install

If you want to install the info documentation, use this command:
如果要安装info文档,用如下命令
make install-info

Then add to .emacs:
在.emacs中加入
;; This line only if org-mode is not part of the X/Emacs distribution.
(require 'org-install)

作者: xf3i   发布时间: 2008-03-18

1.3 Activation
启动
Add the following lines to your .emacs file.
在你的.emacs文件中加入以下内容
The last two lines define global keys for the commands org-store-link and org-agenda - please choose suitable keys yourself.
最后两行为org-stoe-link命令和org-agenda命令定义全局键,
;; The following lines are always needed. Choose your own keys.
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)

Furthermore, you must activate font-lock-mode in org-mode buffers,
此外,你必须在org-mode缓存中激活font-lock-mode
because significant functionality depends on font-locking being active.
因为很多重要的功能依赖font-lock-mode
You can do this with either one of the following two lines (XEmacs user must use the second option):
你可以通过以下两种方式来完成

(global-font-lock-mode 1) ; for all buffers
(add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only

With this setup, all files with extension `.org' will be put into Org-mode.
如果进行了以上设置所有以.org为扩展名的文件打开时会进入org-mode

As an alternative, make the first line of a file look like this:
作为一个选择,使文件的第一行如下

MY PROJECTS -*- mode: org; -*-

which will select Org-mode for this buffer no matter what the file's name is.
这会使得文件自动进入org-mode无论文件名怎么样

See also the variable org-insert-mode-line-in-empty-file.
可以参考org-insert-mode-line-in-empty-file变量

作者: xf3i   发布时间: 2008-03-18

1.4 Feedback
反馈
If you find problems with Org-mode, or if you have questions, remarks, or ideas about it, please contact the maintainer Carsten Dominik at dominik at science dot uva dot nl.

For bug reports, please provide as much information as possible, including the version information of Emacs (C-h v emacs-version <RET>) and Org-mode (C-h v org-version <RET>), as well as the Org-mode related setup in .emacs. If an error occurs, a backtrace can be very useful (see below on how to create one). Often a small example file helps, along with clear information about:

1. What exactly did you do?
2. What did you expect to happen?
3. What happened instead?

Thank you for helping to improve this mode.
How to create a useful backtrace

If working with Org-mode produces an error with a message you don't understand, you may have hit a bug. The best way to report this is by providing, in addition to what was mentioned above, a Backtrace. This is information from the built-in debugger about where and how the error occurred. Here is how to produce a useful backtrace:

1. Start a fresh Emacs or XEmacs, and make sure that it will load the original Lisp code in org.el instead of the compiled version in org.elc. The backtrace contains much more information if it is produced with uncompiled code. To do this, either rename org.elc to something else before starting Emacs, or ask Emacs explicitly to load org.el by using the command line

emacs -l /path/to/org.el


2. Go to the Options menu and select Enter Debugger on Error (XEmacs has this option in the Troubleshooting sub-menu).
3. Do whatever you have to do to hit the error. Don't forget to document the steps you take.
4. When you hit the error, a *Backtrace* buffer will appear on the screen. Save this buffer to a file (for example using C-x C-w) and attach it to your bug report.

作者: xf3i   发布时间: 2008-03-18

2 Document Structure
文档结构

Org-mode is based on outline mode and provides flexible commands to edit the structure of the document.
org-mode是基于大纲模式并提供灵活的命令来编辑文档的结构

* Outlines: Org-mode is based on outline-mode
大纲:org-mode是基于outline-mode的

* Headlines: How to typeset org-tree headlines
标题:如何排版org-tree标题

* Visibility cycling: Show and hide, much simplified
循环可视:显示和隐藏都很简单

* Motion: Jumping to other headlines
操作:跳到另一个标题

* Structure editing: Changing sequence and level of headlines
结构编辑:改变序列和标题的层次

* Archiving: Move done task trees to a different place
归档:把已经完成的任务树移动到一个不同的地方

* Sparse trees: Matches embedded in context
分析树:上下文嵌入式匹配

* Plain lists: Additional structure within an entry
平坦列表:一个条目内的额外结构

* Drawers: Tucking stuff away
抽屉:收缩起所有的资料

* orgstruct-mode: Structure editing outside Org-mode
orgstruct-mode: org-mode之外的结构编辑

作者: xf3i   发布时间: 2008-03-18

2.1 Outlines
提纲
Org-mode is implemented on top of outline-mode.
org-mode是围绕outline-mode来实现的
Outlines allow a document to be organized in a hierarchical structure, which (at least for me) is the best representation of notes and thoughts.
大纲允许一个文档组织在一个结构化的文档中,这是展示notes和thoughts的最好方式

An overview of this structure is achieved by folding (hiding) large parts of the document to show only the general document structure and the parts currently being worked on.
这种结构的纲要,通过折叠起大部分的文档仅仅显示总括的文档结构和当前工作的部分

Org-mode greatly simplifies the use of outlines by compressing the entire show/hide functionality into a single command org-cycle, which is bound to the <TAB> key.
org-mode主要是简化大纲的应用,通过压缩总体的显示隐藏机制,到一个org-cycle命令,此命令被绑定到<TAB>键

作者: xf3i   发布时间: 2008-03-18

2.2 Headlines
标题
Headlines define the structure of an outline tree.
标题定义大纲树的结构
The headlines in Org-mode start with one or more stars, on the left margin1. For example:
org-mode中的标题以一个或多个star放置在左边界,例如:
* Top level headline
** Second level
*** 3rd level
some text
*** 3rd level
more text

* Another top level headline

Some people find the many stars too noisy and would prefer an outline that has whitespace followed by a single star as headline starters.
有人觉得很多的stars很麻烦,更喜欢用空格后跟一个star

Clean view describes a setup to realize this.
清新的示图描述如何实现???

An empty line after the end of a subtree is considered part of it and will be hidden when the subtree is folded.
子树结束后的空行,被认为是子树的一部分,在子树折叠起是一起收起.

However, if you leave at least two empty lines, one empty line will remain visible after folding the subtree, in order to structure the collapsed view.
如果有两个空行,一个空行在折叠后还会可见,以便于崩溃的示图结构

See the variable org-cycle-separator-lines to modify this behavior.
用or-cycle-separator-line变量来修改这一行为(..)

作者: xf3i   发布时间: 2008-03-18

2.3 Visibility cycling
循环可视
Outlines make it possible to hide parts of the text in the buffer.
大纲使得隐藏缓冲区的部分文本成为可能。


Org-mode uses just two commands, bound to <TAB> and S-<TAB> to change the visibility in the buffer.
org-mode仅仅使用两个命令来改变缓冲区的可见性,这两个命令绑定在<TAB>和S-<TAB>两个键。


<TAB>
Subtree cycling: Rotate current subtree among the states
子树循环:循环改变当前子树的状态

,-> FOLDED -> CHILDREN -> SUBTREE --.
'-----------------------------------'


The cursor must be on a headline for this to work2.
光标必须在标题上才会起作用。

When the cursor is at the beginning of the buffer and the first line is not a headline, then <TAB> actually runs global cycling (see below)3.
当光标在缓冲区的开端,并且首行不是标题,<TAB>实际上会执行全局循环显示


Also when called with a prefix argument (C-u <TAB>), global cycling is invoked.
当我们使用带前缀c-u的 <TAB>时,全局循环被激活。

S-<TAB>
C-u <TAB>
Global cycling: Rotate the entire buffer among the states
全局循环可视:循环整个缓冲区的状态
,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
'--------------------------------------'


When S-<TAB> is called with a numerical prefix N, the CONTENTS view up to headlines of level N will be shown.
当S-<TAB>用带数字参数N时,向上N级的标题会显示

Note that inside tables, S-<TAB> jumps to the previous field.
在表格内,S-<TAB>跳到前一个域

C-c C-a
Show all.
全部显示
C-c C-r
Reveal context around point, showing the current entry, the following heading and the hierarchy above.
显示某一点处的上下文,显示当前的条目,上一级和下一级的标题.

Useful for working near a location exposed by a sparse tree command (see Sparse trees) or an agenda command (see Agenda commands).
有用的工作,


With prefix arg show, on each level, all sibling headings.
用前缀arg显示每一级的同级标题
C-c C-x b
Show the current subtree in an indirect buffer4.
显示当前的子树在一个间接的缓冲区内。

With numerical prefix ARG, go up to this level and then take that tree.
用带数字的arg前缀,直接跳到这一级并起作用。

If ARG is negative, go up that many levels.
如果ARG是负数,向上跳指定的级

With C-u prefix, do not remove the previously used indirect buffer.
用带前缀C-u前缀,不删除先前使用的间接缓冲区


sibling
When Emacs first visits an Org-mode file, the global state is set to OVERVIEW, i.e. only the top level headlines are visible.
当Emacs首次访问一个org-mode的文件时,全局状态被设置为OVERVIEW,只有标题可见。

This can be configured through the variable org-startup-folded, or on a per-file basis by adding one of the following lines anywhere in the buffer:
可以通过配置变量org-startup-folded或通过在文件缓冲区中键入下面之一的行

#+STARTUP: overview
#+STARTUP: content
#+STARTUP: showall

作者: xf3i   发布时间: 2008-03-18

2.4 Motion
操作
The following commands jump to other headlines in the buffer.
以下命令跳到缓冲区中另一个标题
C-c C-n
Next heading.
下一个标题

C-c C-p
Previous heading.
前一个标题

C-c C-f
Next heading same level.
同一级的下一个标题

C-c C-b
Previous heading same level.
同一级的前一个标题

C-c C-u
Backward to higher level heading.
跳到上一级的标题

C-c C-j
Jump to a different place without changing the current outline visibility. Shows the document structure in a temporary buffer, where you can use the following keys to find your destination:
表到另一处,并不改变当前大纲的可视性,在一个临时缓冲区中显示文档结构,可以用下面的键来找到目的地
<TAB> Cycle visibility.
<down> / <up> Next/previous visible headline.
n / p Next/previous visible headline.
f / b Next/previous headline same level.
u One level up.
0-9 Digit argument.
<RET> Select this location.

作者: xf3i   发布时间: 2008-03-18

2.5 Structure editing

M-<RET>
Insert new heading with same level as current. If the cursor is in a plain list item, a new item is created (see Plain lists). To force creation of a new headline, use a prefix arg, or first press <RET> to get to the beginning of the next line. When this command is used in the middle of a line, the line is split and the rest of the line becomes the new headline. If the command is used at the beginning of a headline, the new headline is created before the current line. If at the beginning of any other line, the content of that line is made the new heading. If the command is used at the end of a folded subtree (i.e. behind the ellipses at the end of a headline), then a headline like the current one will be inserted after the end of the subtree.
M-S-<RET>
Insert new TODO entry with same level as current heading.
M-<left>
Promote current heading by one level.
M-<right>
Demote current heading by one level.
M-S-<left>
Promote the current subtree by one level.
M-S-<right>
Demote the current subtree by one level.
M-S-<up>
Move subtree up (swap with previous subtree of same level).
M-S-<down>
Move subtree down (swap with next subtree of same level).
C-c C-x C-w
C-c C-x C-k
Kill subtree, i.e. remove it from buffer but save in kill ring.
C-c C-x M-w
Copy subtree to kill ring.
C-c C-x C-y
Yank subtree from kill ring. This does modify the level of the subtree to make sure the tree fits in nicely at the yank position. The yank level can also be specified with a prefix arg, or by yanking after a headline marker like `****'.
C-c ^
Sort same-level entries. When there is an active region, all entries in the region will be sorted. Otherwise the children of the current headline are sorted. The command prompts for the sorting method, which can be alphabetically, numerically, by time (using the first time stamp in each entry), by priority, and each of these in reverse order. With a C-u prefix, sorting will be case-sensitive. With two C-u C-u prefixes, duplicate entries will also be removed.

When there is an active region (transient-mark-mode), promotion and demotion work on all headlines in the region. To select a region of headlines, it is best to place both point and mark at the beginning of a line, mark at the beginning of the first headline, and point at the line just after the last headline to change. Note that when the cursor is inside a table (see Tables), the Meta-Cursor keys have different functionality.

作者: xf3i   发布时间: 2008-03-18

2.6 Archiving

When a project represented by a (sub)tree is finished, you may want to move the tree out of the way and to stop it from contributing to the agenda. Org-mode knows two ways of archiving. You can mark a tree with the ARCHIVE tag, or you can move an entire (sub)tree to a different location.

* ARCHIVE tag: Marking a tree as inactive
* Moving subtrees: Moving a tree to an archive file

作者: xf3i   发布时间: 2008-03-18

2.6 Archiving

When a project represented by a (sub)tree is finished, you may want to move the tree out of the way and to stop it from contributing to the agenda. Org-mode knows two ways of archiving. You can mark a tree with the ARCHIVE tag, or you can move an entire (sub)tree to a different location.

* ARCHIVE tag: Marking a tree as inactive
* Moving subtrees: Moving a tree to an archive file

作者: xf3i   发布时间: 2008-03-18

2.6.1 The ARCHIVE tag

A headline that is marked with the ARCHIVE tag (see Tags) stays at its location in the outline tree, but behaves in the following way:

* It does not open when you attempt to do so with a visibility cycling command (see Visibility cycling). You can force cycling archived subtrees with C-<TAB>, or by setting the option org-cycle-open-archived-trees. Also normal outline commands like show-all will open archived subtrees.
* During sparse tree construction (see Sparse trees), matches in archived subtrees are not exposed, unless you configure the option org-sparse-tree-open-archived-trees.
* During agenda view construction (see Agenda views), the content of archived trees is ignored unless you configure the option org-agenda-skip-archived-trees.
* Archived trees are not exported (see Exporting), only the headline is. Configure the details using the variable org-export-with-archived-trees.

The following commands help managing the ARCHIVE tag:

C-c C-x C-a
Toggle the ARCHIVE tag for the current headline. When the tag is set, the headline changes to a shadowish face, and the subtree below it is hidden.
C-u C-c C-x C-a
Check if any direct children of the current headline should be archived. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to set the ARCHIVE tag for the child. If the cursor is not on a headline when this command is invoked, the level 1 trees will be checked.
C-TAB
Cycle a tree even if it is tagged with ARCHIVE.

作者: xf3i   发布时间: 2008-03-18

2.6.2 Moving subtrees

Once an entire project is finished, you may want to move it to a different location, either in the current file, or even in a different file, the archive file.

C-c C-x C-s
Archive the subtree starting at the cursor position to the location given by org-archive-location. Context information that could be lost like the file name, the category, inherited tags, and the todo state will be store as properties in the entry.
C-u C-c C-x C-s
Check if any direct children of the current headline could be moved to the archive. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to move it to the archive location. If the cursor is not on a headline when this command is invoked, the level 1 trees will be checked.

The default archive location is a file in the same directory as the current file, with the name derived by appending _archive to the current file name. For information and examples on how to change this, see the documentation string of the variable org-archive-location. There is also an in-buffer option for setting this variable, for example

#+ARCHIVE: %s_done::

You may have several such lines in the buffer, they will then be valid for the entries following the line (the first will also apply to any text before it).

作者: xf3i   发布时间: 2008-03-18

2.7 Sparse trees

An important feature of Org-mode is the ability to construct sparse trees for selected information in an outline tree. A sparse tree means that the entire document is folded as much as possible, but the selected information is made visible along with the headline structure above it5. Just try it out and you will see immediately how it works.

Org-mode contains several commands creating such trees. The most basic one is org-occur:

C-c /
Occur. Prompts for a regexp and shows a sparse tree with all matches. If the match is in a headline, the headline is made visible. If the match is in the body of an entry, headline and body are made visible. In order to provide minimal context, also the full hierarchy of headlines above the match is shown, as well as the headline following the match. Each match is also highlighted; the highlights disappear when the buffer is changed by an editing command, or by pressing C-c C-c. When called with a C-u prefix argument, previous highlights are kept, so several calls to this command can be stacked.

For frequently used sparse trees of specific search strings, you can use the variable org-agenda-custom-commands to define fast keyboard access to specific sparse trees. These commands will then be accessible through the agenda dispatcher (see Agenda dispatcher). For example:

(setq org-agenda-custom-commands
'(("f" occur-tree "FIXME")))

will define the key C-c a f as a shortcut for creating a sparse tree matching the string `FIXME'.

Other commands use sparse trees as well. For example C-c C-v creates a sparse TODO tree (see TODO basics).

To print a sparse tree, you can use the Emacs command ps-print-buffer-with-faces which does not print invisible parts of the document 6. Or you can use the command C-c C-e v to export only the visible part of the document and print the resulting file.

作者: xf3i   发布时间: 2008-03-18

热门下载

更多