1 orgguide
Headline | Time | ||
---|---|---|---|
Total time | 0:04 | ||
orgguide | 0:04 | ||
? Dates and Times | 0:04 | ||
?? test | 0:04 |
1.1 introduction
1.2 Document Structure 实用
1.2.1 visibility cycling
- TAB Subtree cycling
- S-TAB Global cycling
1.2.2 Motion
- 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.
1.2.3 Structure editing
- M-RET 插入同级
- M-S-RET 插入同级TODO
- TAB 调整空白标题的级数
- M-left/right 调整当前标题级数
- M-S-left/right 调整 整个子树
- M-S-up/down 上下移动标题
- M-up/down 上下移动标题和内容
- C-c C-w Refile entry or region to a different location. 参看9.2???
- C-x n s/w 子树与全局树显示切换
1.2.4 Sparse trees
- C-c / 激活S parse trees 选项
- C-c / r 输入正则表达式,然后产生Sparse tree
1.2.5 Plain lists
My favorite scenes are (in this order)
- The attack of the Rohirrim
- Eowyn‘s fight with the witch king
- this was already my favorite scene in the book
- I really like Miranda Otto.
Important actors in this film are: - Elijah Wood :: He plays Frodo
- Sean Astin
- He plays Sam, Frodo‘s friend
常用命令:
- M-left/M-right 不带孩子缩进
- M-S-left/right 带孩子缩进
- C-c C-c check, 或者整序
- C-c - Cycle同级的list bullets
1.3 Tables
|Name|Phone|C-c RET 自动扩展为table
|Name|Phone|Age|
|-TAB 自动扩展为---
常用命令:
- C-c | active region 按TAB,‘,‘,空白字符 分割为表格;或者创建空表格
- C-c C-c, TAB, S-TAB, RET 都可以重排表格
- 格式
- <n> 隐藏; 隐藏后鼠标停留可显示. C-c ` 可编辑
- 行列编辑
- M-left/right 移动column 行类似
- M-S-left/right kill和insert新column
- C-c - 上插入—,C-u下插
- C-c RET 插—,并换行
- C-c ^ 排序
- C-c spec 清空当前格
- 表格计算
- C-c ? 或者 C-c }可以查看编号
=
行(列)计算 C-c =;:=
field计算 C-u C-c =.- C-c ‘ mini buffer直接编辑公式, 可配合 S-<l/r/u/d>可视化选择范围.
name | phone | size | <5> | |
---|---|---|---|---|
a | 123 | 1 | 124 | this line is too long |
b | 123 | 2 | 125 | |
c | 123 | 3 | 126 | |
369 | 369 |
1.4 Hyperlinks
基本的Link形式如下: [[link][description] ]
- C-c C-l 插入一个Link; up 和 donw 可以选stored links; C-u能补全文名;编辑;
- C-c C-o 打开
- C-c & Jump back to a recorded position. C-c % 轮转。
[[file:~/code/main.c::255] ]
Find line 255 [[file:~/xx.org::My Target] ]
Find ‘’ [[file:~/xx.org::#my-custo] ]
Find entry with custom id
[[file:test.PNG]\]
带描述就是连接,不带描述就是插入的图片。
1.5 Todo itesm
- C-c C-t 远程产生标签,并可循环
- S-right/left 循环标签
- C-c / t todo的sparse tree
- C-c a t 单独显示所有todo
- S-M-RET 插入todo
可以设置多组;‘|‘用于区分action和结束 (setq org-todo-keywords ‘((sequence "TODO(t)" "|" "DONE(d)") (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")))
也可在文件中单独设置;C-c C-c 生效
1.5.1 Progress logging
在修改状态时,可以自动记录时间和note。高度可定制。还可 clock working time for a task.
done时打时间和提示写note (setq org-log-done ‘time) (setq org-log-done ‘note)
‘!‘表示时间,‘@‘表示note
可将信息放入drawer org-log-into-drawer
可设置优先级 C-c , 或者 S-up/down
使用[/]
或者 [%]
就会自动计算
1.6 Tags
用于打标记和交叉引用 ‘:work:urgent:‘ 放在headline后面
tags按树的父子关系继承
- (C-u) c-c C-q 或者标题处 C-c C-c
本文件的。C-c C-c 生效
#+TAGS: @work(w) @home(h) @tennisclub(t) laptop(l) pc(p)
或者全局设置于.emacs里面
(setq org-tag-alist ‘(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l)))
tags有分组功能,一个例子如下:
#+TAGS: { @read : @read_book @read_ebook }
搜索命令:
- C-c
- C-c / m 生成相应tag的sparse tree, C-u 可只生成有tode的.
- C-c a m Create a global list of tag matches from all agenda files. See Section 10.3.3
[Matching tags and properties], page 22. C-c a M Create a global list of tag matches from all agenda files, but check only TODO items and force checking subitems (see variable org-tags-match-list sublevels).
搜索语法如下: ‘+boss+urgent-project1’ ‘Kathy|Sally’
1.7 Properties
放在一个特殊的drawer里面
也可以整个文件定义
#+PROPERTY: NDisks_ALL 1 2 3 4
- C-c C-x p Set a property. This prompts for a property name and a value.
- C-c C-c d Remove a property from the current entry.
1.8 Dates and Times
Headline | Time | |
---|---|---|
Total time | 0:14 | |
? Dates and Times | 0:14 |
1.8.1 test0
1.8.2 test1
1.8.3 test2
1.8.4 timestamps
- C-c . 插入, 修改, 连续使用插入范围
- C-c C-o 从timestamps跳到agenda
- C-c C-y 计算时间范围
1.8.5 Deadlines and scheduling
- C-c C-d 插入删除deadline
- C-c C-s 插入删除scheduled
1.8.6 Clocking work time
- C-c C-x C-i 开始计时 clock-in
- C-c C-x C-o 停止计时 clock-out
- C-c C-x C-e 设置估计完成时数 effort
- C-c C-x C-r 生成时数统计表 report
- S-left/S-right 在设置了:block之后,可以选择日期 还有其他很多参数可以设置
1.9 Markup for rich exprot
use ‘\\’ at the end of a line \\line
lineline
Great clouds overhead
Tiny black birds rise and fall
Snow covers Emacs
– AlexSchroeder
Everything should be made as simple as possible, but not any simpler – Albert Einstein
Everything should be made as simple as possible,
but not any simpler
*bold*, /italic/, underlined , =code= and ~verbatim
, +strike-through+~
tab:basic-data用来引用下表
……………………… | ………………………. |
1.10 Working with source code
参看如下python示例: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html
def foo(x): if x>0: return x+1 else: return x-1 return foo(5)g
- C-c ‘ 进入退出代码块编辑
- C-x C-s 从编辑区写入代码块
2 emacs基本操作
2.1 emacs查找
- C-s C-s 查找下一处, C-r 反向查找下一处
3 emacs显示图片
应该是有办法改变尺寸的。 (setq org-image-actual-width nil) #+ATTR_ORG: :width 30
~#+ATTR_HTML: width="100px"~
- 快捷键 (C-u) C-c C-x C-v. 没有前缀是inline,有前缀是全部 或者 M-x 输入 org-toggle-inline-images
4 latex
org内嵌的latex只有一些特殊符号和上下标。 Angles are written as Greek letters α, β and γ. C-c C-x \
Angles are written as Greek letters α, β and γ. The mass if the sun is M_sun = 1.989 x 10^30 kg. The radius of the sun is Rsun = 6.96 x 10^8 m. If \(a^2=b\) and \(b=2\), then the solution must be either \(a=+\sqrt{2}\) or \(a=-\sqrt{2}\). \(\vec{x}\)
\begin{equation} x=\sqrt{b} \end{equation}5 footnotes
6 案例: org table 行删除不生效
- M-x find-function 可以查找函数
- C-h k 再输入按键组合 能查找绑定介绍
表格行的创建删除无法使用 发现绑定到了move-text-up上
最后 M-x prelude-mode 发现删除行的组合键生效了.
Footnotes:
The link is: http:/./orgmode.org