LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: xf3i

emacs的org-mode手册翻译

[复制链接]
 楼主| 发表于 2008-3-17 22:59:14 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-17 23:00:22 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-17 23:01:37 | 显示全部楼层
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
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-17 23:03:15 | 显示全部楼层
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
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-17 23:08:53 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-17 23:09:53 | 显示全部楼层
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).
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-17 23:35:48 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表