org-maintenance.org: Major update
[worg.git] / orgcard.org
blob6dacd607aade3e1bd9615e27ecaaae85da0ddbe6
1 #+TITLE: Org-Mode Reference Card
2 #+AUTHOR: Vikas Rawal
3 #+EMAIL: vikaslists AT agrarianresearch DOT org
4 #+STARTUP: hidestars
5 #+OPTIONS: toc:t
7 * Getting Started
9 | Key            | Function                              |
10 |----------------+---------------------------------------|
11 | =M-x org-info= | To read the on-line documentation try |
13 * Visibility Cycling
15 | Key               | Function                                      |
16 |-------------------+-----------------------------------------------|
17 | =TAB=             | rotate current subtree between states         |
18 | =S-TAB=           | rotate entire buffer between states           |
19 | =C-u C-u TAB=     | restore property-dependent startup visibility |
20 | =C-u C-u C-u TAB= | show the whole file, including drawers        |
21 | =C-c C-r=         | reveal context around point                   |
23 * Motion
25 | Key         | Function                          |
26 |-------------+-----------------------------------|
27 | =C-c C-n/p= | next/previous heading             |
28 | =C-c C-f/b= | next/previous heading, same level |
29 | =C-c C-u=   | backward to higher level heading  |
30 | =C-c C-j=   | jump to another place in document |
31 | =S-UP/DOWN= | previous/next plain list item     |
33 * Structure Editing
35 | Key                  | Function                                   |
36 |----------------------+--------------------------------------------|
37 | =M-RET=              | insert new heading/item at current level   |
38 | =C-RET=              | insert new heading after subtree           |
39 | =M-S-RET=            | insert new TODO entry/checkbox item        |
40 | =C-S-RET=            | insert TODO entry/ckbx after subtree       |
41 | =C-c -=              | turn (head)line into item, cycle item type |
42 | =C-c *=              | turn item/line into headline               |
43 | =M-LEFT/RIGHT=       | promote/demote heading                     |
44 | =M-S-LEFT/RIGHT=     | promote/demote current subtree             |
45 | =M-S-UP/DOWN=        | move subtree/list item up/down             |
46 | =C-c ^=              | sort subtree/region/plain-list             |
47 | =C-c C-x c=          | clone a subtree                            |
48 | =C-c C-x v=          | copy visible text                          |
49 | =C-c C-x C-w/M-w=    | kill/copy subtree                          |
50 | =C-c C-x C-y or C-y= | yank subtree                               |
51 | =C-x n s/w=          | narrow buffer to subtree / widen           |
53 * Capture - Refile - Archiving
55 | Key           | Function                                  |
56 |---------------+-------------------------------------------|
57 | =C-c c=       | capture a new item (C-u C-u = goto last)  |
58 | =C-c C-w=     | refile subtree (C-u C-u = goto last)      |
59 | =C-c C-x C-a= | archive subtree using the default command |
60 | =C-c C-x C-s= | move subtree to archive file              |
61 | =C-c C-x a/A= | toggle ARCHIVE tag / to ARCHIVE sibling   |
62 | =C-TAB=       | force cycling of an ARCHIVEd tree         |
64 * Filtering and Sparse Trees
66 | Key         | Function                                    |
67 |-------------+---------------------------------------------|
68 | =C-c /=     | construct a sparse tree by various criteria |
69 | =C-c / t/T= | view TODO's in sparse tree                  |
70 | =C-c a t=   | global TODO list in agenda mode             |
71 | =C-c a L=   | time sorted view of current org file        |
73 * Tables
75 *** Creating a table
77 - =C-c |=: convert region to table
78 - =C-3 C-c |= : separator at least 3 spaces
80 ** Commands available inside tables
82 The following commands work when the cursor is inside a table.  Outside of
83 tables, the same keys may have other functionality.
85 *** Re-aligning and field motion
87 | Key       | Function                                     |
88 |-----------+----------------------------------------------|
89 | =C-c C-c= | re-align the table without moving the cursor |
90 | =TAB=     | re-align the table, move to next field       |
91 | =S-TAB=   | move to previous field                       |
92 | =RET=     | re-align the table, move to next row         |
93 | =M-a/e=   | move to beginning/end of field               |
95 *** Row and column editing
97 | Key            | Function                                     |
98 |----------------+----------------------------------------------|
99 | =M-LEFT/RIGHT= | move the current column left                 |
100 | =M-S-LEFT=     | kill the current column                      |
101 | =M-S-RIGHT=    | insert new column to left of cursor position |
102 | =M-UP/DOWN=    | move the current row up/down                 |
103 | =M-S-UP=       | kill the current row or horizontal line      |
104 | =M-S-DOWN=     | insert new row above the current row         |
105 | =C-c -=        | insert hline below (C-u : above) current row |
106 | =C-c RET=      | insert hline and move to line below it       |
107 | =C-c ^=        | sort lines in region                         |
109 *** Regions
111 | Key                   | Function                             |
112 |-----------------------+--------------------------------------|
113 | =C-c C-x C-w/M-w/C-y= | cut/copy/paste rectangular region    |
114 | =C-c C-q=             | fill paragraph across selected cells |
116 *** Miscellaneous
118 | Key                    | Function                                    |
119 |------------------------+---------------------------------------------|
120 | =C-c `=                | edit the current field in a separate window |
121 | =C-u TAB=              | make current field fully visible            |
122 | =M-x org-table-export= | export as tab-separated file                |
123 | =M-x org-table-import= | import tab-separated file                   |
124 | =C-c +=                | sum numbers in current column/rectangle     |
126 To limit column width to N characters, use =... | <N> | ...=.
128 ** Tables created with the table.el package
130 | Key       | Function                              |
131 |-----------+---------------------------------------|
132 | =C-c ~=   | insert a new table.el table           |
133 | =C-c C-c= | recognize existing table.el table     |
134 | =C-c ~=   | convert table (Org-mode <-> table.el) |
136 ** Spreadsheet
138 - Formulas typed in field are executed by =TAB=, =RET= and =C-c C-c=.
139 - ~=~ introduces a column formula, ~:=~ a field formula.
140 - Example: Add Col1 and Col2: ~=1+2~
141 - ... with printf format specification: ~=1+2;%.2f~
142 - ... with constants from constants.el: ~=1/c/cm~
143 - sum from 2nd to 3rd hline: ~:=vsum(@II..@III)~
145 | Key             | Function                                      |
146 |-----------------+-----------------------------------------------|
147 | ~=~             | apply current column formula                  |
148 | ~C-c =~         | set and eval column formula                   |
149 | ~C-u C-c #~     | set and eval field formula                    |
150 | =C-c *=         | re-apply all stored equations to current line |
151 | =C-u C-c *=     | re-apply all stored equations to entire table |
152 | =C-u C-u C-c *= | iterate table to stability                    |
153 | =C-#=           | rotate calculation mark through # * ! ^ _     |
154 | =C-c ?=         | show line, column, formula reference          |
155 | =C-c }/{=       | toggle grid / debugger                        |
157 ** Formula Editor
159 | Key           | Function                              |
160 |---------------+---------------------------------------|
161 | =C-c '=       | edit formulas in separate buffer      |
162 | =C-c C-c=     | exit and install new formulas         |
163 | =C-u C-c C-c= | exit, install, and apply new formulas |
164 | =C-c C-q=     | abort                                 |
165 | =C-c C-r=     | toggle reference style                |
166 | =TAB=         | pretty-print Lisp formula             |
167 | =M-TAB=       | complete Lisp symbol                  |
168 | =S-cursor=    | shift reference point                 |
169 | =M-up/down=   | shift test line for column references |
170 | =M-S-up/down= | scroll the window showing the table   |
171 | =C-c }=       | toggle table coordinate grid          |
173 * Links
175 | Key           | Function                                    |
176 |---------------+---------------------------------------------|
177 | =C-c l=       | globally store link to the current location |
178 | =C-c C-l=     | insert a link (TAB completes stored links)  |
179 | =C-u C-c C-l= | insert file link with file name completion  |
180 | =C-c C-l=     | edit (also hidden part of) link at point    |
181 | =C-c C-o=     | open file links in emacs                    |
182 | =C-u C-c C-o= | ...force open in emacs/other window         |
183 | =mouse-1/2=   | open link at point                          |
184 | =mouse-3=     | ...force open in emacs/other window         |
185 | =C-c %=       | record a position in mark ring              |
186 | =C-c &=       | jump back to last followed link(s)          |
187 | =C-c C-x C-n= | find next link                              |
188 | =C-c C-x C-p= | find previous link                          |
189 | =C-c '=       | edit code snippet of file at point          |
190 | =C-c C-x C-v= | toggle inline display of linked images      |
192 * Working with Code (Babel)
194 | Key         | Function                                          |
195 |-------------+---------------------------------------------------|
196 | =C-c C-c=   | execute code block at point                       |
197 | =C-c C-o=   | open results of code block at point               |
198 | =C-c C-v c= | check code block at point for errors              |
199 | =C-c C-v j= | insert a header argument with completion          |
200 | =C-c C-v v= | view expanded body of code block at point         |
201 | =C-c C-v I= | view information about code block at point        |
202 | =C-c C-v g= | go to named code block                            |
203 | =C-c C-v r= | go to named result                                |
204 | =C-c C-v u= | go to the head of the current code block          |
205 | =C-c C-v n= | go to the next code block                         |
206 | =C-c C-v p= | go to the previous code block                     |
207 | =C-c C-v d= | demarcate a code block                            |
208 | =C-c C-v x= | execute the next key sequence in the code edit bu |
209 | =C-c C-v b= | execute all code blocks in current buffer         |
210 | =C-c C-v s= | execute all code blocks in current subtree        |
211 | =C-c C-v t= | tangle code blocks in current file                |
212 | =C-c C-v f= | tangle code blocks in supplied file               |
213 | =C-c C-v i= | ingest all code blocks in supplied file into the  |
214 | =C-c C-v z= | switch to the session of the current code block   |
215 | =C-c C-v l= | load the current code block into a session        |
216 | =C-c C-v a= | view sha1 hash of the current code block          |
218 * Completion
220 In-buffer completion completes TODO keywords at headline start, TeX macros
221 after `\', option keywords after `#-', TAGS after `:', and dictionary words
222 elsewhere.
224 | Key     | Function               |
225 |---------+------------------------|
226 | =M-TAB= | complete word at point |
228 * TODO Items and Checkboxes
230 | Key              | Function                                      |
231 |------------------+-----------------------------------------------|
232 | =C-c C-t=        | rotate the state of the current item          |
233 | =S-LEFT/RIGHT=   | select next/previous state                    |
234 | =C-S-LEFT/RIGHT= | select next/previous set                      |
235 | =C-c C-x o=      | toggle ORDERED property                       |
236 | =C-c C-v=        | view TODO items in a sparse tree              |
237 | =C-3 C-c C-v=    | view 3rd TODO keyword's sparse tree           |
238 | =C-c , [ABC]=    | set the priority of the current item          |
239 | =C-c , SPC=      | remove priority cookie from current item      |
240 | =S-UP/DOWN=      | raise/lower priority of current item          |
241 | =M-S-RET=        | insert new checkbox item in plain list        |
242 | =C-c C-x C-b=    | toggle checkbox(es) in region/entry/at point  |
243 | =C-c C-c=        | toggle checkbox at point                      |
244 | =C-c #=          | update checkbox statistics (C-u : whole file) |
246 * Tags
248 | Key           | Function                               |
249 |---------------+----------------------------------------|
250 | =C-c C-q=     | set tags for current heading           |
251 | =C-u C-c C-q= | realign tags in all headings           |
252 | =C-c \\=      | create sparse tree with matching tags  |
253 | =C-c C-o=     | globally (agenda) match tags at cursor |
255 * Properties and Column View
257 | Key                     | Function                              |
258 |-------------------------+---------------------------------------|
259 | =C-c C-x p/e=           | set property/effort                   |
260 | =C-c C-c=               | special commands in property lines    |
261 | =S-left/right=          | next/previous allowed value           |
262 | =C-c C-x C-c=           | turn on column view                   |
263 | =C-c C-x i=             | capture columns view in dynamic block |
264 | =q=                     | quit column view                      |
265 | =v=                     | show full value                       |
266 | =e=                     | edit value                            |
267 | =n/p= or =S-left/right= | next/previous allowed value           |
268 | =a=                     | edit allowed values list              |
269 | => / <=                 | make column wider/narrower            |
270 | =M-left/right=          | move column left/right                |
271 | =M-S-right=             | add new column                        |
272 | =M-S-left=              | Delete current column                 |
274 * Timestamps
276 | Key            | Function                                     |
277 |----------------+----------------------------------------------|
278 | =C-c .=        | prompt for date and insert timestamp         |
279 | =C-u C-c .=    | like C-c . but insert date and time format   |
280 | =C-c !=        | like C-c . but make stamp inactive           |
281 | =C-c C-d=      | insert DEADLINE timestamp                    |
282 | =C-c C-s=      | insert SCHEDULED timestamp                   |
283 | =C-c / d=      | create sparse tree with all deadlines due    |
284 | =C-c C-y=      | the time between 2 dates in a time range     |
285 | =S-RIGHT/LEFT= | change timestamp at cursor ±1 day            |
286 | =S-UP/DOWN=    | change year/month/day at cursor by ±1        |
287 | =C-c >=        | access the calendar for the current date     |
288 | =C-c <=        | insert timestamp matching date in calendar   |
289 | =C-c C-o=      | access agenda for current date               |
290 | =mouse-1/RET=  | select date while prompted                   |
291 | =C-c C-x C-t=  | toggle custom format display for dates/times |
293 ** Clocking time
295 | Key             | Function                              |
296 |-----------------+---------------------------------------|
297 | =C-c C-x C-i=   | start clock on current item           |
298 | =C-c C-x C-o/x= | stop/cancel clock on current item     |
299 | =C-c C-x C-d=   | display total subtree times           |
300 | =C-c C-c=       | remove displayed times                |
301 | =C-c C-x C-r=   | insert/update table with clock report |
303 * Agenda Views
305 | Key           | Function                                 |
306 |---------------+------------------------------------------|
307 | =C-c [=       | add/move current file to front of agenda |
308 | =C-c ]=       | remove current file from your agenda     |
309 | =C-'=         | cycle through agenda file list           |
310 | =C-c C-x </>= | set/remove restriction lock              |
311 | =C-c a a=     | compile agenda for the current week      |
312 | =C-c a t=     | compile global TODO list                 |
313 | =C-c a T=     | compile TODO list for specific keyword   |
314 | =C-c a m=     | match tags, TODO kwds, properties        |
315 | =C-c a M=     | match only in TODO entries               |
316 | =C-c a #=     | find stuck projects                      |
317 | =C-c a L=     | show timeline of current org file        |
318 | =C-c a C=     | configure custom commands                |
319 | =C-c C-o=     | agenda for date at cursor                |
321 ** Commands available in an agenda buffer
323 *** View Org file
325 | Key           | Function                                     |
326 |---------------+----------------------------------------------|
327 | =SPC/mouse-3= | show original location of item               |
328 | =L=           | show and recenter window                     |
329 | =TAB/mouse-2= | goto original location in other window       |
330 | =RET=         | goto original location, delete other windows |
331 | =C-c C-x b=   | show subtree in indirect buffer, ded.\ frame |
332 | =F=           | toggle follow-mode                           |
334 *** Change display
336 | Key             | Function                                  |
337 |-----------------+-------------------------------------------|
338 | =o=             | delete other windows                      |
339 | =v=             | view mode dispatcher                      |
340 | =d w vm vy vSP= | switch to day/week/month/year/def view    |
341 | =D / G / K=     | toggle diary entries / time grid / habits |
342 | =E / R=         | toggle entry text / clock report          |
343 | =l / v l/L/c=   | toggle display of logbook entries         |
344 | =v a/A=         | toggle inclusion of archived trees/files  |
345 | =r / g=         | refresh agenda buffer with any changes    |
346 | =/=             | filter with respect to a tag              |
347 | =s=             | save all org-mode buffers                 |
348 | =f / b=         | display next/previous day,week,...        |
349 | =. / j=         | goto today / some date (prompt)           |
351 *** Remote editing
353 | Key            | Function                                    |
354 |----------------+---------------------------------------------|
355 | =0-9=          | digit argument                              |
356 | =t=            | change state of current TODO item           |
357 | =C-k=          | kill item and source                        |
358 | =/ a=          | archive default                             |
359 | =C-c C-w=      | refile the subtree                          |
360 | =: / T=        | set/show tags of current headline           |
361 | =e=            | set effort property (prefix=nth)            |
362 | =, / P=        | set / compute priority of current item      |
363 | =S-UP/DOWN=    | raise/lower priority of current item        |
364 | =C-c C-a=      | run an attachment command                   |
365 | =C-c C-s/d=    | schedule/set deadline for this item         |
366 | =S-LEFT/RIGHT= | change timestamp one day earlier/later      |
367 | =>=            | change timestamp to today                   |
368 | =i=            | insert new entry into diary                 |
369 | =I / O / X=    | start/stop/cancel the clock on current item |
370 | =J=            | jump to running clock entry                 |
371 | =m / u / B=    | mark / unmark / execute bulk action         |
373 *** Misc
375 | Key       | Function                                       |
376 |-----------+------------------------------------------------|
377 | =C-c C-o= | follow one or offer all links in current entry |
379 *** Calendar commands
381 | Key | Function                                |
382 |-----+-----------------------------------------|
383 | =c= | find agenda cursor date in calendar     |
384 | =c= | compute agenda for calendar cursor date |
385 | =M= | show phases of the moon                 |
386 | =S= | show sunrise/sunset times               |
387 | =H= | show holidays                           |
388 | =C= | convert date to other calendars         |
390 *** Quit and Exit
392 | Key | Function                               |
393 |-----+----------------------------------------|
394 | =q= | quit agenda, remove agenda buffer      |
395 | =x= | exit agenda, remove all agenda buffers |
397 * LaTeX and cdlatex-mode
399 | Key           | Function                                 |
400 |---------------+------------------------------------------|
401 | =C-c C-x C-l= | preview LaTeX fragment                   |
402 | =TAB=         | expand abbreviation (cdlatex-mode)       |
403 | =` / '=       | insert/modify math symbol (cdlatex-mode) |
404 | =C-c C-x [=   | insert citation using RefTeX             |
406 * Exporting and Publishing
408 Exporting creates files with extensions .txt and .html in the current
409 directory. Publishing puts the resulting file into some other place.
411 | Key                    | Function                                   |
412 |------------------------+--------------------------------------------|
413 | =C-c C-e=              | export/publish dispatcher                  |
414 | =C-c C-e v=            | export visible part only                   |
415 | =C-c C-e t=            | insert template of export options          |
416 | =C-c :=                | toggle fixed width for entry or region     |
417 | =C-c C-x {\tt\char`\}= | toggle pretty display of scripts, entities |
419 **** Comments: Text not being exported
421 Lines starting with # and subtrees starting with =COMMENT= are never
422 exported.
424 | Key     | Function                        |
425 |---------+---------------------------------|
426 | =C-c ;= | toggle COMMENT keyword on entry |
428 * Dynamic Blocks
430 | Key               | Function                      |
431 |-------------------+-------------------------------|
432 | =C-c C-x C-u=     | update dynamic block at point |
433 | =C-u C-c C-x C-u= | update all dynamic blocks     |
435 * Footnotes
437 1. This is only a suggestion for a binding of this command.  Choose your
438    own key as shown under ACTIVATION.
440 2. Keybinding affected by =org-support-shift-select= and also
441    =org-replace-disputed-keys=.