org.texi 573 KB
 Carsten Dominik committed Jul 19, 2010 1   Glenn Morris committed Sep 06, 2007 2 3 \input texinfo @c %**start of header  Carsten Dominik committed Jul 19, 2010 4 @setfilename info/org  Carsten Dominik committed Apr 27, 2008 5 @settitle The Org Manual  Glenn Morris committed Sep 06, 2007 6   Carsten Dominik committed Jul 19, 2010 7 8 9 10 11 12 13 @set VERSION 7.01 @set DATE July 2010 @c Use proper quote and backtick for code sections in PDF output @c Cf. Texinfo manual 14.2 @set txicodequoteundirected @set txicodequotebacktick  Glenn Morris committed Sep 06, 2007 14 15  @c Version and Contact Info  Carsten Dominik committed Jan 18, 2008 16 @set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}  Glenn Morris committed Sep 06, 2007 17 18 @set AUTHOR Carsten Dominik @set MAINTAINER Carsten Dominik  Carsten Dominik committed Jan 18, 2008 19 20 @set MAINTAINEREMAIL @email{carsten at orgmode dot org} @set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}  Glenn Morris committed Sep 06, 2007 21 22 23 24 @c %**end of header @finalout @c Macro definitions  Carsten Dominik committed Aug 06, 2009 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 @iftex @c @hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed} @end iftex @macro Ie {} I.e., @end macro @macro ie {} i.e., @end macro @macro Eg {} E.g., @end macro @macro eg {} e.g., @end macro  Glenn Morris committed Sep 06, 2007 40 41 42 43 44 45 46 47 48 49 50 51  @c Subheadings inside a table. @macro tsubheading{text} @ifinfo @subsubheading \text\ @end ifinfo @ifnotinfo @item @b{\text\} @end ifnotinfo @end macro @copying  Carsten Dominik committed Aug 06, 2009 52 This manual is for Org version @value{VERSION}.  Glenn Morris committed Sep 06, 2007 53   Carsten Dominik committed Apr 15, 2010 54 Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation  Glenn Morris committed Sep 06, 2007 55 56 57  @quotation Permission is granted to copy, distribute and/or modify this document  Carsten Dominik committed Nov 24, 2008 58 under the terms of the GNU Free Documentation License, Version 1.3 or  Glenn Morris committed Sep 06, 2007 59 60 any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being A GNU Manual,''  Glenn Morris committed Aug 10, 2008 61 62 and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled GNU Free Documentation License.''  Glenn Morris committed Sep 06, 2007 63   Glenn Morris committed Jun 13, 2008 64 65 66 (a) The FSF's Back-Cover Text is: You have the freedom to copy and modify this GNU manual. Buying copies from the FSF supports it in developing GNU and promoting software freedom.''  Glenn Morris committed Jun 15, 2008 67 68 69 70 71  This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document separately from the collection, you can do so by adding a copy of the license to the document, as described in section 6 of the license.  Glenn Morris committed Sep 06, 2007 72 73 74 @end quotation @end copying  Karl Berry committed Feb 16, 2009 75 76 @dircategory Emacs @direntry  Carsten Dominik committed Jul 19, 2010 77 * Org Mode: (org). Outline-based notes management and organizer  Karl Berry committed Feb 16, 2009 78 79 @end direntry  Glenn Morris committed Sep 06, 2007 80 @titlepage  Carsten Dominik committed Apr 27, 2008 81 @title The Org Manual  Glenn Morris committed Sep 06, 2007 82 83 84  @subtitle Release @value{VERSION} @author by Carsten Dominik  Carsten Dominik committed Jul 19, 2010 85 with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, and Thomas Dye  Glenn Morris committed Sep 06, 2007 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103  @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll @insertcopying @end titlepage @c Output the table of contents at the beginning. @contents @ifnottex @node Top, Introduction, (dir), (dir) @top Org Mode Manual @insertcopying @end ifnottex @menu  Carsten Dominik committed Jul 19, 2010 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 * Introduction:: Getting started * Document Structure:: A tree works like your brain * Tables:: Pure magic for quick formatting * Hyperlinks:: Notes in context * TODO Items:: Every tree branch can be a TODO item * Tags:: Tagging headlines and matching sets of tags * Properties and Columns:: Storing information about an entry * Dates and Times:: Making items useful for planning * Capture - Refile - Archive:: The ins and outs for projects * Agenda Views:: Collecting information into views * Markup:: Prepare text for rich export * Exporting:: Sharing and publishing of notes * Publishing:: Create a web site of linked Org files * Working With Source Code:: Export, evaluate, and tangle code blocks * Miscellaneous:: All the rest which did not fit elsewhere * Hacking:: How to hack your way around * MobileOrg:: Viewing and capture on a mobile device * History and Acknowledgments:: How Org came into being * Main Index:: An index of Org's concepts and features * Key Index:: Key bindings and where they are described * Variable Index:: Variables mentioned in the manual  Glenn Morris committed Sep 06, 2007 125 126 127 128 129 130  @detailmenu --- The Detailed Node Listing --- Introduction  Carsten Dominik committed Jul 19, 2010 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 * Summary:: Brief summary of what Org does * Installation:: How to install a downloaded version of Org * Activation:: How to activate Org for certain buffers * Feedback:: Bug reports, ideas, patches etc. * Conventions:: Type-setting conventions in the manual Document structure * Outlines:: Org is based on Outline mode * Headlines:: How to typeset Org tree headlines * Visibility cycling:: Show and hide, much simplified * Motion:: Jumping to other headlines * Structure editing:: Changing sequence and level of headlines * Sparse trees:: Matches embedded in context * Plain lists:: Additional structure within an entry * Drawers:: Tucking stuff away * Blocks:: Folding blocks * Footnotes:: How footnotes are defined in Org's syntax * Orgstruct mode:: Structure editing outside Org  Glenn Morris committed Sep 06, 2007 150 151 152  Tables  Carsten Dominik committed Jul 19, 2010 153 154 155 156 157 158 * Built-in table editor:: Simple tables * Column width and alignment:: Overrule the automatic settings * Column groups:: Grouping to trigger vertical lines * Orgtbl mode:: The table editor as minor mode * The spreadsheet:: The table editor has spreadsheet capabilities * Org-Plot:: Plotting from org tables  Glenn Morris committed Sep 06, 2007 159 160 161  The spreadsheet  Carsten Dominik committed Jul 19, 2010 162 163 164 165 166 * References:: How to refer to another field or range * Formula syntax for Calc:: Using Calc to compute stuff * Formula syntax for Lisp:: Writing formulas in Emacs Lisp * Field formulas:: Formulas valid for a single field * Column formulas:: Formulas valid for an entire column  Glenn Morris committed Sep 06, 2007 167 * Editing and debugging formulas:: Fixing formulas  Carsten Dominik committed Jul 19, 2010 168 169 * Updating the table:: Recomputing all dependent fields * Advanced features:: Field names, parameters and automatic recalc  Glenn Morris committed Sep 06, 2007 170 171 172  Hyperlinks  Carsten Dominik committed Jul 19, 2010 173 174 175 176 177 178 179 180 * Link format:: How links in Org are formatted * Internal links:: Links to other places in the current file * External links:: URL-like links to the world * Handling links:: Creating, inserting and following * Using links outside Org:: Linking from my C source code? * Link abbreviations:: Shortcuts for writing complex links * Search options:: Linking to a specific location * Custom searches:: When the default search is not enough  Glenn Morris committed Sep 06, 2007 181 182 183  Internal links  Carsten Dominik committed Jul 19, 2010 184 * Radio targets:: Make targets trigger links in plain text  Glenn Morris committed Sep 06, 2007 185   Carsten Dominik committed Jul 19, 2010 186 TODO items  Glenn Morris committed Sep 06, 2007 187   Carsten Dominik committed Jul 19, 2010 188 189 190 191 192 193 * TODO basics:: Marking and displaying TODO entries * TODO extensions:: Workflow and assignments * Progress logging:: Dates and notes for progress * Priorities:: Some things are more important than others * Breaking down tasks:: Splitting a task into manageable pieces * Checkboxes:: Tick-off lists  Glenn Morris committed Sep 06, 2007 194 195 196  Extended use of TODO keywords  Carsten Dominik committed Jul 19, 2010 197 198 199 200 201 202 203 * Workflow states:: From TODO to DONE in steps * TODO types:: I do this, Fred does the rest * Multiple sets in one file:: Mixing it all, and still finding your way * Fast access to TODO states:: Single letter selection of a state * Per-file keywords:: Different files, different requirements * Faces for TODO keywords:: Highlighting states * TODO dependencies:: When one task needs to wait for others  Carsten Dominik committed Jan 18, 2008 204   Carsten Dominik committed Apr 27, 2008 205 Progress logging  Carsten Dominik committed Jan 18, 2008 206   Carsten Dominik committed Jul 19, 2010 207 208 209 * Closing items:: When was this entry marked DONE? * Tracking TODO state changes:: When did the status change? * Tracking your habits:: How consistent have you been?  Glenn Morris committed Sep 06, 2007 210 211 212  Tags  Carsten Dominik committed Jul 19, 2010 213 214 215 * Tag inheritance:: Tags use the tree structure of the outline * Setting tags:: How to assign tags to a headline * Tag searches:: Searching for combinations of tags  Glenn Morris committed Sep 06, 2007 216   Carsten Dominik committed Jul 19, 2010 217 Properties and columns  Glenn Morris committed Sep 06, 2007 218   Carsten Dominik committed Jul 19, 2010 219 220 221 222 223 224 * Property syntax:: How properties are spelled out * Special properties:: Access to other Org-mode features * Property searches:: Matching property values * Property inheritance:: Passing values down the tree * Column view:: Tabular viewing and editing * Property API:: Properties for Lisp programmers  Glenn Morris committed Sep 06, 2007 225   Carsten Dominik committed Apr 27, 2008 226 Column view  Glenn Morris committed Sep 06, 2007 227   Carsten Dominik committed Jul 19, 2010 228 229 230 * Defining columns:: The COLUMNS format property * Using column view:: How to create and use column view * Capturing column view:: A dynamic block for column view  Glenn Morris committed Sep 06, 2007 231   Carsten Dominik committed Apr 27, 2008 232 Defining columns  Glenn Morris committed Sep 06, 2007 233   Carsten Dominik committed Jul 19, 2010 234 235 * Scope of column definitions:: Where defined, where valid? * Column attributes:: Appearance and content of a column  Glenn Morris committed Sep 06, 2007 236   Carsten Dominik committed Jul 19, 2010 237 Dates and times  Glenn Morris committed Sep 06, 2007 238   Carsten Dominik committed Jul 19, 2010 239 240 241 242 243 244 245 * Timestamps:: Assigning a time to a tree entry * Creating timestamps:: Commands which insert timestamps * Deadlines and scheduling:: Planning your work * Clocking work time:: Tracking how long you spend on a task * Resolving idle time:: Resolving time if you've been idle * Effort estimates:: Planning work effort in advance * Relative timer:: Notes with a running timer  Glenn Morris committed Sep 06, 2007 246 247 248  Creating timestamps  Carsten Dominik committed Jul 19, 2010 249 250 * The date/time prompt:: How Org-mode helps you entering date and time * Custom time format:: Making dates look different  Glenn Morris committed Sep 06, 2007 251   Carsten Dominik committed Apr 27, 2008 252 Deadlines and scheduling  Glenn Morris committed Sep 06, 2007 253   Carsten Dominik committed Jul 19, 2010 254 255 * Inserting deadline/schedule:: Planning items * Repeated tasks:: Items that show up again and again  Glenn Morris committed Sep 06, 2007 256   Carsten Dominik committed Nov 13, 2009 257 Capture - Refile - Archive  Carsten Dominik committed Oct 12, 2008 258   Carsten Dominik committed Jul 19, 2010 259 260 261 262 263 264 265 266 267 268 269 270 * Capture:: Capturing new stuff * Attachments:: Add files to tasks * RSS Feeds:: Getting input from RSS feeds * Protocols:: External (e.g. Browser) access to Emacs and Org * Refiling notes:: Moving a tree from one place to another * Archiving:: What to do with finished projects Capture * Setting up capture:: Where notes will be stored * Using capture:: Commands to invoke and terminate capture * Capture templates:: Define the outline of different note types  Carsten Dominik committed Oct 12, 2008 271   Carsten Dominik committed Jul 19, 2010 272 Capture templates  Glenn Morris committed Sep 06, 2007 273   Carsten Dominik committed Jul 19, 2010 274 275 * Template elements:: What is needed for a complete template entry * Template expansion:: Filling in information about time and context  Carsten Dominik committed Nov 13, 2009 276 277 278  Archiving  Carsten Dominik committed Jul 19, 2010 279 280 * Moving subtrees:: Moving a tree to an archive file * Internal archiving:: Switch off a tree but keep it in the file  Glenn Morris committed Sep 06, 2007 281   Carsten Dominik committed Jul 19, 2010 282 Agenda views  Glenn Morris committed Sep 06, 2007 283   Carsten Dominik committed Jul 19, 2010 284 285 286 287 288 289 290 291 * Agenda files:: Files being searched for agenda information * Agenda dispatcher:: Keyboard access to agenda views * Built-in agenda views:: What is available out of the box? * Presentation and sorting:: How agenda items are prepared for display * Agenda commands:: Remote editing of Org trees * Custom agenda views:: Defining special searches and views * Exporting Agenda Views:: Writing a view to a file * Agenda column view:: Using column view for collected entries  Glenn Morris committed Sep 06, 2007 292 293 294  The built-in agenda views  Carsten Dominik committed Jul 19, 2010 295 296 * Weekly/daily agenda:: The calendar page with current tasks * Global TODO list:: All unfinished action items  Glenn Morris committed Sep 06, 2007 297 * Matching tags and properties:: Structured information with fine-tuned search  Carsten Dominik committed Jul 19, 2010 298 299 300 * Timeline:: Time-sorted view for single file * Search view:: Find entries by searching for text * Stuck projects:: Find projects you need to review  Glenn Morris committed Sep 06, 2007 301 302 303  Presentation and sorting  Carsten Dominik committed Jul 19, 2010 304 305 306 * Categories:: Not all tasks are equal * Time-of-day specifications:: How the agenda knows the time * Sorting of agenda items:: The order of things  Glenn Morris committed Sep 06, 2007 307 308 309  Custom agenda views  Carsten Dominik committed Jul 19, 2010 310 311 312 * Storing searches:: Type once, use often * Block agenda:: All the stuff you need in a single buffer * Setting Options:: Changing the rules  Glenn Morris committed Sep 06, 2007 313   Carsten Dominik committed Nov 13, 2009 314 315 Markup for rich export  Carsten Dominik committed Jul 19, 2010 316 317 318 319 320 321 322 * Structural markup elements:: The basic structure as seen by the exporter * Images and tables:: Tables and Images will be included * Literal examples:: Source code examples with special formatting * Include files:: Include additional files into a document * Index entries:: Making an index * Macro replacement:: Use macros to create complex output * Embedded LaTeX:: LaTeX can be freely used inside Org documents  Carsten Dominik committed Nov 13, 2009 323 324 325  Structural markup elements  Carsten Dominik committed Jul 19, 2010 326 327 328 329 330 331 332 333 334 335 * Document title:: Where the title is taken from * Headings and sections:: The document structure as seen by the exporter * Table of contents:: The if and where of the table of contents * Initial text:: Text before the first heading? * Lists:: Lists * Paragraphs:: Paragraphs * Footnote markup:: Footnotes * Emphasis and monospace:: Bold, italic, etc. * Horizontal rules:: Make a line * Comment lines:: What will *not* be exported  Carsten Dominik committed Nov 13, 2009 336   Carsten Dominik committed Aug 06, 2009 337 Embedded La@TeX{}  Glenn Morris committed Sep 06, 2007 338   Carsten Dominik committed Jul 19, 2010 339 340 341 342 343 * Special symbols:: Greek letters and other symbols * Subscripts and superscripts:: Simple syntax for raising/lowering text * LaTeX fragments:: Complex formulas made easy * Previewing LaTeX fragments:: What will this snippet look like? * CDLaTeX mode:: Speed up entering of formulas  Glenn Morris committed Sep 06, 2007 344 345 346  Exporting  Carsten Dominik committed Jul 19, 2010 347 348 349 350 351 352 353 354 355 356 357 * Selective export:: Using tags to select and exclude trees * Export options:: Per-file export settings * The export dispatcher:: How to access exporter commands * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding * HTML export:: Exporting to HTML * LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF * DocBook export:: Exporting to DocBook * TaskJuggler export:: Exporting to TaskJuggler * Freemind export:: Exporting to Freemind mind maps * XOXO export:: Exporting to XOXO * iCalendar export:: Exporting in iCalendar format  Carsten Dominik committed Jun 17, 2008 358   Glenn Morris committed Sep 06, 2007 359 360 HTML export  Carsten Dominik committed Jul 19, 2010 361 362 363 364 365 366 367 368 * HTML Export commands:: How to invoke HTML export * Quoting HTML tags:: Using direct HTML in Org-mode * Links in HTML export:: How links will be interpreted and formatted * Tables in HTML export:: How to modify the formatting of tables * Images in HTML export:: How to insert figures into HTML output * Text areas in HTML export:: An alternative way to show an example * CSS support:: Changing the appearance of the output * JavaScript support:: Info and Folding in a web browser  Glenn Morris committed Sep 06, 2007 369   Carsten Dominik committed Aug 06, 2009 370 La@TeX{} and PDF export  Glenn Morris committed Sep 06, 2007 371   Carsten Dominik committed Jul 19, 2010 372 373 374 375 376 377 * LaTeX/PDF export commands:: Which key invokes which commands * Header and sectioning:: Setting up the export file structure * Quoting LaTeX code:: Incorporating literal La@TeX{} code * Tables in LaTeX export:: Options for exporting tables to La@TeX{} * Images in LaTeX export:: How to insert figures into La@TeX{} output * Beamer class export:: Turning the file into a presentation  Carsten Dominik committed Aug 06, 2009 378 379 380  DocBook export  Carsten Dominik committed Jul 19, 2010 381 382 383 384 385 386 * DocBook export commands:: How to invoke DocBook export * Quoting DocBook code:: Incorporating DocBook code in Org files * Recursive sections:: Recursive sections in DocBook * Tables in DocBook export:: Tables are exported as HTML tables * Images in DocBook export:: How to insert figures into DocBook output * Special characters:: How to handle special characters  Glenn Morris committed Sep 06, 2007 387 388 389  Publishing  Carsten Dominik committed Jul 19, 2010 390 391 392 393 * Configuration:: Defining projects * Uploading files:: How to get files up on the server * Sample configuration:: Example projects * Triggering publication:: Publication commands  Glenn Morris committed Sep 06, 2007 394 395 396  Configuration  Carsten Dominik committed Jul 19, 2010 397 398 399 400 401 402 403 404 * Project alist:: The central configuration variable * Sources and destinations:: From here to there * Selecting files:: What files are part of the project? * Publishing action:: Setting the function doing the publishing * Publishing options:: Tweaking HTML export * Publishing links:: Which links keep working after publishing? * Sitemap:: Generating a list of all pages * Generating an index:: An index that reaches across pages  Glenn Morris committed Sep 06, 2007 405 406 407  Sample configuration  Carsten Dominik committed Jul 19, 2010 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 * Simple example:: One-component publishing * Complex example:: A multi-component publishing example Working with source code * Structure of code blocks:: Code block syntax described * Editing source code:: Language major-mode editing * Exporting code blocks:: Export contents and/or results * Extracting source code:: Create pure source code files * Evaluating code blocks:: Place results of evaluation in the Org-mode buffer * Library of Babel:: Use and contribute to a library of useful code blocks * Languages:: List of supported code block languages * Header arguments:: Configure code block functionality * Results of evaluation:: How evaluation results are handled * Noweb reference syntax:: Literate programming in Org-mode * Key bindings and useful functions:: Work quickly with code blocks * Batch execution:: Call functions from the command line Header arguments * Using header arguments:: Different ways to set header arguments * Specific header arguments:: List of header arguments Using header arguments * System-wide header arguments:: Set global default values * Language-specific header arguments:: Set default values by language * Buffer-wide header arguments:: Set default values for a specific buffer * Header arguments in Org-mode properties:: Set default values for a buffer or heading * Code block specific header arguments:: The most common way to set values Specific header arguments * var:: Pass arguments to code blocks * results:: Specify the type of results and how they will be collected and handled * file:: Specify a path for file output * dir:: Specify the default directory for code block execution * exports:: Export code and/or results * tangle:: Toggle tangling and specify file name * no-expand:: Turn off variable assignment and noweb expansion during tangling * session:: Preserve the state of code evaluation * noweb:: Toggle expansion of noweb references * cache:: Avoid re-evaluating unchanged code blocks * hlines:: Handle horizontal lines in tables * colnames:: Handle column names in tables * rownames:: Handle row names in tables * shebang:: Make tangled files executable  Glenn Morris committed Sep 06, 2007 455 456 457  Miscellaneous  Carsten Dominik committed Jul 19, 2010 458 459 460 461 462 463 464 465 466 * Completion:: M-TAB knows what you need * Speed keys:: Electric commands at the beginning of a headline * Code evaluation security:: Org mode files evaluate inline code * Customization:: Adapting Org to your taste * In-buffer settings:: Overview of the #+KEYWORDS * The very busy C-c C-c key:: When in doubt, press C-c C-c * Clean view:: Getting rid of leading stars in the outline * TTY keys:: Using Org on a tty * Interaction:: Other Emacs packages  Glenn Morris committed Sep 06, 2007 467 468 469  Interaction with other packages  Carsten Dominik committed Jul 19, 2010 470 471 * Cooperation:: Packages Org cooperates with * Conflicts:: Packages that lead to conflicts  Glenn Morris committed Sep 06, 2007 472   Carsten Dominik committed Jun 17, 2008 473 Hacking  Glenn Morris committed Sep 06, 2007 474   Carsten Dominik committed Jul 19, 2010 475 476 477 478 479 480 481 * Hooks:: Who to reach into Org's internals * Add-on packages:: Available extensions * Adding hyperlink types:: New custom link types * Context-sensitive commands:: How to add functionality to such commands * Tables in arbitrary syntax:: Orgtbl for La@TeX{} and other programs * Dynamic blocks:: Automatically filled blocks * Special agenda views:: Customized views  Carsten Dominik committed Aug 06, 2009 482 * Extracting agenda information:: Postprocessing of agenda information  Carsten Dominik committed Jul 19, 2010 483 484 * Using the property API:: Writing programs that use entry properties * Using the mapping API:: Mapping over all or selected entries  Glenn Morris committed Sep 06, 2007 485   Carsten Dominik committed Apr 27, 2008 486 Tables and lists in arbitrary syntax  Glenn Morris committed Sep 06, 2007 487   Carsten Dominik committed Jul 19, 2010 488 489 490 491 * Radio tables:: Sending and receiving radio tables * A LaTeX example:: Step by step, almost a tutorial * Translator functions:: Copy and modify * Radio lists:: Doing the same for lists  Glenn Morris committed Sep 06, 2007 492   Carsten Dominik committed Oct 01, 2009 493 494 MobileOrg  Carsten Dominik committed Jul 19, 2010 495 496 497 * Setting up the staging area:: Where to interact with the mobile device * Pushing to MobileOrg:: Uploading Org files and agendas * Pulling from MobileOrg:: Integrating captured and flagged items  Carsten Dominik committed Oct 01, 2009 498   Glenn Morris committed Sep 06, 2007 499 500 501 @end detailmenu @end menu  Carsten Dominik committed Apr 27, 2008 502 @node Introduction, Document Structure, Top, Top  Glenn Morris committed Sep 06, 2007 503 504 505 506 @chapter Introduction @cindex introduction @menu  Carsten Dominik committed Jul 19, 2010 507 508 509 510 511 * Summary:: Brief summary of what Org does * Installation:: How to install a downloaded version of Org * Activation:: How to activate Org for certain buffers * Feedback:: Bug reports, ideas, patches etc. * Conventions:: Type-setting conventions in the manual  Glenn Morris committed Sep 06, 2007 512 513 514 515 516 517 @end menu @node Summary, Installation, Introduction, Introduction @section Summary @cindex summary  Carsten Dominik committed Apr 27, 2008 518 Org is a mode for keeping notes, maintaining TODO lists, and doing  Glenn Morris committed Sep 06, 2007 519 520 project planning with a fast and effective plain-text system.  Carsten Dominik committed Apr 27, 2008 521 522 523 Org develops organizational tasks around NOTES files that contain lists or information about projects as plain text. Org is implemented on top of Outline mode, which makes it possible to keep the  Glenn Morris committed Sep 06, 2007 524 525 content of large files well structured. Visibility cycling and structure editing help to work with the tree. Tables are easily created  Carsten Dominik committed Apr 27, 2008 526 with a built-in table editor. Org supports TODO items, deadlines,  Carsten Dominik committed Aug 06, 2009 527 timestamps, and scheduling. It dynamically compiles entries into an  Glenn Morris committed Sep 06, 2007 528 529 530 agenda that utilizes and smoothly integrates much of the Emacs calendar and diary. Plain text URL-like links connect to websites, emails, Usenet messages, BBDB entries, and any files related to the projects.  Carsten Dominik committed Apr 27, 2008 531 For printing and sharing of notes, an Org file can be exported as a  Carsten Dominik committed Jan 18, 2008 532 structured ASCII file, as HTML, or (TODO and agenda items only) as an  Glenn Morris committed Sep 06, 2007 533 iCalendar file. It can also serve as a publishing tool for a set of  Carsten Dominik committed Apr 27, 2008 534 linked web pages.  Glenn Morris committed Sep 06, 2007 535   Carsten Dominik committed Jul 19, 2010 536 537 538 539 540 541 542 543 544 545 546 547 548 549 As a project planning environment, Org works by adding metadata to outline nodes. Based on this data, specific entries can be extracted in queries and create dynamic @i{agenda views}. Org mode contains the Org Babel environment which allows to work with embedded source code block in a file, to facilitate code evaluation, documentation, and tangling. Org's automatic, context-sensitive table editor with spreadsheet capabilities can be integrated into any major mode by activating the minor Orgtbl mode. Using a translation step, it can be used to maintain tables in arbitrary file types, for example in La@TeX{}. The structure editing and list creation capabilities can be used outside Org with the minor Orgstruct mode.  Glenn Morris committed Sep 06, 2007 550   Carsten Dominik committed Apr 27, 2008 551 Org keeps simple things simple. When first fired up, it should  Glenn Morris committed Sep 06, 2007 552 553 feel like a straightforward, easy to use outliner. Complexity is not imposed, but a large amount of functionality is available when you need  Carsten Dominik committed Jul 19, 2010 554 555 it. Org is a toolbox and can be used in different ways and for different ends, for example:  Glenn Morris committed Sep 06, 2007 556 557  @example  Carsten Dominik committed Aug 06, 2009 558 559 560 561 562 @r{@bullet{} an outline extension with visibility cycling and structure editing} @r{@bullet{} an ASCII system and table editor for taking structured notes} @r{@bullet{} a TODO list editor} @r{@bullet{} a full agenda and planner with deadlines and work scheduling} @pindex GTD, Getting Things Done  Carsten Dominik committed Jul 19, 2010 563 @r{@bullet{} an environment in which to implement David Allen's GTD system}  Carsten Dominik committed Aug 06, 2009 564 565 @r{@bullet{} a simple hypertext system, with HTML and La@TeX{} export} @r{@bullet{} a publishing tool to create a set of interlinked webpages}  Carsten Dominik committed Jul 19, 2010 566 @r{@bullet{} an environment for literate programming}  Glenn Morris committed Sep 06, 2007 567 568 569 570 @end example @cindex FAQ  Carsten Dominik committed Apr 27, 2008 571 572 There is a website for Org which provides links to the newest version of Org, as well as additional information, frequently asked  Carsten Dominik committed Aug 06, 2009 573 questions (FAQ), links to tutorials, etc@. This page is located at  Carsten Dominik committed Jan 18, 2008 574 @uref{http://orgmode.org}.  Glenn Morris committed Sep 06, 2007 575 576 577 578 579 580 581 582 583  @page @node Installation, Activation, Summary, Introduction @section Installation @cindex installation @cindex XEmacs  Carsten Dominik committed Oct 01, 2009 584 585 586 @b{Important:} @i{If you are using a version of Org that is part of the Emacs distribution or an XEmacs package, please skip this section and go directly to @ref{Activation}.}  Glenn Morris committed Sep 06, 2007 587   Carsten Dominik committed Apr 27, 2008 588 If you have downloaded Org from the Web, either as a distribution @file{.zip}  Carsten Dominik committed Aug 06, 2009 589 590 or @file{.tar} file, or as a Git archive, you must take the following steps to install it: go into the unpacked Org distribution directory and edit the  Carsten Dominik committed Apr 27, 2008 591 592 593 594 595 596 top section of the file @file{Makefile}. You must set the name of the Emacs binary (likely either @file{emacs} or @file{xemacs}), and the paths to the directories where local Lisp and Info files are kept. If you don't have access to the system-wide directories, you can simply run Org directly from the distribution directory by adding the @file{lisp} subdirectory to the Emacs load path. To do this, add the following line to @file{.emacs}:  Glenn Morris committed Sep 06, 2007 597 598  @example  Carsten Dominik committed Apr 27, 2008 599 600 601 602 603 604 605 606 607 (setq load-path (cons "~/path/to/orgdir/lisp" load-path)) @end example @noindent If you plan to use code from the @file{contrib} subdirectory, do a similar step for this directory: @example (setq load-path (cons "~/path/to/orgdir/contrib/lisp" load-path))  Glenn Morris committed Sep 06, 2007 608 609 @end example  Carsten Dominik committed Oct 01, 2009 610 611 612 @sp 2 @cartouche XEmacs users now need to install the file @file{noutline.el} from  Carsten Dominik committed Apr 27, 2008 613 the @file{xemacs} sub-directory of the Org distribution. Use the  Carsten Dominik committed Oct 01, 2009 614 command:  Glenn Morris committed Sep 06, 2007 615 616  @example  Carsten Dominik committed Oct 01, 2009 617  make install-noutline  Glenn Morris committed Sep 06, 2007 618 @end example  Carsten Dominik committed Oct 01, 2009 619 620 @end cartouche @sp 2  Glenn Morris committed Sep 06, 2007 621   Carsten Dominik committed Apr 27, 2008 622 @noindent Now byte-compile the Lisp files with the shell command:  Glenn Morris committed Sep 06, 2007 623 624 625 626 627  @example make @end example  Carsten Dominik committed Apr 27, 2008 628 @noindent If you are running Org from the distribution directory, this is  Carsten Dominik committed Aug 06, 2009 629 630 all. If you want to install Org into the system directories, use (as administrator)  Glenn Morris committed Sep 06, 2007 631 632  @example  Carsten Dominik committed Apr 27, 2008 633 make install  Carsten Dominik committed Aug 06, 2009 634 635 636 637 638 639 640 641 642 643 @end example Installing Info files is system dependent, because of differences in the @file{install-info} program. In Debian it copies the info files into the correct directory and modifies the info directory file. In many other systems, the files need to be copied to the correct directory separately, and @file{install-info} then only modifies the directory file. Check your system documentation to find out which of the following commands you need: @example  Glenn Morris committed Sep 06, 2007 644 make install-info  Carsten Dominik committed Aug 06, 2009 645 make install-info-debian  Glenn Morris committed Sep 06, 2007 646 647 @end example  Carsten Dominik committed Oct 01, 2009 648 649 650 Then add the following line to @file{.emacs}. It is needed so that Emacs can autoload functions that are located in files not immediately loaded when Org-mode starts.  Glenn Morris committed Sep 06, 2007 651 652 653 654 @lisp (require 'org-install) @end lisp  Carsten Dominik committed Jan 25, 2009 655 Do not forget to activate Org as described in the following section.  Carsten Dominik committed Oct 01, 2009 656 @page  Carsten Dominik committed Apr 27, 2008 657   Glenn Morris committed Sep 06, 2007 658 659 660 661 @node Activation, Feedback, Installation, Introduction @section Activation @cindex activation @cindex autoload  Carsten Dominik committed Apr 27, 2008 662 663 @cindex global key bindings @cindex key bindings, global  Glenn Morris committed Sep 06, 2007 664   Carsten Dominik committed Oct 25, 2008 665 Add the following lines to your @file{.emacs} file. The last three lines  Carsten Dominik committed Apr 27, 2008 666 define @emph{global} keys for the commands @command{org-store-link},  Carsten Dominik committed Aug 06, 2009 667 @command{org-agenda}, and @command{org-iswitchb}---please choose suitable  Carsten Dominik committed Apr 27, 2008 668 keys yourself.  Glenn Morris committed Sep 06, 2007 669 670 671 672 673 674  @lisp ;; The following lines are always needed. Choose your own keys. (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda)  Carsten Dominik committed Apr 27, 2008 675 (global-set-key "\C-cb" 'org-iswitchb)  Glenn Morris committed Sep 06, 2007 676 677 @end lisp  Carsten Dominik committed Apr 27, 2008 678 Furthermore, you must activate @code{font-lock-mode} in Org  Glenn Morris committed Sep 06, 2007 679 680 buffers, because significant functionality depends on font-locking being active. You can do this with either one of the following two lines  Carsten Dominik committed Aug 06, 2009 681 (XEmacs users must use the second option):  Glenn Morris committed Sep 06, 2007 682 683 @lisp (global-font-lock-mode 1) ; for all buffers  Carsten Dominik committed Apr 27, 2008 684 (add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only  Glenn Morris committed Sep 06, 2007 685 686 @end lisp  Carsten Dominik committed Jul 19, 2010 687 @cindex Org-mode, turning on  Glenn Morris committed Sep 06, 2007 688 With this setup, all files with extension @samp{.org} will be put  Carsten Dominik committed Jul 19, 2010 689 into Org-mode. As an alternative, make the first line of a file look  Glenn Morris committed Sep 06, 2007 690 691 692 693 694 695 like this: @example MY PROJECTS -*- mode: org; -*- @end example  Carsten Dominik committed Aug 06, 2009 696 @vindex org-insert-mode-line-in-empty-file  Carsten Dominik committed Jul 19, 2010 697 @noindent which will select Org-mode for this buffer no matter what  Glenn Morris committed Sep 06, 2007 698 699 700 the file's name is. See also the variable @code{org-insert-mode-line-in-empty-file}.  Carsten Dominik committed Aug 06, 2009 701 702 703 704 Many commands in Org work on the region if the region is @i{active}. To make use of this, you need to have @code{transient-mark-mode} (@code{zmacs-regions} in XEmacs) turned on. In Emacs 23 this is the default, in Emacs 22 you need to do this yourself with  Carsten Dominik committed Dec 20, 2008 705 706 707 @lisp (transient-mark-mode 1) @end lisp  Carsten Dominik committed Aug 06, 2009 708 709 710 @noindent If you do not like @code{transient-mark-mode}, you can create an active region by using the mouse to select a region, or pressing @kbd{C-@key{SPC}} twice before moving the cursor.  Carsten Dominik committed Dec 20, 2008 711   Carsten Dominik committed Jan 18, 2008 712 @node Feedback, Conventions, Activation, Introduction  Glenn Morris committed Sep 06, 2007 713 714 715 716 717 718 @section Feedback @cindex feedback @cindex bug reports @cindex maintainer @cindex author  Carsten Dominik committed Jun 17, 2008 719 If you find problems with Org, or if you have questions, remarks, or ideas  Carsten Dominik committed Aug 06, 2009 720 about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}.  Carsten Dominik committed Sep 02, 2009 721 722 If you are not a member of the mailing list, your mail will be passed to the list after a moderator has approved it.  Glenn Morris committed Sep 06, 2007 723   Carsten Dominik committed Sep 02, 2009 724 725 726 727 728 729 730 731 732 733 734 735 736 737 For bug reports, please provide as much information as possible, including the version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org (@kbd{M-x org-version @key{RET}}), as well as the Org related setup in @file{.emacs}. The easiest way to do this is to use the command @example @kbd{M-x org-submit-bug-report} @end example @noindent which will put all this information into an Emacs mail buffer so that you only need to add your description. If you re not sending the Email from within Emacs, please copy and paste the content into your Email program. If an error occurs, a backtrace can be very useful (see below on how to create one). Often a small example file helps, along with clear information about:  Glenn Morris committed Sep 06, 2007 738 739 740 741 742 743 744 745 746 747 748  @enumerate @item What exactly did you do? @item What did you expect to happen? @item What happened instead? @end enumerate @noindent Thank you for helping to improve this mode. @subsubheading How to create a useful backtrace @cindex backtrace of an error  Carsten Dominik committed Apr 27, 2008 749 If working with Org produces an error with a message you don't  Glenn Morris committed Sep 06, 2007 750 understand, you may have hit a bug. The best way to report this is by  Carsten Dominik committed Aug 06, 2009 751 providing, in addition to what was mentioned above, a @emph{backtrace}.  Glenn Morris committed Sep 06, 2007 752 753 754 755 756 This is information from the built-in debugger about where and how the error occurred. Here is how to produce a useful backtrace: @enumerate @item  Carsten Dominik committed Aug 06, 2009 757 758 759 Reload uncompiled versions of all Org-mode Lisp files. The backtrace contains much more information if it is produced with uncompiled code. To do this, use  Glenn Morris committed Sep 06, 2007 760 @example  Carsten Dominik committed Aug 06, 2009 761 C-u M-x org-reload RET  Glenn Morris committed Sep 06, 2007 762 @end example  Carsten Dominik committed Aug 06, 2009 763 764 765 @noindent or select @code{Org -> Refresh/Reload -> Reload Org uncompiled} from the menu.  Glenn Morris committed Sep 06, 2007 766 767 768 769 770 771 772 773 774 775 776 777 @item Go to the @code{Options} menu and select @code{Enter Debugger on Error} (XEmacs has this option in the @code{Troubleshooting} sub-menu). @item Do whatever you have to do to hit the error. Don't forget to document the steps you take. @item When you hit the error, a @file{*Backtrace*} buffer will appear on the screen. Save this buffer to a file (for example using @kbd{C-x C-w}) and attach it to your bug report. @end enumerate  Carsten Dominik committed Jan 18, 2008 778 779 780 @node Conventions, , Feedback, Introduction @section Typesetting conventions used in this manual  Carsten Dominik committed Apr 27, 2008 781 Org uses three types of keywords: TODO keywords, tags, and property  Carsten Dominik committed Jan 18, 2008 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 names. In this manual we use the following conventions: @table @code @item TODO @itemx WAITING TODO keywords are written with all capitals, even if they are user-defined. @item boss @itemx ARCHIVE User-defined tags are written in lowercase; built-in tags with special meaning are written with all capitals. @item Release @itemx PRIORITY User-defined properties are capitalized; built-in properties with special meaning are written with all capitals. @end table  Carsten Dominik committed Apr 27, 2008 799 @node Document Structure, Tables, Introduction, Top  Carsten Dominik committed Jul 19, 2010 800 @chapter Document structure  Glenn Morris committed Sep 06, 2007 801 802 803 @cindex document structure @cindex structure of document  Carsten Dominik committed Aug 06, 2009 804 Org is based on Outline mode and provides flexible commands to  Glenn Morris committed Sep 06, 2007 805 806 807 edit the structure of the document. @menu  Carsten Dominik committed Jul 19, 2010 808 809 810 811 812 813 814 815 816 817 818 * Outlines:: Org is based on Outline mode * Headlines:: How to typeset Org tree headlines * Visibility cycling:: Show and hide, much simplified * Motion:: Jumping to other headlines * Structure editing:: Changing sequence and level of headlines * Sparse trees:: Matches embedded in context * Plain lists:: Additional structure within an entry * Drawers:: Tucking stuff away * Blocks:: Folding blocks * Footnotes:: How footnotes are defined in Org's syntax * Orgstruct mode:: Structure editing outside Org  Glenn Morris committed Sep 06, 2007 819 820 @end menu  Carsten Dominik committed Apr 27, 2008 821 @node Outlines, Headlines, Document Structure, Document Structure  Glenn Morris committed Sep 06, 2007 822 823 @section Outlines @cindex outlines  Carsten Dominik committed Apr 27, 2008 824 @cindex Outline mode  Glenn Morris committed Sep 06, 2007 825   Carsten Dominik committed Apr 27, 2008 826 Org is implemented on top of Outline mode. Outlines allow a  Glenn Morris committed Sep 06, 2007 827 828 829 830 document to be organized in a hierarchical structure, which (at least for me) is the best representation of notes and thoughts. An overview of this structure is achieved by folding (hiding) large parts of the document to show only the general document structure and the parts  Carsten Dominik committed Apr 27, 2008 831 currently being worked on. Org greatly simplifies the use of  Glenn Morris committed Sep 06, 2007 832 outlines by compressing the entire show/hide functionality into a single  Carsten Dominik committed Aug 06, 2009 833 command, @command{org-cycle}, which is bound to the @key{TAB} key.  Glenn Morris committed Sep 06, 2007 834   Carsten Dominik committed Apr 27, 2008 835 @node Headlines, Visibility cycling, Outlines, Document Structure  Glenn Morris committed Sep 06, 2007 836 837 838 @section Headlines @cindex headlines @cindex outline tree  Carsten Dominik committed Aug 06, 2009 839 @vindex org-special-ctrl-a/e  Carsten Dominik committed Jul 19, 2010 840 841 @vindex org-special-ctrl-k @vindex org-ctrl-k-protect-subtree  Glenn Morris committed Sep 06, 2007 842   Carsten Dominik committed Jul 19, 2010 843 844 845 846 847 Headlines define the structure of an outline tree. The headlines in Org start with one or more stars, on the left margin@footnote{See the variables @code{org-special-ctrl-a/e}, @code{org-special-ctrl-k}, and @code{org-ctrl-k-protect-subtree} to configure special behavior of @kbd{C-a}, @kbd{C-e}, and @kbd{C-k} in headlines.}. For example:  Glenn Morris committed Sep 06, 2007 848 849 850 851 852 853 854 855 856 857 858 859 860 861  @example * Top level headline ** Second level *** 3rd level some text *** 3rd level more text * Another top level headline @end example @noindent Some people find the many stars too noisy and would prefer an outline that has whitespace followed by a single star as headline  Carsten Dominik committed Aug 06, 2009 862 starters. @ref{Clean view}, describes a setup to realize this.  Glenn Morris committed Sep 06, 2007 863   Carsten Dominik committed Aug 06, 2009 864 @vindex org-cycle-separator-lines  Glenn Morris committed Sep 06, 2007 865 866 867 868 869 870 An empty line after the end of a subtree is considered part of it and will be hidden when the subtree is folded. However, if you leave at least two empty lines, one empty line will remain visible after folding the subtree, in order to structure the collapsed view. See the variable @code{org-cycle-separator-lines} to modify this behavior.  Carsten Dominik committed Apr 27, 2008 871 @node Visibility cycling, Motion, Headlines, Document Structure  Glenn Morris committed Sep 06, 2007 872 873 874 875 876 877 878 879 @section Visibility cycling @cindex cycling, visibility @cindex visibility cycling @cindex trees, visibility @cindex show hidden text @cindex hide text Outlines make it possible to hide parts of the text in the buffer.  Carsten Dominik committed Apr 27, 2008 880 Org uses just two commands, bound to @key{TAB} and  Glenn Morris committed Sep 06, 2007 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 @kbd{S-@key{TAB}} to change the visibility in the buffer. @cindex subtree visibility states @cindex subtree cycling @cindex folded, subtree visibility state @cindex children, subtree visibility state @cindex subtree, subtree visibility state @table @kbd @kindex @key{TAB} @item @key{TAB} @emph{Subtree cycling}: Rotate current subtree among the states @example ,-> FOLDED -> CHILDREN -> SUBTREE --. '-----------------------------------' @end example  Carsten Dominik committed Aug 06, 2009 898 899 @vindex org-cycle-emulate-tab @vindex org-cycle-global-at-bob  Glenn Morris committed Sep 06, 2007 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 The cursor must be on a headline for this to work@footnote{see, however, the option @code{org-cycle-emulate-tab}.}. When the cursor is at the beginning of the buffer and the first line is not a headline, then @key{TAB} actually runs global cycling (see below)@footnote{see the option @code{org-cycle-global-at-bob}.}. Also when called with a prefix argument (@kbd{C-u @key{TAB}}), global cycling is invoked. @cindex global visibility states @cindex global cycling @cindex overview, global visibility state @cindex contents, global visibility state @cindex show all, global visibility state @kindex S-@key{TAB} @item S-@key{TAB} @itemx C-u @key{TAB} @emph{Global cycling}: Rotate the entire buffer among the states @example ,-> OVERVIEW -> CONTENTS -> SHOW ALL --. '--------------------------------------' @end example  Carsten Dominik committed Apr 27, 2008 922 923 924 When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the CONTENTS view up to headlines of level N will be shown. Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.  Glenn Morris committed Sep 06, 2007 925 926  @cindex show all, command  Carsten Dominik committed Oct 12, 2008 927 928 929 @kindex C-u C-u C-u @key{TAB} @item C-u C-u C-u @key{TAB} Show all, including drawers.  Glenn Morris committed Sep 06, 2007 930 931 @kindex C-c C-r @item C-c C-r  Carsten Dominik committed Apr 27, 2008 932 933 934 935 Reveal context around point, showing the current entry, the following heading and the hierarchy above. Useful for working near a location that has been exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda command (@pxref{Agenda commands}). With a prefix argument show, on each  Carsten Dominik committed Apr 15, 2010 936 937 level, all sibling headings. With double prefix arg, also show the entire subtree of the parent.  Carsten Dominik committed Jul 19, 2010 938 939 940 @kindex C-c C-k @item C-c C-k Expose all the headings of the subtree, CONTENT view for just one subtree.  Glenn Morris committed Sep 06, 2007 941 942 943 944 945 946 947 948 949 950 951 952 @kindex C-c C-x b @item C-c C-x b Show the current subtree in an indirect buffer@footnote{The indirect buffer @ifinfo (@pxref{Indirect Buffers,,,emacs,GNU Emacs Manual}) @end ifinfo @ifnotinfo (see the Emacs manual for more information about indirect buffers) @end ifnotinfo will contain the entire buffer, but will be narrowed to the current tree. Editing the indirect buffer will also change the original buffer,  Carsten Dominik committed Apr 27, 2008 953 954 955 but without affecting visibility in that buffer.}. With a numeric prefix argument N, go up to level N and then take that tree. If N is negative then go up that many levels. With a @kbd{C-u} prefix, do not remove  Glenn Morris committed Sep 06, 2007 956 957 958 the previously used indirect buffer. @end table  Carsten Dominik committed Aug 06, 2009 959 960 961 962 @vindex org-startup-folded @cindex @code{overview}, STARTUP keyword @cindex @code{content}, STARTUP keyword @cindex @code{showall}, STARTUP keyword  Carsten Dominik committed Oct 01, 2009 963 @cindex @code{showeverything}, STARTUP keyword  Carsten Dominik committed Aug 06, 2009 964   Carsten Dominik committed Apr 27, 2008 965 When Emacs first visits an Org file, the global state is set to  Carsten Dominik committed Nov 13, 2009 966 OVERVIEW, i.e. only the top level headlines are visible. This can be  Glenn Morris committed Sep 06, 2007 967 968 969 970 971 972 973 974 configured through the variable @code{org-startup-folded}, or on a per-file basis by adding one of the following lines anywhere in the buffer: @example #+STARTUP: overview #+STARTUP: content #+STARTUP: showall  Carsten Dominik committed Oct 01, 2009 975 #+STARTUP: showeverything  Glenn Morris committed Sep 06, 2007 976 977 @end example  Carsten Dominik committed Aug 06, 2009 978 @cindex property, VISIBILITY  Carsten Dominik committed Jun 17, 2008 979 @noindent  Glenn Morris committed Jan 13, 2009 980 Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties  Carsten Dominik committed Jun 17, 2008 981 982 983 984 985 986 and Columns}) will get their visibility adapted accordingly. Allowed values for this property are @code{folded}, @code{children}, @code{content}, and @code{all}. @table @kbd @kindex C-u C-u @key{TAB} @item C-u C-u @key{TAB}  Carsten Dominik committed Nov 13, 2009 987 Switch back to the startup visibility of the buffer, i.e. whatever is  Carsten Dominik committed Jun 17, 2008 988 989 990 991 requested by startup options and @samp{VISIBILITY} properties in individual entries. @end table  Carsten Dominik committed Apr 27, 2008 992 @node Motion, Structure editing, Visibility cycling, Document Structure  Glenn Morris committed Sep 06, 2007 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 @section Motion @cindex motion, between headlines @cindex jumping, to headlines @cindex headline navigation The following commands jump to other headlines in the buffer. @table @kbd @kindex C-c C-n @item C-c C-n Next heading. @kindex C-c C-p @item C-c C-p Previous heading. @kindex C-c C-f @item C-c C-f Next heading same level. @kindex C-c C-b @item C-c C-b Previous heading same level. @kindex C-c C-u @item C-c C-u Backward to higher level heading. @kindex C-c C-j @item C-c C-j Jump to a different place without changing the current outline visibility. Shows the document structure in a temporary buffer, where you can use the following keys to find your destination:  Carsten Dominik committed Aug 06, 2009 1020 @vindex org-goto-auto-isearch  Glenn Morris committed Sep 06, 2007 1021 1022 1023 @example @key{TAB} @r{Cycle visibility.} @key{down} / @key{up} @r{Next/previous visible headline.}  Carsten Dominik committed Oct 25, 2008 1024 1025 1026 @key{RET} @r{Select this location.} @kbd{/} @r{Do a Sparse-tree search} @r{The following keys work if you turn off @code{org-goto-auto-isearch}}  Glenn Morris committed Sep 06, 2007 1027 1028 1029 1030 n / p @r{Next/previous visible headline.} f / b @r{Next/previous headline same level.} u @r{One level up.} 0-9 @r{Digit argument.}  Carsten Dominik committed Oct 25, 2008 1031 q @r{Quit}  Glenn Morris committed Sep 06, 2007 1032 @end example  Carsten Dominik committed Aug 06, 2009 1033 1034 1035 @vindex org-goto-interface @noindent See also the variable @code{org-goto-interface}.  Glenn Morris committed Sep 06, 2007 1036 1037 @end table  Carsten Dominik committed Nov 13, 2009 1038 @node Structure editing, Sparse trees, Motion, Document Structure  Glenn Morris committed Sep 06, 2007 1039 1040 1041 1042 1043 1044 1045 1046 1047 @section Structure editing @cindex structure editing @cindex headline, promotion and demotion @cindex promotion, of subtrees @cindex demotion, of subtrees @cindex subtree, cut and paste @cindex pasting, of subtrees @cindex cutting, of subtrees @cindex copying, of subtrees  Carsten Dominik committed Sep 02, 2009 1048 @cindex sorting, of subtrees  Glenn Morris committed Sep 06, 2007 1049 1050 1051 1052 1053 @cindex subtrees, cut and paste @table @kbd @kindex M-@key{RET} @item M-@key{RET}  Carsten Dominik committed Aug 06, 2009 1054 @vindex org-M-RET-may-split-line  Glenn Morris committed Sep 06, 2007 1055 1056 Insert new heading with same level as current. If the cursor is in a plain list item, a new item is created (@pxref{Plain lists}). To force  Carsten Dominik committed Apr 27, 2008 1057 creation of a new headline, use a prefix argument, or first press @key{RET}  Glenn Morris committed Sep 06, 2007 1058 1059 to get to the beginning of the next line. When this command is used in the middle of a line, the line is split and the rest of the line becomes  Carsten Dominik committed Mar 13, 2008 1060 1061 1062 1063 1064 the new headline@footnote{If you do not want the line to be split, customize the variable @code{org-M-RET-may-split-line}.}. If the command is used at the beginning of a headline, the new headline is created before the current line. If at the beginning of any other line, the content of that line is made the new heading. If the command is  Carsten Dominik committed Nov 13, 2009 1065 used at the end of a folded subtree (i.e. behind the ellipses at the end  Carsten Dominik committed Mar 13, 2008 1066 1067 of a headline), then a headline like the current one will be inserted after the end of the subtree.  Carsten Dominik committed Jan 18, 2008 1068 1069 @kindex C-@key{RET} @item C-@key{RET}  Carsten Dominik committed Oct 25, 2008 1070 1071 1072 Just like @kbd{M-@key{RET}}, except when adding a new heading below the current heading, the new heading is placed after the body instead of before it. This command works from anywhere in the entry.  Glenn Morris committed Sep 06, 2007 1073 1074 @kindex M-S-@key{RET} @item M-S-@key{RET}  Carsten Dominik committed Aug 06, 2009 1075 1076 1077 @vindex org-treat-insert-todo-heading-as-state-change Insert new TODO entry with same level as current heading. See also the variable @code{org-treat-insert-todo-heading-as-state-change}.  Carsten Dominik committed Oct 12, 2008 1078 1079 1080 1081 1082 @kindex C-S-@key{RET} @item C-S-@key{RET} Insert new TODO entry with same level as current heading. Like @kbd{C-@key{RET}}, the new headline will be inserted after the current subtree.  Carsten Dominik committed Nov 13, 2009 1083 1084 1085 1086 1087 1088 @kindex @key{TAB} @item @key{TAB} @r{in new, empty entry} In a new entry with no text yet, the first @key{TAB} demotes the entry to become a child of the previous one. The next @key{TAB} makes it a parent, and so on, all the way to top level. Yet another @key{TAB}, and you are back to the initial level.  Glenn Morris committed Sep 06, 2007 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 @kindex M-@key{left} @item M-@key{left} Promote current heading by one level. @kindex M-@key{right} @item M-@key{right} Demote current heading by one level. @kindex M-S-@key{left} @item M-S-@key{left} Promote the current subtree by one level. @kindex M-S-@key{right} @item M-S-@key{right} Demote the current subtree by one level. @kindex M-S-@key{up} @item M-S-@key{up} Move subtree up (swap with previous subtree of same level). @kindex M-S-@key{down} @item M-S-@key{down} Move subtree down (swap with next subtree of same level). @kindex C-c C-x C-w @item C-c C-x C-w  Carsten Dominik committed Nov 13, 2009 1110 Kill subtree, i.e. remove it from buffer but save in kill ring.  Carsten Dominik committed Apr 27, 2008 1111 With a numeric prefix argument N, kill N sequential subtrees.  Glenn Morris committed Sep 06, 2007 1112 1113 @kindex C-c C-x M-w @item C-c C-x M-w  Carsten Dominik committed Apr 27, 2008 1114 1115 Copy subtree to kill ring. With a numeric prefix argument N, copy the N sequential subtrees.  Glenn Morris committed Sep 06, 2007 1116 1117 1118 @kindex C-c C-x C-y @item C-c C-x C-y Yank subtree from kill ring. This does modify the level of the subtree to  Carsten Dominik committed Apr 27, 2008 1119 1120 make sure the tree fits in nicely at the yank position. The yank level can also be specified with a numeric prefix argument, or by yanking after a  Glenn Morris committed Sep 06, 2007 1121 headline marker like @samp{****}.  Carsten Dominik committed Dec 07, 2008 1122 @kindex C-y  Carsten Dominik committed Nov 12, 2008 1123 @item C-y  Carsten Dominik committed Aug 06, 2009 1124 1125 @vindex org-yank-adjusted-subtrees @vindex org-yank-folded-subtrees  Carsten Dominik committed Nov 12, 2008 1126 1127 1128 Depending on the variables @code{org-yank-adjusted-subtrees} and @code{org-yank-folded-subtrees}, Org's internal @code{yank} command will paste subtrees folded and in a clever way, using the same command as @kbd{C-c  Carsten Dominik committed Feb 02, 2009 1129 1130 1131 1132 1133 1134 1135 C-x C-y}. With the default settings, no level adjustment will take place, but the yanked tree will be folded unless doing so would swallow text previously visible. Any prefix argument to this command will force a normal @code{yank} to be executed, with the prefix passed along. A good way to force a normal yank is @kbd{C-u C-y}. If you use @code{yank-pop} after a yank, it will yank previous kill items plainly, without adjustment and folding.  Carsten Dominik committed Aug 06, 2009 1136 1137 1138 1139 1140 1141 1142 1143 @kindex C-c C-x c @item C-c C-x c Clone a subtree by making a number of sibling copies of it. You will be prompted for the number of copies to make, and you can also specify if any timestamps in the entry should be shifted. This can be useful, for example, to create a number of tasks related to a series of lectures to prepare. For more details, see the docstring of the command @code{org-clone-subtree-with-time-shift}.  Carsten Dominik committed Jan 18, 2008 1144 1145 @kindex C-c C-w @item C-c C-w  Carsten Dominik committed Nov 12, 2008 1146 Refile entry or region to a different location. @xref{Refiling notes}.  Glenn Morris committed Sep 06, 2007 1147 1148 @kindex C-c ^ @item C-c ^  Carsten Dominik committed Apr 27, 2008 1149 1150 1151 Sort same-level entries. When there is an active region, all entries in the region will be sorted. Otherwise the children of the current headline are sorted. The command prompts for the sorting method, which can be  Carsten Dominik committed Aug 06, 2009 1152 1153 1154 1155 1156 1157 1158 alphabetically, numerically, by time (first timestamp with active preferred, creation time, scheduled time, deadline time), by priority, by TODO keyword (in the sequence the keywords have been defined in the setup) or by the value of a property. Reverse sorting is possible as well. You can also supply your own function to extract the sorting key. With a @kbd{C-u} prefix, sorting will be case-sensitive. With two @kbd{C-u C-u} prefixes, duplicate entries will also be removed.  Carsten Dominik committed Jun 17, 2008 1159 1160 1161 1162 1163 @kindex C-x n s @item C-x n s Narrow buffer to current subtree. @kindex C-x n w @item C-x n w  Carsten Dominik committed Aug 06, 2009 1164 Widen buffer to remove narrowing.  Carsten Dominik committed Mar 13, 2008 1165 1166 @kindex C-c * @item C-c *  Carsten Dominik committed Jan 25, 2009 1167 1168 1169 1170 1171 Turn a normal line or plain list item into a headline (so that it becomes a subheading at its location). Also turn a headline into a normal line by removing the stars. If there is an active region, turn all lines in the region into headlines. If the first line in the region was an item, turn only the item lines into headlines. Finally, if the first line is a  Carsten Dominik committed Mar 13, 2008 1172 headline, remove the stars from all headlines in the region.  Glenn Morris committed Sep 06, 2007 1173 1174 1175 1176 @end table @cindex region, active @cindex active region  Carsten Dominik committed Aug 06, 2009 1177 1178 @cindex transient mark mode When there is an active region (Transient Mark mode), promotion and  Glenn Morris committed Sep 06, 2007 1179 1180 1181 1182 1183 1184 1185 demotion work on all headlines in the region. To select a region of headlines, it is best to place both point and mark at the beginning of a line, mark at the beginning of the first headline, and point at the line just after the last headline to change. Note that when the cursor is inside a table (@pxref{Tables}), the Meta-Cursor keys have different functionality.  Carsten Dominik committed Mar 13, 2008 1186   Carsten Dominik committed Nov 13, 2009 1187 @node Sparse trees, Plain lists, Structure editing, Document Structure  Glenn Morris committed Sep 06, 2007 1188 1189