dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

orgguide.info (94478B)


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