org-guide.org (87961B)
1 #+title: Org Mode Compact Guide 2 #+subtitle: Release {{{version}}} 3 #+author: The Org Mode Developers 4 #+language: en 5 6 #+texinfo: @insertcopying 7 8 * Copying 9 :PROPERTIES: 10 :copying: t 11 :END: 12 13 Copyright \copy 2004--2024 Free Software Foundation, Inc. 14 15 #+begin_quote 16 Permission is granted to copy, distribute and/or modify this document 17 under the terms of the GNU Free Documentation License, Version 1.3 or 18 any later version published by the Free Software Foundation; with no 19 Invariant Sections, with the Front-Cover Texts being "A GNU Manual," 20 and with the Back-Cover Texts as in (a) below. A copy of the license 21 is included in the section entitled "GNU Free Documentation License." 22 in the full Org manual, which is distributed together with this 23 compact guide. 24 25 (a) The FSF's Back-Cover Text is: "You have the freedom to copy and 26 modify this GNU manual." 27 #+end_quote 28 29 * Introduction 30 :PROPERTIES: 31 :DESCRIPTION: Welcome! 32 :END: 33 34 Org is a mode for keeping notes, maintaining TODO lists, and doing 35 project planning with a fast and effective plain-text system. It is 36 also an authoring and publishing system, and it supports working with 37 source code for literal programming and reproducible research. 38 39 This document is a much compressed derivative of the [[info:org][comprehensive Org 40 mode manual]]. It contains all basic features and commands, along with 41 important hints for customization. It is intended for beginners who 42 would shy back from a 200 pages manual because of sheer size. 43 44 ** Installation 45 :PROPERTIES: 46 :UNNUMBERED: notoc 47 :END: 48 49 #+attr_texinfo: :tag Important 50 #+begin_quote 51 If you are using a version of Org that is part of the Emacs 52 distribution, please skip this section and go directly to [[*Activation]]. 53 #+end_quote 54 55 If you have downloaded Org from the web, either as a distribution 56 =.zip= or =.tar= file, or as a Git archive, it is best to run it 57 directly from the distribution directory. You need to add the =lisp/= 58 subdirectories to the Emacs load path. To do this, add the following 59 line to your Emacs init file: 60 61 : (add-to-list 'load-path "~/path/to/orgdir/lisp") 62 63 #+texinfo: @noindent 64 If you have been using git or a tar ball to get Org, you need to run 65 the following command to generate autoload information. 66 67 : make autoloads 68 69 ** Activation 70 :PROPERTIES: 71 :UNNUMBERED: notoc 72 :END: 73 74 Add the following lines to your Emacs init file to define /global/ 75 keys for three commands that are useful in any Emacs buffer, not just 76 Org buffers. Please choose suitable keys yourself. 77 78 #+begin_src emacs-lisp 79 (global-set-key (kbd "C-c l") #'org-store-link) 80 (global-set-key (kbd "C-c a") #'org-agenda) 81 (global-set-key (kbd "C-c c") #'org-capture) 82 #+end_src 83 84 Files with extension =.org= will be put into Org mode automatically. 85 86 ** Feedback 87 :PROPERTIES: 88 :UNNUMBERED: notoc 89 :END: 90 91 If you find problems with Org, or if you have questions, remarks, or 92 ideas about it, please mail to the Org mailing list 93 mailto:emacs-orgmode@gnu.org. For information on how to submit bug 94 reports, see the [[info:org][main manual]]. 95 96 * Document Structure 97 :PROPERTIES: 98 :DESCRIPTION: A tree works like your brain. 99 :END: 100 101 Org is an outliner. Outlines allow a document to be organized in 102 a hierarchical structure, which, least for me, is the best 103 representation of notes and thoughts. An overview of this structure 104 is achieved by folding, i.e., hiding large parts of the document to 105 show only the general document structure and the parts currently being 106 worked on. Org greatly simplifies the use of outlines by compressing 107 the entire show and hide functionalities into a single command, 108 ~org-cycle~, which is bound to the {{{kbd(TAB)}}} key. 109 110 ** Headlines 111 :PROPERTIES: 112 :DESCRIPTION: How to typeset Org tree nodes. 113 :END: 114 115 Headlines define the structure of an outline tree. The headlines in 116 Org start on the left margin[fn:1] with one or more stars followed by 117 a space. For example: 118 119 #+begin_example 120 ,* Top level headline 121 ,** Second level 122 ,*** Third level 123 some text 124 ,*** Third level 125 more text 126 ,* Another top level headline 127 #+end_example 128 129 Note that a headline named after ~org-footnote-section~, which 130 defaults to =Footnotes=, is considered as special. A subtree with 131 this headline will be silently ignored by exporting functions. 132 133 Some people find the many stars too noisy and would prefer an outline 134 that has whitespace followed by a single star as headline starters. 135 See [[*Miscellaneous]] for a setup to realize this. 136 137 ** Visibility Cycling 138 :PROPERTIES: 139 :DESCRIPTION: Show and hide, much simplified. 140 :END: 141 142 Outlines make it possible to hide parts of the text in the buffer. 143 Org uses just two commands, bound to {{{kbd(TAB)}}} and 144 {{{kbd(S-TAB)}}} (~org-cycle~ and ~org-shifttab~) to change the 145 visibility in the buffer. 146 147 #+attr_texinfo: :sep , 148 - {{{kbd(TAB)}}} (~org-cycle~) :: 149 150 /Subtree cycling/: Rotate current subtree among the states 151 152 : ,-> FOLDED -> CHILDREN -> SUBTREE --. 153 : '-----------------------------------' 154 155 When called with a prefix argument ({{{kbd(C-u TAB)}}}), or with the 156 Shift key, global cycling is invoked. 157 158 - {{{kbd(S-TAB)}}} (~org-global-cycle~), {{{kbd(C-u TAB)}}} (~org-cycle~) :: 159 160 /Global cycling/: Rotate the entire buffer among the states 161 162 : ,-> OVERVIEW -> CONTENTS -> SHOW ALL --. 163 : '--------------------------------------' 164 165 - {{{kbd(C-u C-u C-u TAB)}}} (~org-show-all~) :: 166 167 Show all, including drawers. 168 169 When Emacs first visits an Org file, the global state is set to 170 ~showeverything~, i.e., all file content is visible. This can be 171 configured through the variable ~org-startup-folded~, or on a per-file 172 basis by adding a =STARTUP= keyword to =overview=, =content=, 173 =showall=, =showeverything= or =show<n>levels= (n = 2..5) like this: 174 175 : #+STARTUP: content 176 177 ** Motion 178 :PROPERTIES: 179 :DESCRIPTION: Jumping to other headlines. 180 :END: 181 182 The following commands jump to other headlines in the buffer. 183 184 - {{{kbd(C-c C-n)}}} (~org-next-visible-heading~) :: Next heading. 185 - {{{kbd(C-c C-p)}}} (~org-previous-visible-heading~) :: Previous 186 heading. 187 188 - {{{kbd(C-c C-f)}}} (~org-backward-heading-same-level~) :: Next 189 heading same level. 190 191 - {{{kbd(C-c C-b)}}} (~outline-backward-same-level~) :: Previous 192 heading same level. 193 194 - {{{kbd(C-c C-u)}}} (~outline-up-heading~) :: Backward to higher 195 level heading. 196 197 ** Structure Editing 198 :PROPERTIES: 199 :DESCRIPTION: Changing sequence and level of headlines. 200 :END: 201 202 #+attr_texinfo: :sep , 203 - {{{kbd(M-RET)}}} (~org-meta-return~) :: 204 205 Insert new heading with same level as current. If point is in 206 a plain list item, a new item is created (see [[Plain Lists]]). When 207 this command is used in the middle of a line, the line is split and 208 the rest of the line becomes the new headline[fn:2]. 209 210 - {{{kbd(M-S-RET)}}} (~org-insert-todo-heading~) :: 211 212 Insert new TODO entry with same level as current heading. 213 214 - {{{kbd(TAB)}}} (~org-cycle~) in new, empty entry :: 215 216 In a new entry with no text yet, {{{kbd(TAB)}}} cycles through 217 reasonable levels. 218 219 - {{{kbd(M-LEFT)}}} (~org-metaleft~), {{{kbd(M-RIGHT)}}} (~org-metaright~) :: 220 221 Promote or demote current heading by one level. 222 223 - {{{kbd(M-UP)}}} (~org-move-subtree-up~), {{{kbd(M-DOWN)}}} (~org-move-subtree-down~) :: 224 225 Move subtree up or down, i.e., swap with previous or next subtree of 226 same level. 227 228 - {{{kbd(C-c C-w)}}} (~org-refile~) :: 229 230 Refile entry or region to a different location. See [[*Refile and 231 Copy]]. 232 233 - {{{kbd(C-x n s)}}} (~org-narrow-to-subtree~), {{{kbd(C-x n w)}}} (~widen~) :: 234 235 Narrow buffer to current subtree and widen it again. 236 237 When there is an active region (Transient Mark mode), promotion and 238 demotion work on all headlines in the region. 239 240 ** Sparse Trees 241 :PROPERTIES: 242 :DESCRIPTION: Matches embedded in context. 243 :END: 244 245 An important feature of Org mode is the ability to construct /sparse 246 trees/ for selected information in an outline tree, so that the entire 247 document is folded as much as possible, but the selected information 248 is made visible along with the headline structure above it[fn:3]. 249 Just try it out and you will see immediately how it works. 250 251 Org mode contains several commands creating such trees, all these 252 commands can be accessed through a dispatcher: 253 254 - {{{kbd(C-c /)}}} (~org-sparse-tree~) :: 255 256 This prompts for an extra key to select a sparse-tree creating 257 command. 258 259 - {{{kbd(C-c / r)}}} (~org-occur~) :: 260 261 Occur. Prompts for a regexp and shows a sparse tree with all 262 matches. Each match is also highlighted; the highlights disappear 263 by pressing {{{kbd(C-c C-c)}}}. 264 265 The other sparse tree commands select headings based on TODO 266 keywords, tags, or properties and will be discussed later in this 267 manual. 268 269 ** Plain Lists 270 :PROPERTIES: 271 :DESCRIPTION: Additional structure within an entry. 272 :END: 273 274 Within an entry of the outline tree, hand-formatted lists can provide 275 additional structure. They also provide a way to create lists of 276 checkboxes (see [[*Checkboxes]]). Org supports editing such lists, and 277 every exporter (see [[*Exporting]]) can parse and format them. 278 279 Org knows ordered lists, unordered lists, and description lists. 280 281 #+attr_texinfo: :indic @bullet 282 - /Unordered/ list items start with =-=, =+=, or =*= as bullets. 283 284 - /Ordered/ list items start with =1.=, or =1)=. 285 286 - /Description/ list use =::= to separate the /term/ from the 287 description. 288 289 Items belonging to the same list must have the same indentation on the 290 first line. An item ends before the next line that is indented like 291 its bullet/number, or less. A list ends when all items are closed, or 292 before two blank lines. An example: 293 294 #+begin_example 295 ,* Lord of the Rings 296 My favorite scenes are (in this order) 297 1. The attack of the Rohirrim 298 2. Eowyn's fight with the witch king 299 + this was already my favorite scene in the book 300 + I really like Miranda Otto. 301 Important actors in this film are: 302 - Elijah Wood :: He plays Frodo 303 - Sean Astin :: He plays Sam, Frodo's friend. 304 #+end_example 305 306 The following commands act on items when point is in the first line of 307 an item (the line with the bullet or number). 308 309 #+attr_texinfo: :sep , 310 - {{{kbd(TAB)}}} (~org-cycle~) :: 311 312 Items can be folded just like headline levels. 313 314 - {{{kbd(M-RET)}}} (~org-insert-heading~) :: 315 316 Insert new item at current level. With a prefix argument, force 317 a new heading (see [[*Structure Editing]]). 318 319 - {{{kbd(M-S-RET)}}} (~org-insert-todo-heading~) :: 320 321 Insert a new item with a checkbox (see [[*Checkboxes]]). 322 323 - {{{kbd(M-UP)}}} (~org-move-item-up~), {{{kbd(M-DOWN)}}} (~org-move-item-down~) :: 324 325 Move the item including subitems up/down (swap with previous/next 326 item of same indentation). If the list is ordered, renumbering is 327 automatic. 328 329 - {{{kbd(M-LEFT)}}} (~org-do-promote~), {{{kbd(M-RIGHT)}}} (~org-do-demote~) :: 330 331 Decrease/increase the indentation of an item, leaving children 332 alone. 333 334 - {{{kbd(M-S-LEFT)}}} (~org-promote-subtree~), {{{kbd(M-S-RIGHT)}}} (~org-demote-subtree~) :: 335 336 Decrease/increase the indentation of the item, including subitems. 337 338 - {{{kbd(C-c C-c)}}} (~org-toggle-checkbox~) :: 339 340 If there is a checkbox (see [[*Checkboxes]]) in the item line, toggle 341 the state of the checkbox. Also verify bullets and indentation 342 consistency in the whole list. 343 344 - {{{kbd(C-c -)}}} (~org-cycle-list-bullet~) :: 345 346 Cycle the entire list level through the different itemize/enumerate 347 bullets (=-=, =+=, =*=, =1.=, =1)=). 348 349 * Tables 350 :PROPERTIES: 351 :DESCRIPTION: Pure magic for quick formatting. 352 :END: 353 354 Org comes with a fast and intuitive table editor. Spreadsheet-like 355 calculations are supported in connection with the Emacs Calc package 356 (see [[info:calc][GNU Emacs Calculator Manual]]). 357 358 Org makes it easy to format tables in plain ASCII. Any line with =|= 359 as the first non-whitespace character is considered part of a table. 360 =|= is also the column separator. A table might look like this: 361 362 #+begin_example 363 | Name | Phone | Age | 364 |-------+-------+-----| 365 | Peter | 1234 | 17 | 366 | Anna | 4321 | 25 | 367 #+end_example 368 369 A table is re-aligned automatically each time you press {{{kbd(TAB)}}} 370 or {{{kbd(RET)}}} or {{{kbd(C-c C-c)}}} inside the table. 371 {{{kbd(TAB)}}} also moves to the next field ({{{kbd(RET)}}} to the 372 next row) and creates new table rows at the end of the table or before 373 horizontal lines. The indentation of the table is set by the first 374 line. Any line starting with =|-= is considered as a horizontal 375 separator line and will be expanded on the next re-align to span the 376 whole table width. So, to create the above table, you would only type 377 378 : |Name|Phone|Age| 379 : |- 380 381 #+texinfo: @noindent 382 and then press {{{kbd(TAB)}}} to align the table and start filling in 383 fields. Even faster would be to type =|Name|Phone|Age= followed by 384 {{{kbd(C-c RET)}}}. 385 386 When typing text into a field, Org treats {{{kbd(DEL)}}}, 387 {{{kbd(Backspace)}}}, and all character keys in a special way, so that 388 inserting and deleting avoids shifting other fields. Also, when 389 typing /immediately after point was moved into a new field with 390 {{{kbd(TAB)}}}, {{{kbd(S-TAB)}}} or {{{kbd(RET)}}}/, the field is 391 automatically made blank. 392 393 ** Creation and conversion 394 :PROPERTIES: 395 :UNNUMBERED: notoc 396 :END: 397 398 - {{{kbd(C-c |)}}} (~org-table-create-or-convert-from-region~) :: 399 400 Convert the active region to table. If every line contains at least 401 one {{{kbd(TAB)}}} character, the function assumes that the material 402 is tab separated. If every line contains a comma, comma-separated 403 values (CSV) are assumed. If not, lines are split at whitespace 404 into fields. 405 406 If there is no active region, this command creates an empty Org 407 table. But it is easier just to start typing, like {{{kbd(| 408 N a m e | P h o n e | A g e RET | - TAB)}}}. 409 410 ** Re-aligning and field motion 411 :PROPERTIES: 412 :UNNUMBERED: notoc 413 :END: 414 415 #+attr_texinfo: :sep , 416 - {{{kbd(C-c C-c)}}} (~org-table-align~) :: 417 418 Re-align the table without moving point. 419 420 - {{{kbd(TAB)}}} (~org-table-next-field~) :: 421 422 Re-align the table, move to the next field. Creates a new row if 423 necessary. 424 425 - {{{kbd(S-TAB)}}} (~org-table-previous-field~) :: 426 427 Re-align, move to previous field. 428 429 - {{{kbd(RET)}}} (~org-table-next-row~) :: 430 431 Re-align the table and move down to next row. Creates a new row if 432 necessary. 433 434 - {{{kbd(S-UP)}}} (~org-table-move-cell-up~), {{{kbd(S-DOWN)}}} (~org-table-move-cell-down~), {{{kbd(S-LEFT)}}} (~org-table-move-cell-left~), {{{kbd(S-RIGHT)}}} (~org-table-move-cell-right~) :: 435 436 Move a cell up, down, left, and right by swapping with adjacent 437 cell. 438 439 ** Column and row editing 440 :PROPERTIES: 441 :UNNUMBERED: notoc 442 :END: 443 444 - {{{kbd(M-LEFT)}}} (~org-table-move-column-left~), {{{kbd(M-RIGHT)}}} (~org-table-move-column-right~) :: 445 446 Move the current column left/right. 447 448 - {{{kbd(M-S-LEFT)}}} (~org-table-delete-column~) :: 449 450 Kill the current column. 451 452 - {{{kbd(M-S-RIGHT)}}} (~org-table-insert-column~) :: 453 454 Insert a new column to the left of point position. 455 456 - {{{kbd(M-UP)}}} (~org-table-move-row-up~), {{{kbd(M-DOWN)}}} (~org-table-move-row-down~) :: 457 458 Move the current row up/down. 459 460 - {{{kbd(M-S-UP)}}} (~org-table-kill-row~) :: 461 462 Kill the current row or horizontal line. 463 464 - {{{kbd(M-S-DOWN)}}} (~org-table-insert-row~) :: 465 466 Insert a new row above the current row. With a prefix argument, the 467 line is created below the current one. 468 469 - {{{kbd(C-c -)}}} (~org-table-insert-hline~) :: 470 471 Insert a horizontal line below current row. With a prefix argument, 472 the line is created above the current line. 473 474 - {{{kbd(C-c RET)}}} (~org-table-hline-and-move~) :: 475 476 Insert a horizontal line below current row, and move the point into 477 the row below that line. 478 479 - {{{kbd(C-c ^)}}} (~org-table-sort-lines~) :: 480 481 Sort the table lines in the region. The position of point indicates 482 the column to be used for sorting, and the range of lines is the 483 range between the nearest horizontal separator lines, or the entire 484 table. 485 486 * Hyperlinks 487 :PROPERTIES: 488 :DESCRIPTION: Notes in context. 489 :END: 490 491 Like HTML, Org provides links inside a file, external links to other 492 files, Usenet articles, emails, and much more. 493 494 Org recognizes plain URIs, possibly wrapped within angle brackets, and 495 activate them as clickable links. The general link format, however, 496 looks like this: 497 498 : [[LINK][DESCRIPTION]] 499 500 #+texinfo: @noindent 501 or alternatively 502 503 : [[LINK]] 504 505 Once a link in the buffer is complete, with all brackets present, Org 506 changes the display so that =DESCRIPTION= is displayed instead of 507 =[[LINK][DESCRIPTION]]= and =LINK= is displayed instead of =[[LINK]]=. 508 To edit the invisible {{{var(LINK)}}} part, use {{{kbd(C-c C-l)}}} 509 with the point on the link. 510 511 ** Internal links 512 :PROPERTIES: 513 :UNNUMBERED: notoc 514 :END: 515 516 If the link does not look like a URL, it is considered to be internal 517 in the current file. The most important case is a link like 518 =[[#my-custom-id]]= which links to the entry with the =CUSTOM_ID= property 519 =my-custom-id=. 520 521 Links such as =[[My Target]]= or =[[My Target][Find my target]]= lead 522 to a text search in the current file for the corresponding target, 523 which looks like =<<My Target>>=. 524 525 ** External Links 526 :PROPERTIES: 527 :UNNUMBERED: notoc 528 :END: 529 530 Org supports links to files, websites, Usenet and email messages, BBDB 531 database entries and links to both IRC conversations and their logs. 532 External links are URL-like locators. They start with a short 533 identifying string followed by a colon. There can be no space after 534 the colon. Here are some examples: 535 536 | =http://www.astro.uva.nl/=dominik= | on the web | 537 | =file:/home/dominik/images/jupiter.jpg= | file, absolute path | 538 | =/home/dominik/images/jupiter.jpg= | same as above | 539 | =file:papers/last.pdf= | file, relative path | 540 | =./papers/last.pdf= | same as above | 541 | =file:projects.org= | another Org file | 542 | =docview:papers/last.pdf::NNN= | open in DocView mode at page {{{var(NNN)}}} | 543 | =id:B7423F4D-2E8A-471B-8810-C40F074717E9= | link to heading by ID | 544 | =news:comp.emacs= | Usenet link | 545 | =mailto:adent@galaxy.net= | mail link | 546 | =mhe:folder#id= | MH-E message link | 547 | =rmail:folder#id= | Rmail message link | 548 | =gnus:group#id= | Gnus article link | 549 | =bbdb:R.*Stallman= | BBDB link (with regexp) | 550 | =irc:/irc.com/#emacs/bob= | IRC link | 551 | =info:org#Hyperlinks= | Info node link | 552 553 File links can contain additional information to make Emacs jump to 554 a particular location in the file when following a link. This can be 555 a line number or a search option after a double colon. Here are a few 556 examples,, together with an explanation: 557 558 | =file:~/code/main.c::255= | Find line 255 | 559 | =file:~/xx.org::My Target= | Find =<<My Target>>= | 560 | =[[file:~/xx.org::#my-custom-id]]= | Find entry with a custom ID | 561 562 ** Handling Links 563 :PROPERTIES: 564 :UNNUMBERED: notoc 565 :END: 566 567 Org provides methods to create a link in the correct syntax, to insert 568 it into an Org file, and to follow the link. 569 570 The main function is ~org-store-link~, called with {{{kbd(M-x 571 org-store-link)}}}. Because of its importance, we suggest to bind it 572 to a widely available key (see [[*Activation]]). It stores a link to the 573 current location. The link is stored for later insertion into an Org 574 buffer---see below. 575 576 From an Org buffer, the following commands create, navigate or, more 577 generally, act on links. 578 579 #+attr_texinfo: :sep , 580 - {{{kbd(C-c C-l)}}} (~org-insert-link~) :: 581 582 Insert a link. This prompts for a link to be inserted into the 583 buffer. You can just type a link, or use history keys {{{kbd(UP)}}} 584 and {{{kbd(DOWN)}}} to access stored links. You will be prompted 585 for the description part of the link. 586 587 When called with a {{{kbd(C-u)}}} prefix argument, file name 588 completion is used to link to a file. 589 590 - {{{kbd(C-c C-l)}}} (with point on existing link) (~org-insert-link~) :: 591 592 When point is on an existing link, {{{kbd(C-c C-l)}}} allows you to 593 edit the link and description parts of the link. 594 595 - {{{kbd(C-c C-o)}}} (~open-link-at-point~) :: 596 597 Open link at point. 598 599 - {{{kbd(C-c &)}}} (~org-mark-ring-goto~) :: 600 601 Jump back to a recorded position. A position is recorded by the 602 commands following internal links, and by {{{kbd(C-c %)}}}. Using 603 this command several times in direct succession moves through a ring 604 of previously recorded positions. 605 606 * TODO Items 607 :PROPERTIES: 608 :DESCRIPTION: Every tree branch can be a TODO item. 609 :END: 610 611 Org mode does not require TODO lists to live in separate documents. 612 Instead, TODO items are part of a notes file, because TODO items 613 usually come up while taking notes! With Org mode, simply mark any 614 entry in a tree as being a TODO item. In this way, information is not 615 duplicated, and TODO items remain in the context from which they 616 emerged. 617 618 Org mode provides methods to give you an overview of all the things 619 that you have to do, collected from many files. 620 621 ** Basic TODO Functionality 622 :PROPERTIES: 623 :DESCRIPTION: Marking and displaying TODO entries. 624 :ALT_TITLE: TODO Basics 625 :END: 626 627 Any headline becomes a TODO item when it starts with the word =TODO=, 628 for example: 629 630 : *** TODO Write letter to Sam Fortune 631 632 The most important commands to work with TODO entries are: 633 634 #+attr_texinfo: :sep , 635 - {{{kbd(C-c C-t)}}} (~org-todo~) :: 636 637 Rotate the TODO state of the current item among 638 639 : ,-> (unmarked) -> TODO -> DONE --. 640 : '--------------------------------' 641 642 The same rotation can also be done "remotely" from the agenda buffer 643 with the {{{kbd(t)}}} command key (see [[*Commands in the Agenda 644 Buffer]]). 645 646 - {{{kbd(S-RIGHT)}}} (~org-shiftright~), {{{kbd(S-LEFT)}}} (~org-shiftleft~) :: 647 648 Select the following/preceding TODO state, similar to cycling. 649 650 - {{{kbd(C-c / t)}}} (~org-show-todo-tree~) :: 651 652 View TODO items in a /sparse tree/ (see [[*Sparse Trees]]). Folds the 653 entire buffer, but shows all TODO items---with not-DONE state---and 654 the headings hierarchy above them. 655 656 - {{{kbd(M-x org-agenda t)}}} (~org-todo-list~) :: 657 658 Show the global TODO list. Collects the TODO items (with not-DONE 659 states) from all agenda files (see [[*Agenda Views]]) into a single 660 buffer. See [[*The Global TODO List]], for more information. 661 662 - {{{kbd(S-M-RET)}}} (~org-insert-todo-heading~) :: 663 664 Insert a new TODO entry below the current one. 665 666 Changing a TODO state can also trigger tag changes. See the docstring 667 of the option ~org-todo-state-tags-triggers~ for details. 668 669 ** Multi-state Workflow 670 :PROPERTIES: 671 :DESCRIPTION: More than just on/off. 672 :END: 673 674 You can use TODO keywords to indicate /sequential/ working progress 675 states: 676 677 #+begin_src emacs-lisp 678 (setq org-todo-keywords 679 '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED"))) 680 #+end_src 681 682 #+texinfo: @noindent 683 The vertical bar separates the =TODO= keywords (states that /need 684 action/) from the =DONE= states (which need /no further action/). If 685 you do not provide the separator bar, the last state is used as the 686 =DONE= state. With this setup, the command {{{kbd(C-c C-t)}}} cycles 687 an entry from =TODO= to =FEEDBACK=, then to =VERIFY=, and finally to 688 =DONE= and =DELEGATED=. 689 690 Sometimes you may want to use different sets of TODO keywords in 691 parallel. For example, you may want to have the basic =TODO=/=DONE=, 692 but also a workflow for bug fixing. Your setup would then look like 693 this: 694 695 #+begin_src emacs-lisp 696 (setq org-todo-keywords 697 '((sequence "TODO(t)" "|" "DONE(d)") 698 (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)"))) 699 #+end_src 700 701 #+texinfo: @noindent 702 The keywords should all be different, this helps Org mode to keep 703 track of which subsequence should be used for a given entry. The 704 example also shows how to define keys for fast access of a particular 705 state, by adding a letter in parenthesis after each keyword---you will 706 be prompted for the key after {{{kbd(C-c C-t)}}}. 707 708 To define TODO keywords that are valid only in a single file, use the 709 following text anywhere in the file. 710 711 #+begin_example 712 ,#+TODO: TODO(t) | DONE(d) 713 ,#+TODO: REPORT(r) BUG(b) KNOWNCAUSE(k) | FIXED(f) 714 ,#+TODO: | CANCELED(c) 715 #+end_example 716 717 After changing one of these lines, use {{{kbd(C-c C-c)}}} with the 718 cursor still in the line to make the changes known to Org mode. 719 720 ** Progress Logging 721 :PROPERTIES: 722 :DESCRIPTION: Dates and notes for progress. 723 :END: 724 725 To record a timestamp and a note when changing a TODO state, call the 726 command ~org-todo~ with a prefix argument. 727 728 #+attr_texinfo: :sep , 729 - {{{kbd(C-u C-c C-t)}}} (~org-todo~) :: 730 Prompt for a note and record a the time of the TODO state change. 731 732 Org mode can also automatically record a timestamp and optionally a 733 note when you mark a TODO item as DONE, or even each time you change 734 the state of a TODO item. This system is highly configurable, 735 settings can be on a per-keyword basis and can be localized to a file 736 or even a subtree. For information on how to clock working time for a 737 task, see [[*Clocking Work Time]]. 738 739 *** Closing items 740 :PROPERTIES: 741 :UNNUMBERED: notoc 742 :END: 743 744 The most basic logging is to keep track of /when/ a certain TODO item 745 was marked as done. This can be achieved with[fn:4] 746 747 #+begin_src emacs-lisp 748 (setq org-log-done 'time) 749 #+end_src 750 751 #+texinfo: @noindent 752 Then each time you turn an entry from a TODO (not-done) state into any 753 of the DONE states, a line =CLOSED: [timestamp]= is inserted just 754 after the headline. 755 756 If you want to record a note along with the timestamp, use[fn:5] 757 758 #+begin_src emacs-lisp 759 (setq org-log-done 'note) 760 #+end_src 761 762 #+texinfo: @noindent 763 You are then be prompted for a note, and that note is stored below the 764 entry with a =Closing Note= heading. 765 766 *** Tracking TODO state changes 767 :PROPERTIES: 768 :UNNUMBERED: notoc 769 :END: 770 771 You might want to keep track of TODO state changes. You can either 772 record just a timestamp, or a time-stamped note for a change. These 773 records are inserted after the headline as an itemized list. When 774 taking a lot of notes, you might want to get the notes out of the way 775 into a drawer. Customize the variable ~org-log-into-drawer~ to get 776 this behavior. 777 778 For state logging, Org mode expects configuration on a per-keyword 779 basis. This is achieved by adding special markers =!= (for 780 a timestamp) and =@= (for a note) in parentheses after each keyword. 781 For example: 782 783 : #+TODO: TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@) 784 785 #+texinfo: @noindent 786 defines TODO keywords and fast access keys, and also request that 787 a time is recorded when the entry is set to =DONE=, and that a note is 788 recorded when switching to =WAIT= or =CANCELED=. The same syntax 789 works also when setting ~org-todo-keywords~. 790 791 ** Priorities 792 :PROPERTIES: 793 :DESCRIPTION: Some things are more important than others. 794 :END: 795 796 If you use Org mode extensively, you may end up with enough TODO items 797 that it starts to make sense to prioritize them. Prioritizing can be 798 done by placing a /priority cookie/ into the headline of a TODO item, 799 like this 800 801 : *** TODO [#A] Write letter to Sam Fortune 802 803 Org mode supports three priorities: =A=, =B=, and =C=. =A= is the 804 highest, =B= the default if none is given. Priorities make 805 a difference only in the agenda. 806 807 #+attr_texinfo: :sep ; 808 - {{{kbd(C-c \,)}}} (~org-priority~) :: 809 810 Set the priority of the current headline. Press {{{kbd(A)}}}, 811 {{{kbd(B)}}} or {{{kbd(C)}}} to select a priority, or {{{kbd(SPC)}}} 812 to remove the cookie. 813 814 - {{{kbd(S-UP)}}} (~org-priority-up~); {{{kbd(S-DOWN)}}} (~org-priority-down~) :: 815 816 Increase/decrease the priority of the current headline. 817 818 ** Breaking Tasks Down into Subtasks 819 :PROPERTIES: 820 :DESCRIPTION: Splitting a task into manageable pieces. 821 :ALT_TITLE: Breaking Down Tasks 822 :END: 823 824 It is often advisable to break down large tasks into smaller, 825 manageable subtasks. You can do this by creating an outline tree 826 below a TODO item, with detailed subtasks on the tree. To keep an 827 overview of the fraction of subtasks that have already been marked 828 as done, insert either =[/]= or =[%]= anywhere in the headline. These 829 cookies are updated each time the TODO status of a child changes, or 830 when pressing {{{kbd(C-c C-c)}}} on the cookie. For example: 831 832 #+begin_example 833 ,* Organize Party [33%] 834 ,** TODO Call people [1/2] 835 ,*** TODO Peter 836 ,*** DONE Sarah 837 ,** TODO Buy food 838 ,** DONE Talk to neighbor 839 #+end_example 840 841 ** Checkboxes 842 :PROPERTIES: 843 :DESCRIPTION: Tick-off lists. 844 :END: 845 846 Every item in a plain list (see [[*Plain Lists]]) can be made into 847 a checkbox by starting it with the string =[ ]=. Checkboxes are not 848 included into the global TODO list, so they are often great to split 849 a task into a number of simple steps. 850 851 Here is an example of a checkbox list. 852 853 #+begin_example 854 ,* TODO Organize party [2/4] 855 - [-] call people [1/2] 856 - [ ] Peter 857 - [X] Sarah 858 - [X] order food 859 #+end_example 860 861 Checkboxes work hierarchically, so if a checkbox item has children 862 that are checkboxes, toggling one of the children checkboxes makes the 863 parent checkbox reflect if none, some, or all of the children are 864 checked. 865 866 The following commands work with checkboxes: 867 868 - {{{kbd(C-c C-c)}}}, {{{kbd(C-u C-c C-c)}}} (~org-toggle-checkbox~) :: 869 870 Toggle checkbox status or---with prefix argument---checkbox presence 871 at point. 872 873 - {{{kbd(M-S-RET)}}} (~org-insert-todo-heading~) :: 874 875 Insert a new item with a checkbox. This works only if point is 876 already in a plain list item (see [[*Plain Lists]]). 877 878 * Tags 879 :PROPERTIES: 880 :DESCRIPTION: Tagging headlines and matching sets of tags. 881 :END: 882 883 An excellent way to implement labels and contexts for 884 cross-correlating information is to assign /tags/ to headlines. Org 885 mode has extensive support for tags. 886 887 Every headline can contain a list of tags; they occur at the end of 888 the headline. Tags are normal words containing letters, numbers, =_=, 889 and =@=. Tags must be preceded and followed by a single colon, e.g., 890 =:work:=. Several tags can be specified, as in =:work:urgent:=. Tags 891 by default are in bold face with the same color as the headline. 892 893 ** Tag inheritance 894 :PROPERTIES: 895 :UNNUMBERED: notoc 896 :END: 897 898 Tags make use of the hierarchical structure of outline trees. If 899 a heading has a certain tag, all subheadings inherit the tag as well. 900 For example, in the list 901 902 #+begin_example 903 ,* Meeting with the French group :work: 904 ,** Summary by Frank :boss:notes: 905 ,*** TODO Prepare slides for him :action: 906 #+end_example 907 908 #+texinfo: @noindent 909 the final heading has the tags =work=, =boss=, =notes=, and =action= 910 even though the final heading is not explicitly marked with those 911 tags. 912 913 You can also set tags that all entries in a file should inherit just 914 as if these tags were defined in a hypothetical level zero that 915 surrounds the entire file. Use a line like this[fn:6]: 916 917 : #+FILETAGS: :Peter:Boss:Secret: 918 919 ** Setting tags 920 :PROPERTIES: 921 :UNNUMBERED: notoc 922 :END: 923 924 Tags can simply be typed into the buffer at the end of a headline. 925 After a colon, {{{kbd(M-TAB)}}} offers completion on tags. There is 926 also a special command for inserting tags: 927 928 - {{{kbd(C-c C-q)}}} (~org-set-tags-command~) :: 929 930 Enter new tags for the current headline. Org mode either offers 931 completion or a special single-key interface for setting tags, see 932 below. 933 934 - {{{kbd(C-c C-c)}}} (~org-set-tags-command~) :: 935 936 When point is in a headline, this does the same as {{{kbd(C-c 937 C-q)}}}. 938 939 Org supports tag insertion based on a /list of tags/. By default this 940 list is constructed dynamically, containing all tags currently used in 941 the buffer. You may also globally specify a hard list of tags with 942 the variable ~org-tag-alist~. Finally you can set the default tags 943 for a given file using the =TAGS= keyword, like 944 945 : #+TAGS: @work @home @tennisclub 946 : #+TAGS: laptop car pc sailboat 947 948 By default Org mode uses the standard minibuffer completion facilities 949 for entering tags. However, it also implements another, quicker, tag 950 selection method called /fast tag selection/. This allows you to 951 select and deselect tags with just a single key press. For this to 952 work well you should assign unique letters to most of your commonly 953 used tags. You can do this globally by configuring the variable 954 ~org-tag-alist~ in your Emacs init file. For example, you may find 955 the need to tag many items in different files with =@home=. In this 956 case you can set something like: 957 958 #+begin_src emacs-lisp 959 (setq org-tag-alist '(("@work" . ?w) ("@home" . ?h) ("laptop" . ?l))) 960 #+end_src 961 962 If the tag is only relevant to the file you are working on, then you 963 can instead set the =TAGS= keyword as: 964 965 : #+TAGS: @work(w) @home(h) @tennisclub(t) laptop(l) pc(p) 966 967 ** Tag groups 968 :PROPERTIES: 969 :UNNUMBERED: notoc 970 :END: 971 972 A tag can be defined as a /group tag/ for a set of other tags. The 973 group tag can be seen as the "broader term" for its set of tags. 974 975 You can set group tags by using brackets and inserting a colon between 976 the group tag and its related tags: 977 978 : #+TAGS: [ GTD : Control Persp ] 979 980 #+texinfo: @noindent 981 or, if tags in the group should be mutually exclusive: 982 983 : #+TAGS: { Context : @Home @Work } 984 985 When you search for a group tag, it return matches for all members in 986 the group and its subgroups. In an agenda view, filtering by a group 987 tag displays or hide headlines tagged with at least one of the members 988 of the group or any of its subgroups. 989 990 If you want to ignore group tags temporarily, toggle group tags 991 support with ~org-toggle-tags-groups~, bound to {{{kbd(C-c C-x q)}}}. 992 993 ** Tag searches 994 :PROPERTIES: 995 :UNNUMBERED: notoc 996 :END: 997 998 - {{{kbd(C-c / m)}}} or {{{kbd(C-c \)}}} (~org-match-sparse-tree~) :: 999 1000 Create a sparse tree with all headlines matching a tags search. 1001 With a {{{kbd(C-u)}}} prefix argument, ignore headlines that are not 1002 a TODO line. 1003 1004 - {{{kbd(M-x org-agenda m)}}} (~org-tags-view~) :: 1005 1006 Create a global list of tag matches from all agenda files. See 1007 [[*Matching Tags and Properties]]. 1008 1009 - {{{kbd(M-x org-agenda M)}}} (~org-tags-view~) :: 1010 1011 Create a global list of tag matches from all agenda files, but check 1012 only TODO items. 1013 1014 These commands all prompt for a match string which allows basic 1015 Boolean logic like =+boss+urgent-project1=, to find entries with tags 1016 =boss= and =urgent=, but not =project1=, or =Kathy|Sally= to find 1017 entries which are tagged, like =Kathy= or =Sally=. The full syntax of 1018 the search string is rich and allows also matching against TODO 1019 keywords, entry levels and properties. For a more detailed description 1020 with many examples, see [[*Matching Tags and Properties]]. 1021 1022 * Properties 1023 :PROPERTIES: 1024 :DESCRIPTION: Storing information about an entry. 1025 :END: 1026 1027 Properties are key-value pairs associated with an entry. They live in 1028 a special drawer with the name =PROPERTIES=. Each property is 1029 specified on a single line, with the key (surrounded by colons) first, 1030 and the value after it: 1031 1032 #+begin_example 1033 ,* CD collection 1034 ,** Classic 1035 ,*** Goldberg Variations 1036 :PROPERTIES: 1037 :Title: Goldberg Variations 1038 :Composer: J.S. Bach 1039 :Publisher: Deutsche Grammophon 1040 :NDisks: 1 1041 :END: 1042 #+end_example 1043 1044 You may define the allowed values for a particular property =Xyz= by 1045 setting a property =Xyz_ALL=. This special property is /inherited/, 1046 so if you set it in a level 1 entry, it applies to the entire tree. 1047 When allowed values are defined, setting the corresponding property 1048 becomes easier and is less prone to typing errors. For the example 1049 with the CD collection, we can pre-define publishers and the number of 1050 disks in a box like this: 1051 1052 #+begin_example 1053 ,* CD collection 1054 :PROPERTIES: 1055 :NDisks_ALL: 1 2 3 4 1056 :Publisher_ALL: "Deutsche Grammophon" Philips EMI 1057 :END: 1058 #+end_example 1059 1060 If you want to set properties that can be inherited by any entry in 1061 a file, use a line like: 1062 1063 : #+PROPERTY: NDisks_ALL 1 2 3 4 1064 1065 The following commands help to work with properties: 1066 1067 - {{{kbd(C-c C-x p)}}} (~org-set-property~) :: 1068 1069 Set a property. This prompts for a property name and a value. 1070 1071 - {{{kbd(C-c C-c d)}}} (~org-delete-property~) :: 1072 1073 Remove a property from the current entry. 1074 1075 To create sparse trees and special lists with selection based on 1076 properties, the same commands are used as for tag searches (see 1077 [[*Tags]]). The syntax for the search string is described in [[*Matching 1078 Tags and Properties]]. 1079 1080 * Dates and Times 1081 :PROPERTIES: 1082 :DESCRIPTION: Making items useful for planning. 1083 :END: 1084 1085 To assist project planning, TODO items can be labeled with a date 1086 and/or a time. The specially formatted string carrying the date and 1087 time information is called a /timestamp/ in Org mode. This may be 1088 a little confusing because timestamp is often used as indicating when 1089 something was created or last changed. However, in Org mode this term 1090 is used in a much wider sense. 1091 1092 Timestamps can be used to plan appointments, schedule tasks, set 1093 deadlines, track time, and more. The following sections describe 1094 the timestamp format and tooling that Org mode provides for common 1095 use cases dealing with time and time intervals. 1096 1097 ** Timestamps 1098 :PROPERTIES: 1099 :DESCRIPTION: Assigning a time to a tree entry. 1100 :END: 1101 1102 A timestamp is a specification of a date---possibly with a time or 1103 a range of times---in a special format, either =<2003-09-16 Tue>= or 1104 =<2003-09-16 Tue 09:39>= or =<2003-09-16 Tue 12:00-12:30>=. 1105 A timestamp can appear anywhere in the headline or body of an Org tree 1106 entry. Its presence causes entries to be shown on specific dates in 1107 the agenda (see [[*The Weekly/Daily Agenda]]). We distinguish: 1108 1109 - Plain timestamp; Event; Appointment :: 1110 1111 A simple timestamp just assigns a date/time to an item. This is 1112 just like writing down an appointment or event in a paper agenda. 1113 There can be multiple timestamps in an item. 1114 1115 #+begin_example 1116 ,* Meet Peter at the movies 1117 <2006-11-01 Wed 19:15> 1118 ,* Discussion on climate change 1119 <2006-11-02 Thu 20:00-22:00> 1120 ,* My days off 1121 <2006-11-03 Fri> 1122 <2006-11-06 Mon> 1123 #+end_example 1124 1125 - Timestamp with repeater interval :: 1126 1127 A timestamp may contain a /repeater interval/, indicating that it 1128 applies not only on the given date, but again and again after 1129 a certain interval of N hours (h), days (d), weeks (w), months (m), 1130 or years (y). The following shows up in the agenda every Wednesday: 1131 1132 #+begin_example 1133 ,* Pick up Sam at school 1134 <2007-05-16 Wed 12:30 +1w> 1135 #+end_example 1136 1137 - Diary-style expression entries :: 1138 1139 For more complex date specifications, Org mode supports using the 1140 special expression diary entries implemented in the Emacs Calendar 1141 package. For example, with optional time: 1142 1143 #+begin_example 1144 ,* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month 1145 <%%(diary-float t 4 2)> 1146 #+end_example 1147 1148 - Time range :: 1149 1150 Time range is a timestamp having two time units connected by =-= 1151 1152 #+begin_example 1153 ,* Discussion on climate change 1154 <2006-11-02 Thu 10:00-12:00> 1155 #+end_example 1156 1157 - Time/Date range :: 1158 1159 Two timestamps connected by =--= denote a range. In the agenda, the 1160 headline is shown on the first and last day of the range, and on any 1161 dates that are displayed and fall in the range. The first example 1162 specifies just the dates of the range while the second example 1163 specifies a time range for each date. 1164 1165 #+begin_example 1166 ,** Meeting in Amsterdam 1167 <2004-08-23 Mon>--<2004-08-26 Thu> 1168 ,** This weeks committee meetings 1169 <2004-08-23 Mon 10:00-11:00>--<2004-08-26 Thu 10:00-11:00> 1170 #+end_example 1171 1172 - Inactive timestamp :: 1173 1174 Just like a plain timestamp, but with square brackets instead of 1175 angular ones. These timestamps are inactive in the sense that they 1176 do /not/ trigger an entry to show up in the agenda. 1177 1178 #+begin_example 1179 ,* Gillian comes late for the fifth time 1180 [2006-11-01 Wed] 1181 #+end_example 1182 1183 ** Creating Timestamps 1184 :PROPERTIES: 1185 :DESCRIPTION: Commands that insert timestamps. 1186 :END: 1187 1188 For Org mode to recognize timestamps, they need to be in the specific 1189 format. All commands listed below produce timestamps in the correct 1190 format. 1191 1192 #+attr_texinfo: :sep , 1193 - {{{kbd(C-c .)}}} (~org-timestamp~) :: 1194 1195 Prompt for a date and insert a corresponding timestamp. When point 1196 is at an existing timestamp in the buffer, the command is used to 1197 modify this timestamp instead of inserting a new one. When this 1198 command is used twice in succession, a time range is inserted. With 1199 a prefix argument, it also adds the current time. 1200 1201 - {{{kbd(C-c !)}}} (~org-timestamp-inactive~) :: 1202 1203 Like {{{kbd(C-c .)}}}, but insert an inactive timestamp that does 1204 not cause an agenda entry. 1205 1206 - {{{kbd(S-LEFT)}}} (~org-timestamp-down-day~), {{{kbd(S-RIGHT)}}} (~org-timestamp-up-day~) :: 1207 1208 Change date at point by one day. 1209 1210 - {{{kbd(S-UP)}}} (~org-timestamp-up~), {{{kbd(S-DOWN)}}} (~org-timestamp-down~) :: 1211 1212 On the beginning or enclosing bracket of a timestamp, change its 1213 type. Within a timestamp, change the item under point. Point can 1214 be on a year, month, day, hour or minute. When the timestamp 1215 contains a time range like =15:30-16:30=, modifying the first time 1216 also shifts the second, shifting the time block with constant 1217 length. To change the length, modify the second time. 1218 1219 1220 When Org mode prompts for a date/time, it accepts any string 1221 containing some date and/or time information, and intelligently 1222 interprets the string, deriving defaults for unspecified information 1223 from the current date and time. You can also select a date in the 1224 pop-up calendar. See the [[info:org][manual]] for more information on how exactly 1225 the date/time prompt works. 1226 1227 ** Deadlines and Scheduling 1228 :PROPERTIES: 1229 :DESCRIPTION: Planning your work. 1230 :END: 1231 1232 A timestamp may be preceded by special keywords to facilitate 1233 planning: 1234 1235 - {{{kbd(C-c C-d)}}} (~org-deadline~) :: 1236 1237 Insert =DEADLINE= keyword along with a time stamp, in the line 1238 following the headline. 1239 1240 Meaning: the task---most likely a TODO item, though not 1241 necessarily---is supposed to be finished on that date. 1242 1243 On the deadline date, the task is listed in the agenda. In 1244 addition, the agenda for /today/ carries a warning about the 1245 approaching or missed deadline, starting ~org-deadline-warning-days~ 1246 before the due date, and continuing until the entry is marked as 1247 done. An example: 1248 1249 #+begin_example 1250 ,*** TODO write article about the Earth for the Guide 1251 DEADLINE: <2004-02-29 Sun> 1252 The editor in charge is [[bbdb:Ford Prefect]] 1253 #+end_example 1254 1255 - {{{kbd(C-c C-s)}}} (~org-schedule~) :: 1256 1257 Insert =SCHEDULED= keyword along with a stamp, in the line following 1258 the headline. 1259 1260 Meaning: you are planning to start working on that task on the given 1261 date[fn:7]. 1262 1263 The headline is listed under the given date[fn:8]. In addition, 1264 a reminder that the scheduled date has passed is present in the 1265 compilation for /today/, until the entry is marked as done, i.e., 1266 the task is automatically forwarded until completed. 1267 1268 #+begin_example 1269 ,*** TODO Call Trillian for a date on New Years Eve. 1270 SCHEDULED: <2004-12-25 Sat> 1271 #+end_example 1272 1273 Some tasks need to be repeated again and again. Org mode helps to 1274 organize such tasks using a so-called repeater in a =DEADLINE=, 1275 =SCHEDULED=, or plain timestamps. In the following example: 1276 1277 #+begin_example 1278 ,** TODO Pay the rent 1279 DEADLINE: <2005-10-01 Sat +1m> 1280 #+end_example 1281 1282 #+texinfo: @noindent 1283 the =+1m= is a repeater; the intended interpretation is that the task 1284 has a deadline on =<2005-10-01>= and repeats itself every (one) month 1285 starting from that time. 1286 1287 ** Clocking Work Time 1288 :PROPERTIES: 1289 :DESCRIPTION: Tracking how long you spent on a task. 1290 :END: 1291 1292 Org mode allows you to clock the time you spend on specific tasks in 1293 a project. 1294 1295 #+attr_texinfo: :sep , 1296 - {{{kbd(C-c C-x C-i)}}} (~org-clock-in~) :: 1297 1298 Start the clock on the current item (clock-in). This inserts the 1299 =CLOCK= keyword together with a timestamp. When called with 1300 a {{{kbd(C-u)}}} prefix argument, select the task from a list of 1301 recently clocked tasks. 1302 1303 - {{{kbd(C-c C-x C-o)}}} (~org-clock-out~) :: 1304 1305 Stop the clock (clock-out). This inserts another timestamp at the 1306 same location where the clock was last started. It also directly 1307 computes the resulting time in inserts it after the time range as 1308 ==>HH:MM=. 1309 1310 - {{{kbd(C-c C-x C-e)}}} (~org-clock-modify-effort-estimate~) :: 1311 1312 Update the effort estimate for the current clock task. 1313 1314 - {{{kbd(C-c C-x C-q)}}} (~org-clock-cancel~) :: 1315 1316 Cancel the current clock. This is useful if a clock was started by 1317 mistake, or if you ended up working on something else. 1318 1319 - {{{kbd(C-c C-x C-j)}}} (~org-clock-goto~) :: 1320 1321 Jump to the headline of the currently clocked in task. With 1322 a {{{kbd(C-u)}}} prefix argument, select the target task from a list 1323 of recently clocked tasks. 1324 1325 The {{{kbd(l)}}} key may be used in the agenda (see [[*The Weekly/Daily 1326 Agenda]]) to show which tasks have been worked on or closed during 1327 a day. 1328 1329 * Capture, Refile, Archive 1330 :PROPERTIES: 1331 :DESCRIPTION: The ins and outs for projects. 1332 :END: 1333 1334 An important part of any organization system is the ability to quickly 1335 capture new ideas and tasks, and to associate reference material with 1336 them. Org does this using a process called /capture/. It also can 1337 store files related to a task (/attachments/) in a special directory. 1338 Once in the system, tasks and projects need to be moved around. 1339 Moving completed project trees to an archive file keeps the system 1340 compact and fast. 1341 1342 ** Capture 1343 :PROPERTIES: 1344 :DESCRIPTION: Capturing new stuff. 1345 :END: 1346 1347 Capture lets you quickly store notes with little interruption of your 1348 work flow. You can define templates for new entries and associate 1349 them with different targets for storing notes. 1350 1351 *** Setting up capture 1352 :PROPERTIES: 1353 :UNNUMBERED: notoc 1354 :END: 1355 1356 The following customization sets a default target[fn:9] file for notes. 1357 1358 #+begin_src emacs-lisp 1359 (setq org-default-notes-file (concat org-directory "/notes.org")) 1360 #+end_src 1361 1362 You may also define a global key for capturing new material (see 1363 [[*Activation]]). 1364 1365 *** Using capture 1366 :PROPERTIES: 1367 :UNNUMBERED: notoc 1368 :END: 1369 1370 - {{{kbd(M-x org-capture)}}} (~org-capture~) :: 1371 1372 Start a capture process, placing you into a narrowed indirect buffer 1373 to edit. 1374 1375 - {{{kbd(C-c C-c)}}} (~org-capture-finalize~) :: 1376 1377 Once you have finished entering information into the capture buffer, 1378 {{{kbd(C-c C-c)}}} returns you to the window configuration before 1379 the capture process, so that you can resume your work without 1380 further distraction. 1381 1382 - {{{kbd(C-c C-w)}}} (~org-capture-refile~) :: 1383 1384 Finalize the capture process by refiling the note to a different 1385 place (see [[*Refile and Copy]]). 1386 1387 - {{{kbd(C-c C-k)}}} (~org-capture-kill~) :: 1388 1389 Abort the capture process and return to the previous state. 1390 1391 *** Capture templates 1392 :PROPERTIES: 1393 :UNNUMBERED: notoc 1394 :END: 1395 1396 You can use templates for different types of capture items, and for 1397 different target locations. Say you would like to use one template to 1398 create general TODO entries, and you want to put these entries under 1399 the heading =Tasks= in your file =~/org/gtd.org=. Also, a date tree 1400 in the file =journal.org= should capture journal entries. A possible 1401 configuration would look like: 1402 1403 #+begin_src emacs-lisp 1404 (setq org-capture-templates 1405 '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") 1406 "* TODO %?\n %i\n %a") 1407 ("j" "Journal" entry (file+datetree "~/org/journal.org") 1408 "* %?\nEntered on %U\n %i\n %a"))) 1409 #+end_src 1410 1411 If you then press {{{kbd(t)}}} from the capture menu, Org will prepare 1412 the template for you like this: 1413 1414 : * TODO 1415 : [[file:LINK TO WHERE YOU INITIATED CAPTURE]] 1416 1417 #+texinfo: @noindent 1418 During expansion of the template, special %-escapes[fn:10] allow 1419 dynamic insertion of content. Here is a small selection of the 1420 possibilities, consult the [[info:org][manual]] for more. 1421 1422 | =%a= | annotation, normally the link created with ~org-store-link~ | 1423 | =%i= | initial content, the region when capture is called with {{{kbd(C-u)}}} | 1424 | =%t=, =%T= | timestamp, date only, or date and time | 1425 | =%u=, =%U= | like above, but inactive timestamps | 1426 | =%?= | after completing the template, position point here | 1427 1428 ** Refile and Copy 1429 :PROPERTIES: 1430 :DESCRIPTION: Moving/copying a tree from one place to another. 1431 :END: 1432 1433 When reviewing the captured data, you may want to refile or to copy 1434 some of the entries into a different list, for example into a project. 1435 Cutting, finding the right location, and then pasting the note is 1436 cumbersome. To simplify this process, you can use the following 1437 special command: 1438 1439 - {{{kbd(C-c C-w)}}} (~org-agenda-refile~) :: 1440 1441 Refile the entry or region at point. This command offers possible 1442 locations for refiling the entry and lets you select one with 1443 completion. The item (or all items in the region) is filed below 1444 the target heading as a subitem. 1445 1446 By default, all level 1 headlines in the current buffer are 1447 considered to be targets, but you can have more complex definitions 1448 across a number of files. See the variable ~org-refile-targets~ for 1449 details. 1450 1451 - {{{kbd(C-u C-c C-w)}}} (~org-agenda-refile~) :: 1452 1453 Use the refile interface to jump to a heading. 1454 1455 - {{{kbd(C-u C-u C-c C-w)}}} (~org-refile-goto-last-stored~) :: 1456 1457 Jump to the location where ~org-refile~ last moved a tree to. 1458 1459 - {{{kbd(C-c M-w)}}} (~org-refile-copy~) :: 1460 1461 Copying works like refiling, except that the original note is not 1462 deleted. 1463 1464 ** Archiving 1465 :PROPERTIES: 1466 :DESCRIPTION: What to do with finished products. 1467 :END: 1468 1469 When a project represented by a (sub)tree is finished, you may want to 1470 move the tree out of the way and to stop it from contributing to the 1471 agenda. Archiving is important to keep your working files compact and 1472 global searches like the construction of agenda views fast. 1473 1474 The most common archiving action is to move a project tree to another 1475 file, the archive file. 1476 1477 - {{{kbd(C-c C-x C-a)}}} (~org-archive-subtree-default~) :: 1478 1479 Archive the current entry using the command specified in the 1480 variable ~org-archive-default-command~. 1481 1482 - {{{kbd(C-c C-x C-s)}}} or short {{{kbd(C-c $)}}} (~org-archive-subtree~) :: 1483 1484 Archive the subtree starting at point position to the location given 1485 by ~org-archive-location~. 1486 1487 The default archive location is a file in the same directory as the 1488 current file, with the name derived by appending =_archive= to the 1489 current file name. You can also choose what heading to file archived 1490 items under, with the possibility to add them to a datetree in a file. 1491 For information and examples on how to specify the file and the 1492 heading, see the documentation string of the variable 1493 ~org-archive-location~. 1494 1495 There is also an in-buffer option for setting this variable, for 1496 example: 1497 1498 : #+ARCHIVE: %s_done:: 1499 1500 * Agenda Views 1501 :PROPERTIES: 1502 :DESCRIPTION: Collecting information into views. 1503 :END: 1504 1505 Due to the way Org works, TODO items, time-stamped items, and tagged 1506 headlines can be scattered throughout a file or even a number of 1507 files. To get an overview of open action items, or of events that are 1508 important for a particular date, this information must be collected, 1509 sorted and displayed in an organized way. 1510 1511 The extracted information is displayed in a special /agenda buffer/. 1512 This buffer is read-only, but provides commands to visit the 1513 corresponding locations in the original Org files, and even to edit 1514 these files remotely. Remote editing from the agenda buffer means, 1515 for example, that you can change the dates of deadlines and 1516 appointments from the agenda buffer. For commands available in the 1517 Agenda buffer, see [[*Commands in the Agenda Buffer]]. 1518 1519 ** Agenda Files 1520 :PROPERTIES: 1521 :DESCRIPTION: Files being searched for agenda information. 1522 :END: 1523 1524 The information to be shown is normally collected from all /agenda 1525 files/, the files listed in the variable ~org-agenda-files~. 1526 1527 # Use "/" separator because "," is in one of the bindings. 1528 #+attr_texinfo: :sep / 1529 - {{{kbd(C-c [)}}} (~org-agenda-file-to-front~) :: 1530 1531 Add current file to the list of agenda files. The file is added to 1532 the front of the list. If it was already in the list, it is moved 1533 to the front. With a prefix argument, file is added/moved to the 1534 end. 1535 1536 - {{{kbd(C-c ])}}} (~org-remove-file~) :: 1537 1538 Remove current file from the list of agenda files. 1539 1540 - {{{kbd(C-')}}} / {{{kbd(C-\,)}}} (~org-cycle-agenda-files~) :: 1541 1542 Cycle through agenda file list, visiting one file after the other. 1543 1544 ** The Agenda Dispatcher 1545 :PROPERTIES: 1546 :DESCRIPTION: Keyboard access to agenda views. 1547 :ALT_TITLE: Agenda Dispatcher 1548 :END: 1549 1550 The views are created through a dispatcher, accessible with {{{kbd(M-x 1551 org-agenda)}}}, or, better, bound to a global key (see [[*Activation]]). 1552 It displays a menu from which an additional letter is required to 1553 execute a command. The dispatcher offers the following default 1554 commands: 1555 1556 #+attr_texinfo: :sep , 1557 - {{{kbd(a)}}} :: 1558 1559 Create the calendar-like agenda (see [[*The Weekly/Daily Agenda]]). 1560 1561 - {{{kbd(t)}}}, {{{kbd(T)}}} :: 1562 1563 Create a list of all TODO items (see [[*The Global TODO List]]). 1564 1565 - {{{kbd(m)}}}, {{{kbd(M)}}} :: 1566 1567 Create a list of headlines matching a given expression (see 1568 [[*Matching Tags and Properties]]). 1569 1570 - {{{kbd(s)}}} :: 1571 1572 #+kindex: s @r{(Agenda dispatcher)} 1573 Create a list of entries selected by a boolean expression of 1574 keywords and/or regular expressions that must or must not occur in 1575 the entry. 1576 1577 ** The Weekly/Daily Agenda 1578 :PROPERTIES: 1579 :DESCRIPTION: What is available out of the box? 1580 :ALT_TITLE: Built-in Agenda Views 1581 :END: 1582 1583 The purpose of the weekly/daily /agenda/ is to act like a page of 1584 a paper agenda, showing all the tasks for the current week or day. 1585 1586 - {{{kbd(M-x org-agenda a)}}} (~org-agenda-list~) :: 1587 1588 Compile an agenda for the current week from a list of Org files. 1589 The agenda shows the entries for each day. 1590 1591 Org mode understands the syntax of the diary and allows you to use 1592 diary expression entries directly in Org files: 1593 1594 #+begin_example 1595 ,* Holidays 1596 :PROPERTIES: 1597 :CATEGORY: Holiday 1598 :END: 1599 %%(org-calendar-holiday) ; special function for holiday names 1600 1601 ,* Birthdays 1602 :PROPERTIES: 1603 :CATEGORY: Ann 1604 :END: 1605 %%(org-anniversary 1956 5 14) Arthur Dent is %d years old 1606 %%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old 1607 #+end_example 1608 1609 Org can interact with Emacs appointments notification facility. To 1610 add the appointments of your agenda files, use the command 1611 ~org-agenda-to-appt~. 1612 1613 ** The Global TODO List 1614 :PROPERTIES: 1615 :DESCRIPTION: All unfinished action items. 1616 :ALT_TITLE: Global TODO List 1617 :END: 1618 1619 The global TODO list contains all unfinished TODO items formatted and 1620 collected into a single place. Remote editing of TODO items lets you 1621 can change the state of a TODO entry with a single key press. For 1622 commands available in the TODO list, see [[*Commands in the Agenda 1623 Buffer]]. 1624 1625 - {{{kbd(M-x org-agenda t)}}} (~org-todo-list~) :: 1626 1627 Show the global TODO list. This collects the TODO items from all 1628 agenda files (see [[*Agenda Views]]) into a single buffer. 1629 1630 - {{{kbd(M-x org-agenda T)}}} (~org-todo-list~) :: 1631 1632 Like the above, but allows selection of a specific TODO keyword. 1633 1634 ** Matching Tags and Properties 1635 :PROPERTIES: 1636 :DESCRIPTION: Structured information with fine-tuned search. 1637 :END: 1638 1639 If headlines in the agenda files are marked with /tags/ (see [[*Tags]]), 1640 or have properties (see [[*Properties]]), you can select headlines based 1641 on this metadata and collect them into an agenda buffer. The match 1642 syntax described here also applies when creating sparse trees with 1643 {{{kbd(C-c / m)}}}. 1644 1645 - {{{kbd(M-x org-agenda m)}}} (~org-tags-view~) :: 1646 1647 Produce a list of all headlines that match a given set of tags. The 1648 command prompts for a selection criterion, which is a boolean logic 1649 expression with tags, like =+work+urgent-withboss= or =work|home= 1650 (see [[*Tags]]). If you often need a specific search, define a custom 1651 command for it (see [[*The Agenda Dispatcher]]). 1652 1653 - {{{kbd(M-x org-agenda M)}}} (~org-tags-view~) :: 1654 1655 Like {{{kbd(m)}}}, but only select headlines that are also TODO 1656 items. 1657 1658 A search string can use Boolean operators =&= for AND and =|= for OR. 1659 =&= binds more strongly than =|=. Parentheses are currently not 1660 implemented. Each element in the search is either a tag, a regular 1661 expression matching tags, or an expression like =PROPERTY OPERATOR 1662 VALUE= with a comparison operator, accessing a property value. Each 1663 element may be preceded by =-= to select against it, and =+= is 1664 syntactic sugar for positive selection. The AND operator =&= is 1665 optional when =+= or =-= is present. Here are some examples, using 1666 only tags. 1667 1668 - =+work-boss= :: 1669 1670 Select headlines tagged =work=, but discard those also tagged 1671 =boss=. 1672 1673 - =work|laptop= :: 1674 1675 Selects lines tagged =work= or =laptop=. 1676 1677 - =work|laptop+night= :: 1678 1679 Like before, but require the =laptop= lines to be tagged also 1680 =night=. 1681 1682 You may also test for properties at the same time as matching tags, 1683 see the [[info:org][manual]] for more information. 1684 1685 ** Search View 1686 :PROPERTIES: 1687 :DESCRIPTION: Find entries by searching for text. 1688 :END: 1689 1690 This agenda view is a general text search facility for Org mode 1691 entries. It is particularly useful to find notes. 1692 1693 - {{{kbd(M-x org-agenda s)}}} (~org-search-view~) :: 1694 1695 #+kindex: s @r{(Agenda dispatcher)} 1696 #+findex: org-search-view 1697 This is a special search that lets you select entries by matching 1698 a substring or specific words using a boolean logic. 1699 1700 For example, the search string =computer equipment= matches entries 1701 that contain =computer equipment= as a substring. 1702 1703 Search view can also search for specific keywords in the entry, using 1704 Boolean logic. The search string =+computer 1705 +wifi -ethernet -{8\.11[bg]}= matches note entries that contain the 1706 keywords =computer= and =wifi=, but not the keyword =ethernet=, and 1707 which are also not matched by the regular expression =8\.11[bg]=, 1708 meaning to exclude both =8.11b= and =8.11g=. 1709 1710 Note that in addition to the agenda files, this command also searches 1711 the files listed in ~org-agenda-text-search-extra-files~. 1712 1713 ** Commands in the Agenda Buffer 1714 :PROPERTIES: 1715 :DESCRIPTION: Remote editing of Org trees. 1716 :ALT_TITLE: Agenda Commands 1717 :END: 1718 1719 Entries in the agenda buffer are linked back to the Org file or diary 1720 file where they originate. You are not allowed to edit the agenda 1721 buffer itself, but commands are provided to show and jump to the 1722 original entry location, and to edit the Org files "remotely" from the 1723 agenda buffer. This is just a selection of the many commands, explore 1724 the agenda menu and the [[info:org][manual]] for a complete list. 1725 1726 *** Motion 1727 :PROPERTIES: 1728 :UNNUMBERED: notoc 1729 :END: 1730 1731 - {{{kbd(n)}}} (~org-agenda-next-line~) :: 1732 1733 Next line (same as {{{kbd(DOWN)}}} and {{{kbd(C-n)}}}). 1734 1735 - {{{kbd(p)}}} (~org-agenda-previous-line~) :: 1736 1737 Previous line (same as {{{kbd(UP)}}} and {{{kbd(C-p)}}}). 1738 1739 *** View/Go to Org file 1740 :PROPERTIES: 1741 :UNNUMBERED: notoc 1742 :END: 1743 1744 - {{{kbd(SPC)}}} (~org-agenda-show-and-scroll-up~) :: 1745 1746 Display the original location of the item in another window. 1747 With a prefix argument, make sure that drawers stay folded. 1748 1749 - {{{kbd(TAB)}}} (~org-agenda-goto~) :: 1750 1751 Go to the original location of the item in another window. 1752 1753 - {{{kbd(RET)}}} (~org-agenda-switch-to~) :: 1754 1755 Go to the original location of the item and delete other windows. 1756 1757 *** Change display 1758 :PROPERTIES: 1759 :UNNUMBERED: notoc 1760 :END: 1761 #+attr_texinfo: :sep , 1762 - {{{kbd(o)}}} (~delete-other-windows~) :: 1763 1764 Delete other windows. 1765 1766 - {{{kbd(v d)}}} or short {{{kbd(d)}}} (~org-agenda-day-view~) :: 1767 1768 Switch to day view. 1769 1770 - {{{kbd(v w)}}} or short {{{kbd(w)}}} (~org-agenda-week-view~) :: 1771 1772 Switch to week view. 1773 1774 - {{{kbd(f)}}} (~org-agenda-later~) :: 1775 1776 Go forward in time to display the span following the current one. 1777 For example, if the display covers a week, switch to the following 1778 week. 1779 1780 - {{{kbd(b)}}} (~org-agenda-earlier~) :: 1781 1782 Go backward in time to display earlier dates. 1783 1784 - {{{kbd(.)}}} (~org-agenda-goto-today~) :: 1785 1786 Go to today. 1787 1788 - {{{kbd(j)}}} (~org-agenda-goto-date~) :: 1789 1790 Prompt for a date and go there. 1791 1792 - {{{kbd(v l)}}} or {{{kbd(v L)}}} or short {{{kbd(l)}}} (~org-agenda-log-mode~) :: 1793 1794 Toggle Logbook mode. In Logbook mode, entries that were marked as 1795 done while logging was on (see the variable ~org-log-done~) are 1796 shown in the agenda, as are entries that have been clocked on that 1797 day. When called with a {{{kbd(C-u)}}} prefix argument, show all 1798 possible logbook entries, including state changes. 1799 1800 - {{{kbd(r)}}}, {{{kbd(g)}}} (~org-agenda-redo~) :: 1801 1802 Recreate the agenda buffer, for example to reflect the changes after 1803 modification of the timestamps of items. 1804 1805 - {{{kbd(s)}}} (~org-save-all-org-buffers~) :: 1806 1807 #+kindex: C-x C-s 1808 #+findex: org-save-all-org-buffers 1809 #+kindex: s 1810 Save all Org buffers in the current Emacs session, and also the 1811 locations of IDs. 1812 1813 *** Remote editing 1814 :PROPERTIES: 1815 :UNNUMBERED: notoc 1816 :END: 1817 1818 - {{{kbd(0--9)}}} :: 1819 1820 Digit argument. 1821 1822 - {{{kbd(t)}}} (~org-agenda-todo~) :: 1823 1824 Change the TODO state of the item, both in the agenda and in the 1825 original Org file. 1826 1827 - {{{kbd(C-k)}}} (~org-agenda-kill~) :: 1828 1829 Delete the current agenda item along with the entire subtree 1830 belonging to it in the original Org file. 1831 1832 - {{{kbd(C-c C-w)}}} (~org-agenda-refile~) :: 1833 1834 Refile the entry at point. 1835 1836 - {{{kbd(a)}}} (~org-agenda-archive-default-with-confirmation~) :: 1837 1838 Archive the subtree corresponding to the entry at point using the 1839 default archiving command set in ~org-archive-default-command~. 1840 1841 - {{{kbd($)}}} (~org-agenda-archive~) :: 1842 1843 Archive the subtree corresponding to the current headline. 1844 1845 - {{{kbd(C-c C-s)}}} (~org-agenda-schedule~) :: 1846 1847 Schedule this item. With a prefix argument, remove the 1848 scheduling timestamp 1849 1850 - {{{kbd(C-c C-d)}}} (~org-agenda-deadline~) :: 1851 1852 Set a deadline for this item. With a prefix argument, remove the 1853 deadline. 1854 1855 - {{{kbd(S-RIGHT)}}} (~org-agenda-do-date-later~) :: 1856 1857 Change the timestamp associated with the current line by one day 1858 into the future. 1859 1860 - {{{kbd(S-LEFT)}}} (~org-agenda-do-date-earlier~) :: 1861 1862 Change the timestamp associated with the current line by one day 1863 into the past. 1864 1865 - {{{kbd(I)}}} (~org-agenda-clock-in~) :: 1866 1867 Start the clock on the current item. 1868 1869 - {{{kbd(O)}}} (~org-agenda-clock-out~) :: 1870 1871 Stop the previously started clock. 1872 1873 - {{{kbd(X)}}} (~org-agenda-clock-cancel~) :: 1874 1875 Cancel the currently running clock. 1876 1877 - {{{kbd(J)}}} (~org-agenda-clock-goto~) :: 1878 1879 Jump to the running clock in another window. 1880 1881 *** Quit and exit 1882 :PROPERTIES: 1883 :UNNUMBERED: notoc 1884 :END: 1885 1886 - {{{kbd(q)}}} (~org-agenda-quit~) :: 1887 1888 Quit agenda, remove the agenda buffer. 1889 1890 - {{{kbd(x)}}} (~org-agenda-exit~) :: 1891 1892 Exit agenda, remove the agenda buffer and all buffers loaded by 1893 Emacs for the compilation of the agenda. 1894 1895 ** Custom Agenda Views 1896 :PROPERTIES: 1897 :DESCRIPTION: Defining special searches and views. 1898 :END: 1899 1900 The first application of custom searches is the definition of keyboard 1901 shortcuts for frequently used searches, either creating an agenda 1902 buffer, or a sparse tree (the latter covering of course only the 1903 current buffer). 1904 1905 Custom commands are configured in the variable 1906 ~org-agenda-custom-commands~. You can customize this variable, for 1907 example by pressing {{{kbd(C)}}} from the agenda dispatcher (see [[*The 1908 Agenda Dispatcher]]). You can also directly set it with Emacs Lisp in 1909 the Emacs init file. The following example contains all valid agenda 1910 views: 1911 1912 #+begin_src emacs-lisp 1913 (setq org-agenda-custom-commands 1914 '(("w" todo "WAITING") 1915 ("u" tags "+boss-urgent") 1916 ("v" tags-todo "+boss-urgent"))) 1917 #+end_src 1918 1919 The initial string in each entry defines the keys you have to press 1920 after the dispatcher command in order to access the command. Usually 1921 this is just a single character. The second parameter is the search 1922 type, followed by the string or regular expression to be used for the 1923 matching. The example above will therefore define: 1924 1925 - {{{kbd(w)}}} :: 1926 1927 as a global search for TODO entries with =WAITING= as the TODO 1928 keyword. 1929 1930 - {{{kbd(u)}}} :: 1931 1932 as a global tags search for headlines tagged =boss= but not 1933 =urgent=. 1934 1935 - {{{kbd(v)}}} :: 1936 1937 The same search, but limiting it to headlines that are also TODO 1938 items. 1939 1940 * Markup for Rich Contents 1941 :PROPERTIES: 1942 :DESCRIPTION: Compose beautiful documents. 1943 :ALT_TITLE: Markup 1944 :END: 1945 1946 Org is primarily about organizing and searching through your 1947 plain-text notes. However, it also provides a lightweight yet robust 1948 markup language for rich text formatting and more. Used in 1949 conjunction with the export framework (see [[*Exporting]]), you can author 1950 beautiful documents in Org. 1951 1952 ** Paragraphs 1953 :PROPERTIES: 1954 :DESCRIPTION: The basic unit of text. 1955 :END: 1956 1957 Paragraphs are separated by at least one empty line. If you need to 1958 enforce a line break within a paragraph, use =\\= at the end of 1959 a line. 1960 1961 To preserve the line breaks, indentation and blank lines in a region, 1962 but otherwise use normal formatting, you can use this construct, which 1963 can also be used to format poetry. 1964 1965 #+begin_example 1966 ,#+BEGIN_VERSE 1967 Great clouds overhead 1968 Tiny black birds rise and fall 1969 Snow covers Emacs 1970 1971 ---AlexSchroeder 1972 ,#+END_VERSE 1973 #+end_example 1974 1975 When quoting a passage from another document, it is customary to 1976 format this as a paragraph that is indented on both the left and the 1977 right margin. You can include quotations in Org documents like this: 1978 1979 #+begin_example 1980 ,#+BEGIN_QUOTE 1981 Everything should be made as simple as possible, 1982 but not any simpler ---Albert Einstein 1983 ,#+END_QUOTE 1984 #+end_example 1985 1986 If you would like to center some text, do it like this: 1987 1988 #+begin_example 1989 ,#+BEGIN_CENTER 1990 Everything should be made as simple as possible, \\ 1991 but not any simpler 1992 ,#+END_CENTER 1993 #+end_example 1994 1995 ** Emphasis and Monospace 1996 :PROPERTIES: 1997 :DESCRIPTION: Bold, italic, etc. 1998 :END: 1999 2000 You can make words =*bold*=, =/italic/=, =_underlined_=, ==verbatim== 2001 and =~code~=, and, if you must, =+strike-through+=. Text in the code 2002 and verbatim string is not processed for Org specific syntax; it is 2003 exported verbatim. 2004 2005 ** Embedded LaTeX 2006 :PROPERTIES: 2007 :DESCRIPTION: LaTeX can be freely used inside Org documents. 2008 :END: 2009 2010 For scientific notes which need to be able to contain mathematical 2011 symbols and the occasional formula, Org mode supports embedding LaTeX 2012 code into its files. You can directly use TeX-like syntax for special 2013 symbols, enter formulas and entire LaTeX environments. 2014 2015 #+begin_example 2016 The radius of the sun is R_sun = 6.96 x 10^8 m. On the other hand, 2017 the radius of Alpha Centauri is R_{Alpha Centauri} = 1.28 x R_{sun}. 2018 2019 \begin{equation} % arbitrary environments, 2020 x=\sqrt{b} % even tables, figures 2021 \end{equation} % etc 2022 2023 If $a^2=b$ and \( b=2 \), then the solution must be 2024 either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \]. 2025 #+end_example 2026 2027 ** Literal examples 2028 :PROPERTIES: 2029 :DESCRIPTION: Source code examples with special formatting. 2030 :END: 2031 2032 You can include literal examples that should not be subjected to 2033 markup. Such examples are typeset in monospace, so this is well 2034 suited for source code and similar examples. 2035 2036 #+begin_example 2037 ,#+BEGIN_EXAMPLE 2038 Some example from a text file. 2039 ,#+END_EXAMPLE 2040 #+end_example 2041 2042 For simplicity when using small examples, you can also start the 2043 example lines with a colon followed by a space. There may also be 2044 additional whitespace before the colon: 2045 2046 #+begin_example 2047 Here is an example 2048 : Some example from a text file. 2049 #+end_example 2050 2051 If the example is source code from a programming language, or any 2052 other text that can be marked up by Font Lock in Emacs, you can ask 2053 for the example to look like the fontified Emacs buffer. 2054 2055 #+begin_example 2056 ,#+BEGIN_SRC emacs-lisp 2057 (defun org-xor (a b) 2058 "Exclusive or." 2059 (if a (not b) b)) 2060 ,#+END_SRC 2061 #+end_example 2062 2063 To edit the example in a special buffer supporting this language, use 2064 {{{kbd(C-c ')}}} to both enter and leave the editing buffer. 2065 2066 ** Images 2067 :PROPERTIES: 2068 :DESCRIPTION: Display an image. 2069 :END: 2070 2071 An image is a link to an image file that does not have a description 2072 part, for example 2073 2074 : ./img/cat.jpg 2075 2076 If you wish to define a caption for the image and maybe a label for 2077 internal cross references (see [[*Hyperlinks]]), make sure that the 2078 link is on a line by itself and precede it with =CAPTION= and =NAME= 2079 keywords as follows: 2080 2081 #+begin_example 2082 ,#+CAPTION: This is the caption for the next figure link (or table) 2083 ,#+NAME: fig:SED-HR4049 2084 [[./img/a.jpg]] 2085 #+end_example 2086 2087 ** Creating Footnotes 2088 :PROPERTIES: 2089 :DESCRIPTION: Edit and read footnotes. 2090 :END: 2091 2092 A footnote is defined in a paragraph that is started by a footnote 2093 marker in square brackets in column 0, no indentation allowed. The 2094 footnote reference is simply the marker in square brackets, inside 2095 text. For example: 2096 2097 #+begin_example 2098 The Org website[fn:1] now looks a lot better than it used to. 2099 ... 2100 [fn:1] The link is: https://orgmode.org 2101 #+end_example 2102 2103 The following commands handle footnotes: 2104 2105 - {{{kbd(C-c C-x f)}}} (~org-footnote-action~) :: 2106 2107 The footnote action command. When point is on a footnote reference, 2108 jump to the definition. When it is at a definition, jump to the 2109 (first) reference. Otherwise, create a new footnote. When this 2110 command is called with a prefix argument, a menu of additional 2111 options including renumbering is offered. 2112 2113 - {{{kbd(C-c C-c)}}} (~org-ctrl-c-ctrl-c~) :: 2114 2115 Jump between definition and reference. 2116 2117 * Exporting 2118 :PROPERTIES: 2119 :DESCRIPTION: Sharing and publishing notes. 2120 :END: 2121 2122 Org can convert and export documents to a variety of other formats 2123 while retaining as much structure (see [[*Document Structure]]) and markup 2124 (see [[*Markup for Rich Contents]]) as possible. 2125 2126 ** The Export Dispatcher 2127 :PROPERTIES: 2128 :DESCRIPTION: The main interface. 2129 :END: 2130 2131 The export dispatcher is the main interface for Org's exports. 2132 A hierarchical menu presents the currently configured export formats. 2133 Options are shown as easy toggle switches on the same screen. 2134 2135 - {{{kbd(C-c C-e)}}} (~org-export-dispatch~) :: 2136 2137 Invokes the export dispatcher interface. 2138 2139 Org exports the entire buffer by default. If the Org buffer has an 2140 active region, then Org exports just that region. 2141 2142 ** Export Settings 2143 :PROPERTIES: 2144 :DESCRIPTION: Common export settings. 2145 :END: 2146 2147 The exporter recognizes special lines in the buffer which provide 2148 additional information. These lines may be put anywhere in the file: 2149 2150 : #+TITLE: I'm in the Mood for Org 2151 2152 Most proeminent export options include: 2153 2154 | =TITLE= | the title to be shown | 2155 | =AUTHOR= | the author (default taken from ~user-full-name~) | 2156 | =DATE= | a date, fixed, or an Org timestamp | 2157 | =EMAIL= | email address (default from ~user-mail-address~) | 2158 | =LANGUAGE= | language code, e.g., =en= | 2159 2160 Option keyword sets can be inserted from the export dispatcher (see 2161 [[*The Export Dispatcher]]) using the =Insert template= command by 2162 pressing {{{kbd(#)}}}. 2163 2164 ** Table of Contents 2165 :PROPERTIES: 2166 :DESCRIPTION: The if and where of the table of contents. 2167 :END: 2168 2169 The table of contents includes all headlines in the document. Its 2170 depth is therefore the same as the headline levels in the file. If 2171 you need to use a different depth, or turn it off entirely, set the 2172 ~org-export-with-toc~ variable accordingly. You can achieve the same 2173 on a per file basis, using the following =toc= item in =OPTIONS= 2174 keyword: 2175 2176 #+begin_example 2177 ,#+OPTIONS: toc:2 (only include two levels in TOC) 2178 ,#+OPTIONS: toc:nil (no default TOC at all) 2179 #+end_example 2180 2181 Org normally inserts the table of contents directly before the first 2182 headline of the file. 2183 2184 ** Include Files 2185 :PROPERTIES: 2186 :DESCRIPTION: Include additional files into a document. 2187 :END: 2188 2189 During export, you can include the content of another file. For 2190 example, to include your =.emacs= file, you could use: 2191 2192 : #+INCLUDE: "~/.emacs" src emacs-lisp 2193 2194 #+texinfo: @noindent 2195 The first parameter is the file name to include. The optional second 2196 parameter specifies the block type: =example=, =export= or =src=. The 2197 optional third parameter specifies the source code language to use for 2198 formatting the contents. This is relevant to both =export= and =src= 2199 block types. 2200 2201 You can visit the included file with {{{kbd(C-c ')}}}. 2202 2203 ** Comment Lines 2204 :PROPERTIES: 2205 :DESCRIPTION: What will not be exported. 2206 :END: 2207 2208 Lines starting with zero or more whitespace characters followed by one 2209 =#= and a whitespace are treated as comments and, as such, are not 2210 exported. 2211 2212 Likewise, regions surrounded by =#+BEGIN_COMMENT= ... =#+END_COMMENT= 2213 are not exported. 2214 2215 Finally, a =COMMENT= keyword at the beginning of an entry, but after 2216 any other keyword or priority cookie, comments out the entire subtree. 2217 The command below helps changing the comment status of a headline. 2218 2219 - {{{kbd(C-c ;)}}} (~org-toggle-comment~) :: 2220 2221 Toggle the =COMMENT= keyword at the beginning of an entry. 2222 2223 ** ASCII/UTF-8 Export 2224 :PROPERTIES: 2225 :DESCRIPTION: Exporting to flat files with encoding. 2226 :END: 2227 2228 ASCII export produces an output file containing only plain ASCII 2229 characters. This is the simplest and most direct text output. It 2230 does not contain any Org markup. UTF-8 export uses additional 2231 characters and symbols available in this encoding standards. 2232 2233 #+attr_texinfo: :sep , 2234 - {{{kbd(C-c C-e t a)}}}, {{{kbd(C-c C-e t u)}}} (~org-ascii-export-to-ascii~) :: 2235 2236 Export as an ASCII file with a =.txt= extension. For =myfile.org=, 2237 Org exports to =myfile.txt=, overwriting without warning. For 2238 =myfile.txt=, Org exports to =myfile.txt.txt= in order to prevent 2239 data loss. 2240 2241 ** HTML Export 2242 :PROPERTIES: 2243 :DESCRIPTION: Exporting to HTML. 2244 :END: 2245 2246 Org mode contains an HTML exporter with extensive HTML formatting 2247 compatible with XHTML 1.0 strict standard. 2248 2249 - {{{kbd(C-c C-e h h)}}} (~org-html-export-to-html~) :: 2250 2251 Export as HTML file with a =.html= extension. For =myfile.org=, Org 2252 exports to =myfile.html=, overwriting without warning. {{{kbd(C-c 2253 C-e h o)}}} exports to HTML and opens it in a web browser. 2254 2255 The HTML export backend transforms =<= and =>= to =<= and =>=. 2256 To include raw HTML code in the Org file so the HTML export backend 2257 can insert that HTML code in the output, use this inline syntax: 2258 =@@html:...@@=. For example: 2259 2260 : @@html:<b>@@bold text@@html:</b>@@ 2261 2262 For larger raw HTML code blocks, use these HTML export code blocks: 2263 2264 #+begin_example 2265 ,#+HTML: Literal HTML code for export 2266 2267 ,#+BEGIN_EXPORT html 2268 All lines between these markers are exported literally 2269 ,#+END_EXPORT 2270 #+end_example 2271 2272 ** LaTeX Export 2273 :PROPERTIES: 2274 :DESCRIPTION: Exporting to @LaTeX{} and processing to PDF. 2275 :END: 2276 2277 The LaTeX export backend can handle complex documents, incorporate 2278 standard or custom LaTeX document classes, generate documents using 2279 alternate LaTeX engines, and produce fully linked PDF files with 2280 indexes, bibliographies, and tables of contents, destined for 2281 interactive online viewing or high-quality print publication. 2282 2283 By default, the LaTeX output uses the /article/ class. You can change 2284 this by adding an option like =#+LATEX_CLASS: myclass= in your file. 2285 The class must be listed in ~org-latex-classes~. 2286 2287 - {{{kbd(C-c C-e l l)}}} (~org-latex-export-to-latex~) :: 2288 2289 Export to a LaTeX file with a =.tex= extension. For =myfile.org=, 2290 Org exports to =myfile.tex=, overwriting without warning. 2291 2292 - {{{kbd(C-c C-e l p)}}} (~org-latex-export-to-pdf~) :: 2293 2294 Export as LaTeX file and convert it to PDF file. 2295 2296 - {{{kbd(C-c C-e l o)}}} (~<no corresponding named command>~) :: 2297 2298 Export as LaTeX file and convert it to PDF, then open the PDF using 2299 the default viewer. 2300 2301 The LaTeX export backend can insert any arbitrary LaTeX code, see 2302 [[*Embedded LaTeX]]. There are three ways to embed such code in the Org 2303 file and they all use different quoting syntax. 2304 2305 Inserting in-line quoted with @ symbols: 2306 2307 : Code embedded in-line @@latex:any arbitrary LaTeX code@@ in a paragraph. 2308 2309 Inserting as one or more keyword lines in the Org file: 2310 2311 : #+LATEX: any arbitrary LaTeX code 2312 2313 Inserting as an export block in the Org file, where the backend 2314 exports any code between begin and end markers: 2315 2316 #+begin_example 2317 ,#+BEGIN_EXPORT latex 2318 any arbitrary LaTeX code 2319 ,#+END_EXPORT 2320 #+end_example 2321 2322 ** iCalendar Export 2323 :PROPERTIES: 2324 :DESCRIPTION: Exporting to iCalendar. 2325 :END: 2326 2327 A large part of Org mode's interoperability success is its ability to 2328 easily export to or import from external applications. The iCalendar 2329 export backend takes calendar data from Org files and exports to the 2330 standard iCalendar format. 2331 2332 - {{{kbd(C-c C-e c f)}}} (~org-icalendar-export-to-ics~) :: 2333 2334 Create iCalendar entries from the current Org buffer and store them 2335 in the same directory, using a file extension =.ics=. 2336 2337 - {{{kbd(C-c C-e c c)}}} (~org-icalendar-combine-agenda-files~) :: 2338 2339 Create a combined iCalendar file from Org files in 2340 ~org-agenda-files~ and write it to 2341 ~org-icalendar-combined-agenda-file~ file name. 2342 2343 * Publishing 2344 :PROPERTIES: 2345 :DESCRIPTION: Create a web site of linked Org files. 2346 :END: 2347 2348 Org includes a publishing management system that allows you to 2349 configure automatic HTML conversion of /projects/ composed of 2350 interlinked Org files. You can also configure Org to automatically 2351 upload your exported HTML pages and related attachments, such as 2352 images and source code files, to a web server. 2353 2354 You can also use Org to convert files into PDF, or even combine HTML 2355 and PDF conversion so that files are available in both formats on the 2356 server. 2357 2358 For detailed instructions about setup, see the [[info:org][manual]]. Here is an 2359 example: 2360 2361 #+begin_src emacs-lisp 2362 (setq org-publish-project-alist 2363 '(("org" 2364 :base-directory "~/org/" 2365 :publishing-function org-html-publish-to-html 2366 :publishing-directory "~/public_html" 2367 :section-numbers nil 2368 :with-toc nil 2369 :html-head "<link rel=\"stylesheet\" 2370 href=\"../other/mystyle.css\" 2371 type=\"text/css\"/>"))) 2372 #+end_src 2373 2374 - {{{kbd(C-c C-e P x)}}} (~org-publish~) :: 2375 2376 Prompt for a specific project and publish all files that belong to 2377 it. 2378 2379 - {{{kbd(C-c C-e P p)}}} (~org-publish-current-project~) :: 2380 2381 Publish the project containing the current file. 2382 2383 - {{{kbd(C-c C-e P f)}}} (~org-publish-current-file~) :: 2384 2385 Publish only the current file. 2386 2387 - {{{kbd(C-c C-e P a)}}} (~org-publish-all~) :: 2388 2389 Publish every project. 2390 2391 Org uses timestamps to track when a file has changed. The above 2392 functions normally only publish changed files. You can override this 2393 and force publishing of all files by giving a prefix argument to any 2394 of the commands above. 2395 2396 * Working with Source Code 2397 :PROPERTIES: 2398 :DESCRIPTION: Export, evaluate, and tangle code blocks. 2399 :END: 2400 2401 Org mode provides a number of features for working with source code, 2402 including editing of code blocks in their native major mode, 2403 evaluation of code blocks, tangling of code blocks, and exporting code 2404 blocks and their results in several formats. 2405 2406 A source code block conforms to this structure: 2407 2408 #+begin_example 2409 ,#+NAME: <name> 2410 ,#+BEGIN_SRC <language> <switches> <header arguments> 2411 <body> 2412 ,#+END_SRC 2413 #+end_example 2414 2415 #+texinfo: @noindent 2416 where: 2417 2418 - =<name>= is a string used to uniquely name the code block, 2419 2420 - =<language>= specifies the language of the code block, e.g., 2421 =emacs-lisp=, =shell=, =R=, =python=, etc., 2422 2423 - =<switches>= can be used to control export of the code block, 2424 2425 - =<header arguments>= can be used to control many aspects of code 2426 block behavior as demonstrated below, 2427 2428 - =<body>= contains the actual source code. 2429 2430 Use {{{kbd(C-c ')}}} to edit the current code block. It opens a new 2431 major mode edit buffer containing the body of the source code block, 2432 ready for any edits. Use {{{kbd(C-c ')}}} again to close the buffer 2433 and return to the Org buffer. 2434 2435 ** Using header arguments 2436 :PROPERTIES: 2437 :UNNUMBERED: notoc 2438 :END: 2439 2440 A header argument is specified with an initial colon followed by the 2441 argument's name in lowercase. 2442 2443 Header arguments can be set in several ways; Org prioritizes them in 2444 case of overlaps or conflicts by giving local settings a higher 2445 priority. 2446 2447 - System-wide header arguments :: 2448 2449 Those are specified by customizing ~org-babel-default-header-args~ 2450 variable, or, for a specific language {{{var(LANG)}}} 2451 ~org-babel-default-header-args:LANG~. 2452 2453 - Header arguments in properties :: 2454 2455 You can set them using =header-args= property (see [[*Properties]])---or 2456 =header-args:LANG= for language {{{var(LANG)}}}. Header arguments 2457 set through properties drawers apply at the sub-tree level on down. 2458 2459 - Header arguments in code blocks :: 2460 2461 Header arguments are most commonly set at the source code block 2462 level, on the =BEGIN_SRC= line: 2463 2464 #+begin_example 2465 ,#+NAME: factorial 2466 ,#+BEGIN_SRC haskell :results silent :exports code :var n=0 2467 fac 0 = 1 2468 fac n = n * fac (n-1) 2469 ,#+END_SRC 2470 #+end_example 2471 2472 Code block header arguments can span multiple lines using =HEADER= 2473 keyword on each line. 2474 2475 ** Evaluating code blocks 2476 :PROPERTIES: 2477 :UNNUMBERED: notoc 2478 :END: 2479 2480 Use {{{kbd(C-c C-c)}}} to evaluate the current code block and insert 2481 its results in the Org document. By default, evaluation is only 2482 turned on for =emacs-lisp= code blocks, however support exists for 2483 evaluating blocks in many languages. For a complete list of supported 2484 languages see the [[info:org][manual]]. The following shows a code block and its 2485 results. 2486 2487 #+begin_example 2488 ,#+BEGIN_SRC emacs-lisp 2489 (+ 1 2 3 4) 2490 ,#+END_SRC 2491 2492 ,#+RESULTS: 2493 : 10 2494 #+end_example 2495 2496 The following syntax is used to pass arguments to code blocks using 2497 the =var= header argument. 2498 2499 : :var NAME=ASSIGN 2500 2501 #+texinfo: @noindent 2502 {{{var(NAME)}}} is the name of the variable bound in the code block 2503 body. {{{var(ASSIGN)}}} is a literal value, such as a string, 2504 a number, a reference to a table, a list, a literal example, another 2505 code block---with or without arguments---or the results of evaluating 2506 a code block. 2507 2508 ** Results of evaluation 2509 :PROPERTIES: 2510 :UNNUMBERED: notoc 2511 :END: 2512 2513 How Org handles results of a code block execution depends on many 2514 header arguments working together. The primary determinant, however, 2515 is the =results= header argument. It controls the /collection/, 2516 /type/, /format/, and /handling/ of code block results. 2517 2518 - Collection :: 2519 2520 How the results should be collected from the code block. You may 2521 choose either =output= or =value= (the default). 2522 2523 - Type :: 2524 2525 What result types to expect from the execution of the code block. 2526 You may choose among =table=, =list=, =scalar=, and =file=. Org 2527 tries to guess it if you do not provide it. 2528 2529 - Format :: 2530 2531 How Org processes results. Some possible values are =code=, 2532 =drawer=, =html=, =latex=, =link=, and =raw=. 2533 2534 - Handling :: 2535 2536 How to insert the results once properly formatted. Allowed values 2537 are =silent=, =replace= (the default), =append=, or =prepend=. 2538 2539 Code blocks which output results to files---e.g.: graphs, diagrams and 2540 figures---can accept a =:file FILENAME= header argument, in which case 2541 the results are saved to the named file, and a link to the file is 2542 inserted into the buffer. 2543 2544 ** Exporting code blocks 2545 :PROPERTIES: 2546 :UNNUMBERED: notoc 2547 :END: 2548 2549 It is possible to export the /code/ of code blocks, the /results/ of 2550 code block evaluation, /both/ the code and the results of code block 2551 evaluation, or /none/. Org defaults to exporting /code/ for most 2552 languages. 2553 2554 The =exports= header argument is to specify if that part of the Org 2555 file is exported to, say, HTML or LaTeX formats. It can be set to 2556 either =code=, =results=, =both= or =none=. 2557 2558 ** Extracting source code 2559 :PROPERTIES: 2560 :UNNUMBERED: notoc 2561 :END: 2562 2563 Use {{{kbd(C-c C-v t)}}} to create pure source code files by 2564 extracting code from source blocks in the current buffer. This is 2565 referred to as "tangling"---a term adopted from the literate 2566 programming community. During tangling of code blocks their bodies 2567 are expanded using ~org-babel-expand-src-block~, which can expand both 2568 variable and "Noweb" style references. In order to tangle a code 2569 block it must have a =tangle= header argument, see the [[info:org][manual]] for 2570 details. 2571 2572 * Miscellaneous 2573 :PROPERTIES: 2574 :DESCRIPTION: All the rest which did not fit elsewhere. 2575 :END: 2576 2577 ** Completion 2578 :PROPERTIES: 2579 :UNNUMBERED: notoc 2580 :END: 2581 2582 Org has in-buffer completions with {{{kbd(M-TAB)}}}. No minibuffer is 2583 involved. Type one or more letters and invoke the hot key to complete 2584 the text in-place. 2585 2586 For example, this command will complete TeX symbols after =\=, TODO 2587 keywords at the beginning of a headline, and tags after =:= in 2588 a headline. 2589 2590 2591 ** Structure Templates 2592 :PROPERTIES: 2593 :UNNUMBERED: notoc 2594 :END: 2595 2596 To quickly insert empty structural blocks, such as =#+BEGIN_SRC= 2597 ... =#+END_SRC=, or to wrap existing text in such a block, use 2598 2599 - {{{kbd(C-c C-\,)}}} (~org-insert-structure-template~) :: 2600 2601 Prompt for a type of block structure, and insert the block at point. 2602 If the region is active, it is wrapped in the block. 2603 2604 ** Clean view 2605 :PROPERTIES: 2606 :UNNUMBERED: notoc 2607 :END: 2608 2609 Org's default outline with stars and no indents can become too 2610 cluttered for short documents. For /book-like/ long documents, the 2611 effect is not as noticeable. Org provides an alternate stars and 2612 indentation scheme, as shown on the right in the following table. It 2613 uses only one star and indents text to line with the heading: 2614 2615 #+begin_example 2616 ,* Top level headline | * Top level headline 2617 ,** Second level | * Second level 2618 ,*** Third level | * Third level 2619 some text | some text 2620 ,*** Third level | * Third level 2621 more text | more text 2622 ,* Another top level headline | * Another top level headline 2623 #+end_example 2624 2625 This kind of view can be achieved dynamically at display time using 2626 Org Indent mode ({{{kbd(M-x org-indent-mode RET)}}}), which prepends 2627 intangible space to each line. You can turn on Org Indent mode for 2628 all files by customizing the variable ~org-startup-indented~, or you 2629 can turn it on for individual files using 2630 2631 : #+STARTUP: indent 2632 2633 If you want the indentation to be hard space characters so that the 2634 plain text file looks as similar as possible to the Emacs display, Org 2635 supports you by helping to indent (with {{{kbd(TAB)}}}) text below 2636 each headline, by hiding leading stars, and by only using levels 1, 3, 2637 etc to get two characters indentation for each level. To get this 2638 support in a file, use 2639 2640 : #+STARTUP: hidestars odd 2641 2642 * Export Setup :noexport: 2643 2644 #+setupfile: doc-setup.org 2645 2646 #+export_file_name: orgguide.texi 2647 2648 #+texinfo_dir_category: Emacs editing modes 2649 #+texinfo_dir_title: Org Guide: (orgguide) 2650 #+texinfo_dir_desc: Abbreviated Org mode manual 2651 2652 * Footnotes 2653 2654 [fn:1] See the variable ~org-special-ctrl-a/e~ to configure special 2655 behavior of {{{kbd(C-a)}}} and {{{kbd(C-e)}}} in headlines. 2656 2657 [fn:2] If you do not want the line to be split, customize the variable 2658 ~org-M-RET-may-split-line~. 2659 2660 [fn:3] See also the variable ~org-show-context-detail~ to decide how 2661 much context is shown around each match. 2662 2663 [fn:4] The corresponding in-buffer setting is =#+STARTUP: logdone=. 2664 2665 [fn:5] The corresponding in-buffer setting is =#+STARTUP: 2666 logenotedone=. 2667 2668 [fn:6] As with all these in-buffer settings, pressing {{{kbd(C-c 2669 C-c)}}} activates any changes in the line. 2670 2671 [fn:7] This is quite different from what is normally understood by 2672 /scheduling a meeting/, which is done in Org by just inserting a time 2673 stamp without keyword. 2674 2675 [fn:8] It will still be listed on that date after it has been marked 2676 as done. If you do not like this, set the variable 2677 ~org-agenda-skip-scheduled-if-done~. 2678 2679 [fn:9] Using capture templates, you get finer control over capture 2680 locations. See [[*Capture templates]]. 2681 2682 [fn:10] If you need one of these sequences literally, escape the =%= 2683 with a backslash.