org.texi 379 KB
 Glenn Morris committed Sep 06, 2007 1 2 \input texinfo @c %**start of header  Glenn Morris committed Sep 06, 2007 3 @setfilename ../../info/org  Carsten Dominik committed Apr 27, 2008 4 @settitle The Org Manual  Glenn Morris committed Sep 06, 2007 5   Carsten Dominik committed Jun 17, 2008 6 7 @set VERSION 6.05a @set DATE June 2008  Glenn Morris committed Sep 06, 2007 8 9 10 11 12 13 14  @dircategory Emacs @direntry * Org Mode: (org). Outline-based notes management and organizer @end direntry @c Version and Contact Info  Carsten Dominik committed Jan 18, 2008 15 @set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}  Glenn Morris committed Sep 06, 2007 16 17 @set AUTHOR Carsten Dominik @set MAINTAINER Carsten Dominik  Carsten Dominik committed Jan 18, 2008 18 19 @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 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 @c %**end of header @finalout @c Macro definitions @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 Apr 27, 2008 36 This manual is for Org (version @value{VERSION}).  Glenn Morris committed Sep 06, 2007 37   Carsten Dominik committed Jan 18, 2008 38 Copyright @copyright{} 2004, 2005, 2006, 2007, 2008 Free Software Foundation  Glenn Morris committed Sep 06, 2007 39 40 41  @quotation Permission is granted to copy, distribute and/or modify this document  Glenn Morris committed Jun 15, 2008 42 under the terms of the GNU Free Documentation License, Version 1.2 or  Glenn Morris committed Sep 06, 2007 43 44 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 Jun 18, 2008 45 46 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 47   Glenn Morris committed Jun 13, 2008 48 49 50 (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 51 52 53 54 55  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 56 57 58 59 @end quotation @end copying @titlepage  Carsten Dominik committed Apr 27, 2008 60 @title The Org Manual  Glenn Morris committed Sep 06, 2007 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82  @subtitle Release @value{VERSION} @author by Carsten Dominik @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 * Introduction:: Getting started  Carsten Dominik committed Apr 27, 2008 83 * Document Structure:: A tree works like your brain  Glenn Morris committed Sep 06, 2007 84 85 * Tables:: Pure magic for quick formatting * Hyperlinks:: Notes in context  Carsten Dominik committed Apr 27, 2008 86 * TODO Items:: Every tree branch can be a TODO item  Glenn Morris committed Sep 06, 2007 87 * Tags:: Tagging headlines and matching sets of tags  Carsten Dominik committed Apr 27, 2008 88 89 * Properties and Columns:: Storing information about an entry * Dates and Times:: Making items useful for planning  Carsten Dominik committed Jan 18, 2008 90 * Remember:: Quickly adding nodes to the outline tree  Carsten Dominik committed Apr 27, 2008 91 * Agenda Views:: Collecting information into views  Glenn Morris committed Sep 06, 2007 92 93 * Embedded LaTeX:: LaTeX fragments and formulas * Exporting:: Sharing and publishing of notes  Carsten Dominik committed Apr 27, 2008 94 * Publishing:: Create a web site of linked Org files  Glenn Morris committed Sep 06, 2007 95 * Miscellaneous:: All the rest which did not fit elsewhere  Carsten Dominik committed Jun 17, 2008 96 97 * Extensions:: * Hacking::  Carsten Dominik committed Apr 27, 2008 98 99 * History and Acknowledgments:: How Org came into being * Main Index:: An index of Org's concepts and features  Glenn Morris committed Sep 06, 2007 100 101 102 103 104 105 106 * Key Index:: Key bindings and where they are described @detailmenu --- The Detailed Node Listing --- Introduction  Carsten Dominik committed Apr 27, 2008 107 108 109 * Summary:: Brief summary of what Org does * Installation:: How to install a downloaded version of Org * Activation:: How to activate Org for certain buffers  Glenn Morris committed Sep 06, 2007 110 * Feedback:: Bug reports, ideas, patches etc.  Carsten Dominik committed Jan 18, 2008 111 * Conventions:: Type-setting conventions in the manual  Glenn Morris committed Sep 06, 2007 112 113 114  Document Structure  Carsten Dominik committed Apr 27, 2008 115 116 * Outlines:: Org is based on Outline mode * Headlines:: How to typeset Org tree headlines  Glenn Morris committed Sep 06, 2007 117 118 119 120 121 122 123 * Visibility cycling:: Show and hide, much simplified * Motion:: Jumping to other headlines * Structure editing:: Changing sequence and level of headlines * Archiving:: Move done task trees to a different place * Sparse trees:: Matches embedded in context * Plain lists:: Additional structure within an entry * Drawers:: Tucking stuff away  Carsten Dominik committed Apr 27, 2008 124 * Orgstruct mode:: Structure editing outside Org  Glenn Morris committed Sep 06, 2007 125 126 127 128 129 130 131 132 133  Archiving * ARCHIVE tag:: Marking a tree as inactive * Moving subtrees:: Moving a tree to an archive file Tables * Built-in table editor:: Simple tables  Carsten Dominik committed Mar 13, 2008 134 * Narrow columns:: Stop wasting space in tables  Glenn Morris committed Sep 06, 2007 135 * Column groups:: Grouping to trigger vertical lines  Carsten Dominik committed Apr 27, 2008 136 137 * Orgtbl mode:: The table editor as minor mode * The spreadsheet:: The table editor has spreadsheet capabilities  Glenn Morris committed Sep 06, 2007 138 139 140 141 142 143 144 145 146 147 148 149 150 151  The spreadsheet * 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 * Editing and debugging formulas:: Fixing formulas * Updating the table:: Recomputing all dependent fields * Advanced features:: Field names, parameters and automatic recalc Hyperlinks  Carsten Dominik committed Apr 27, 2008 152 * Link format:: How links in Org are formatted  Glenn Morris committed Sep 06, 2007 153 154 155 * Internal links:: Links to other places in the current file * External links:: URL-like links to the world * Handling links:: Creating, inserting and following  Carsten Dominik committed Apr 27, 2008 156 * Using links outside Org:: Linking from my C source code?  Glenn Morris committed Sep 06, 2007 157 158 159 160 161 162 * Link abbreviations:: Shortcuts for writing complex links * Search options:: Linking to a specific location * Custom searches:: When the default search is not enough Internal links  Carsten Dominik committed Apr 27, 2008 163 * Radio targets:: Make targets trigger links in plain text  Glenn Morris committed Sep 06, 2007 164   Carsten Dominik committed Apr 27, 2008 165 TODO Items  Glenn Morris committed Sep 06, 2007 166 167 168  * TODO basics:: Marking and displaying TODO entries * TODO extensions:: Workflow and assignments  Carsten Dominik committed Jan 18, 2008 169 * Progress logging:: Dates and notes for progress  Glenn Morris committed Sep 06, 2007 170 171 172 173 174 175 176 * Priorities:: Some things are more important than others * Breaking down tasks:: Splitting a task into manageable pieces * Checkboxes:: Tick-off lists Extended use of TODO keywords * Workflow states:: From TODO to DONE in steps  Carsten Dominik committed Jan 18, 2008 177 * TODO types:: I do this, Fred does the rest  Glenn Morris committed Sep 06, 2007 178 * Multiple sets in one file:: Mixing it all, and still finding your way  Carsten Dominik committed Jan 18, 2008 179 180 181 182 * Fast access to TODO states:: Single letter selection of a state * Per-file keywords:: Different files, different requirements * Faces for TODO keywords:: Highlighting states  Carsten Dominik committed Apr 27, 2008 183 Progress logging  Carsten Dominik committed Jan 18, 2008 184 185 186  * Closing items:: When was this entry marked DONE? * Tracking TODO state changes:: When did the status change?  Glenn Morris committed Sep 06, 2007 187 188 189 190 191 192 193 194 195 196  Tags * 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 Properties and Columns * Property syntax:: How properties are spelled out  Carsten Dominik committed Apr 27, 2008 197 * Special properties:: Access to other Org mode features  Glenn Morris committed Sep 06, 2007 198 * Property searches:: Matching property values  Carsten Dominik committed Jan 18, 2008 199 * Property inheritance:: Passing values down the tree  Glenn Morris committed Sep 06, 2007 200 201 202 * Column view:: Tabular viewing and editing * Property API:: Properties for Lisp programmers  Carsten Dominik committed Apr 27, 2008 203 Column view  Glenn Morris committed Sep 06, 2007 204 205 206  * Defining columns:: The COLUMNS format property * Using column view:: How to create and use column view  Carsten Dominik committed Apr 27, 2008 207 * Capturing column view:: A dynamic block for column view  Glenn Morris committed Sep 06, 2007 208   Carsten Dominik committed Apr 27, 2008 209 Defining columns  Glenn Morris committed Sep 06, 2007 210 211 212 213  * Scope of column definitions:: Where defined, where valid? * Column attributes:: Appearance and content of a column  Carsten Dominik committed Jan 18, 2008 214 Dates and Times  Glenn Morris committed Sep 06, 2007 215   Carsten Dominik committed Apr 27, 2008 216 * Timestamps:: Assigning a time to a tree entry  Glenn Morris committed Sep 06, 2007 217 218 * Creating timestamps:: Commands which insert timestamps * Deadlines and scheduling:: Planning your work  Carsten Dominik committed Apr 27, 2008 219 220 * Clocking work time:: Tracking how long you spend on a task * Effort estimates:: Planning work effort in advance  Glenn Morris committed Sep 06, 2007 221 222 223  Creating timestamps  Carsten Dominik committed Apr 27, 2008 224 225 * 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 226   Carsten Dominik committed Apr 27, 2008 227 Deadlines and scheduling  Glenn Morris committed Sep 06, 2007 228 229 230 231  * Inserting deadline/schedule:: Planning items * Repeated tasks:: Items that show up again and again  Carsten Dominik committed Jan 18, 2008 232 Remember  Glenn Morris committed Sep 06, 2007 233   Carsten Dominik committed Apr 27, 2008 234 * Setting up Remember:: Some code for .emacs to get things going  Carsten Dominik committed Jan 18, 2008 235 236 237 * Remember templates:: Define the outline of different note types * Storing notes:: Directly get the note to where it belongs * Refiling notes:: Moving a note or task to a project  Glenn Morris committed Sep 06, 2007 238 239 240 241 242 243 244  Agenda Views * 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  Carsten Dominik committed Apr 27, 2008 245 * Agenda commands:: Remote editing of Org trees  Glenn Morris committed Sep 06, 2007 246 * Custom agenda views:: Defining special searches and views  Carsten Dominik committed Apr 27, 2008 247 * Agenda column view:: Using column view for collected entries  Glenn Morris committed Sep 06, 2007 248 249 250  The built-in agenda views  Carsten Dominik committed Apr 27, 2008 251 * Weekly/daily agenda:: The calendar page with current tasks  Glenn Morris committed Sep 06, 2007 252 253 254 * Global TODO list:: All unfinished action items * Matching tags and properties:: Structured information with fine-tuned search * Timeline:: Time-sorted view for single file  Carsten Dominik committed Mar 13, 2008 255 * Keyword search:: Finding entries by keyword  Glenn Morris committed Sep 06, 2007 256 257 258 259 260 261 262 263 264 265 266 267 268 * Stuck projects:: Find projects you need to review Presentation and sorting * Categories:: Not all tasks are equal * Time-of-day specifications:: How the agenda knows the time * Sorting of agenda items:: The order of things Custom agenda views * Storing searches:: Type once, use often * Block agenda:: All the stuff you need in a single buffer * Setting Options:: Changing the rules  Carsten Dominik committed Apr 27, 2008 269 270 * Exporting Agenda Views:: Writing agendas to files * Using the agenda elsewhere:: Using agenda information in other programs  Glenn Morris committed Sep 06, 2007 271 272 273 274  Embedded LaTeX * Math symbols:: TeX macros for symbols and Greek letters  Carsten Dominik committed Apr 27, 2008 275 * Subscripts and superscripts:: Simple syntax for raising/lowering text  Glenn Morris committed Sep 06, 2007 276 277 278 279 280 281 * LaTeX fragments:: Complex formulas made easy * Processing LaTeX fragments:: Previewing LaTeX processing * CDLaTeX mode:: Speed up entering of formulas Exporting  Carsten Dominik committed Jun 17, 2008 282 283 284 * Markup rules:: Which structures are recognized? * Export options:: Per-file export settings * The export dispatcher:: How to access exporter commands  Glenn Morris committed Sep 06, 2007 285 286 287 288 289 * ASCII export:: Exporting to plain ASCII * HTML export:: Exporting to HTML * LaTeX export:: Exporting to LaTeX * XOXO export:: Exporting to XOXO * iCalendar export:: Exporting in iCalendar format  Carsten Dominik committed Jun 17, 2008 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306  Markup rules * Document title:: How the document title is determined * Headings and sections:: The main structure of the exported document * Table of contents:: If, where, how to create a table of contents * Initial text:: Text before the first headline * Lists:: Plain lists are exported * Paragraphs:: What determines beginning and ending * Literal examples:: Source code and other examples * Include files:: Include the contents of a file during export * Tables exported:: Tables are exported richly * Footnotes:: Numbers like [1] * Emphasis and monospace:: To bold or not to bold * TeX macros and LaTeX fragments:: Create special, rich export. * Horizontal rules:: A line across the page * Comment lines:: Some lines will not be exported  Glenn Morris committed Sep 06, 2007 307 308 309  HTML export  Carsten Dominik committed Jun 17, 2008 310 * HTML Export commands:: How to invoke HTML export  Carsten Dominik committed Apr 27, 2008 311 * Quoting HTML tags:: Using direct HTML in Org mode  Glenn Morris committed Sep 06, 2007 312 313 * Links:: Transformation of links for HTML * Images:: How to include images  Carsten Dominik committed Apr 27, 2008 314 315 * CSS support:: Changing the appearance of the output * Javascript support:: Info and Folding in a web browser  Glenn Morris committed Sep 06, 2007 316 317 318 319 320  LaTeX export * LaTeX export commands:: How to invoke LaTeX export * Quoting LaTeX code:: Incorporating literal LaTeX code  Carsten Dominik committed Apr 27, 2008 321 * Sectioning structure:: Changing sectioning in LaTeX output  Glenn Morris committed Sep 06, 2007 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346  Publishing * Configuration:: Defining projects * Sample configuration:: Example projects * Triggering publication:: Publication commands Configuration * 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? * Project page index:: Publishing a list of project files Sample configuration * Simple example:: One-component publishing * Complex example:: A multi-component publishing example Miscellaneous * Completion:: M-TAB knows what you need  Carsten Dominik committed Apr 27, 2008 347 * Customization:: Adapting Org to your taste  Glenn Morris committed Sep 06, 2007 348 349 350 * 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  Carsten Dominik committed Apr 27, 2008 351 * TTY keys:: Using Org on a tty  Glenn Morris committed Sep 06, 2007 352 353 354 355 356 * Interaction:: Other Emacs packages * Bugs:: Things which do not work perfectly Interaction with other packages  Carsten Dominik committed Apr 27, 2008 357 * Cooperation:: Packages Org cooperates with  Glenn Morris committed Sep 06, 2007 358 359 * Conflicts:: Packages that lead to conflicts  Carsten Dominik committed Jun 17, 2008 360 361 362 363 364 365 Extensions * Extensions in the contrib directory:: These come with the Org distro * Other extensions:: These you have to find on the web. Hacking  Glenn Morris committed Sep 06, 2007 366 367 368 369 370 371  * Adding hyperlink types:: New custom link types * Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs * Dynamic blocks:: Automatically filled blocks * Special agenda views:: Customized views * Using the property API:: Writing programs that use entry properties  Carsten Dominik committed Jun 17, 2008 372 * Using the mapping API:: Mapping over all or selected entries  Glenn Morris committed Sep 06, 2007 373   Carsten Dominik committed Apr 27, 2008 374 Tables and lists in arbitrary syntax  Glenn Morris committed Sep 06, 2007 375 376 377 378  * Radio tables:: Sending and receiving * A LaTeX example:: Step by step, almost a tutorial * Translator functions:: Copy and modify  Carsten Dominik committed Apr 27, 2008 379 * Radio lists:: Doing the same for lists  Glenn Morris committed Sep 06, 2007 380 381 382 383  @end detailmenu @end menu  Carsten Dominik committed Apr 27, 2008 384 @node Introduction, Document Structure, Top, Top  Glenn Morris committed Sep 06, 2007 385 386 387 388 @chapter Introduction @cindex introduction @menu  Carsten Dominik committed Apr 27, 2008 389 390 391 * Summary:: Brief summary of what Org does * Installation:: How to install a downloaded version of Org * Activation:: How to activate Org for certain buffers  Glenn Morris committed Sep 06, 2007 392 * Feedback:: Bug reports, ideas, patches etc.  Carsten Dominik committed Jan 18, 2008 393 * Conventions:: Type-setting conventions in the manual  Glenn Morris committed Sep 06, 2007 394 395 396 397 398 399 @end menu @node Summary, Installation, Introduction, Introduction @section Summary @cindex summary  Carsten Dominik committed Apr 27, 2008 400 Org is a mode for keeping notes, maintaining TODO lists, and doing  Glenn Morris committed Sep 06, 2007 401 402 project planning with a fast and effective plain-text system.  Carsten Dominik committed Apr 27, 2008 403 404 405 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 406 407 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 408 with a built-in table editor. Org supports TODO items, deadlines,  Glenn Morris committed Sep 06, 2007 409 410 411 412 time stamps, and scheduling. It dynamically compiles entries into an 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 413 For printing and sharing of notes, an Org file can be exported as a  Carsten Dominik committed Jan 18, 2008 414 structured ASCII file, as HTML, or (TODO and agenda items only) as an  Glenn Morris committed Sep 06, 2007 415 iCalendar file. It can also serve as a publishing tool for a set of  Carsten Dominik committed Apr 27, 2008 416 linked web pages.  Glenn Morris committed Sep 06, 2007 417   Carsten Dominik committed Apr 27, 2008 418 An important design aspect that distinguishes Org from for example  Glenn Morris committed Sep 06, 2007 419 420 Planner/Muse is that it encourages to store every piece of information only once. In Planner, you have project pages, day pages and possibly  Carsten Dominik committed Apr 27, 2008 421 other files, duplicating some information such as tasks. In Org,  Glenn Morris committed Sep 06, 2007 422 423 424 425 426 you only have notes files. In your notes you mark entries as tasks, label them with tags and timestamps. All necessary lists like a schedule for the day, the agenda for a meeting, tasks lists selected by tags etc are created dynamically when you need them.  Carsten Dominik committed Apr 27, 2008 427 Org keeps simple things simple. When first fired up, it should  Glenn Morris committed Sep 06, 2007 428 429 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 Apr 27, 2008 430 it. Org is a toolbox and can be used in different ways, for  Glenn Morris committed Sep 06, 2007 431 432 433 434 435 436 437 438 439 440 example as: @example @r{@bullet{} outline extension with visibility cycling and structure editing} @r{@bullet{} ASCII system and table editor for taking structured notes} @r{@bullet{} ASCII table editor with spreadsheet-like capabilities} @r{@bullet{} TODO list editor} @r{@bullet{} full agenda and planner with deadlines and work scheduling} @r{@bullet{} environment to implement David Allen's GTD system} @r{@bullet{} a basic database application}  Carsten Dominik committed Jan 18, 2008 441 @r{@bullet{} simple hypertext system, with HTML and LaTeX export}  Glenn Morris committed Sep 06, 2007 442 443 444 @r{@bullet{} publishing tool to create a set of interlinked webpages} @end example  Carsten Dominik committed Apr 27, 2008 445 Org's automatic, context sensitive table editor with spreadsheet  Glenn Morris committed Sep 06, 2007 446 capabilities can be integrated into any major mode by activating the  Carsten Dominik committed Apr 27, 2008 447 minor Orgtbl mode. Using a translation step, it can be used to maintain  Glenn Morris committed Sep 06, 2007 448 tables in arbitrary file types, for example in La@TeX{}. The structure  Carsten Dominik committed Apr 27, 2008 449 450 editing and list creation capabilities can be used outside Org with the minor Orgstruct mode.  Glenn Morris committed Sep 06, 2007 451 452  @cindex FAQ  Carsten Dominik committed Apr 27, 2008 453 454 There is a website for Org which provides links to the newest version of Org, as well as additional information, frequently asked  Glenn Morris committed Sep 06, 2007 455 questions (FAQ), links to tutorials etc. This page is located at  Carsten Dominik committed Jan 18, 2008 456 @uref{http://orgmode.org}.  Glenn Morris committed Sep 06, 2007 457 458 459 460 461 462 463 464 465  @page @node Installation, Activation, Summary, Introduction @section Installation @cindex installation @cindex XEmacs  Carsten Dominik committed Apr 27, 2008 466 @b{Important:} @i{If Org is part of the Emacs distribution or an  Glenn Morris committed Sep 06, 2007 467 468 469 XEmacs package, please skip this section and go directly to @ref{Activation}.}  Carsten Dominik committed Apr 27, 2008 470 471 472 473 474 475 476 477 478 If you have downloaded Org from the Web, either as a distribution @file{.zip} 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 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 479 480  @example  Carsten Dominik committed Apr 27, 2008 481 482 483 484 485 486 487 488 489 (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 490 491 492 @end example @b{XEmacs users now need to install the file @file{noutline.el} from  Carsten Dominik committed Apr 27, 2008 493 the @file{xemacs} sub-directory of the Org distribution. Use the  Glenn Morris committed Sep 06, 2007 494 495 496 497 498 499 command:} @example @b{make install-noutline} @end example  Carsten Dominik committed Apr 27, 2008 500 @noindent Now byte-compile the Lisp files with the shell command:  Glenn Morris committed Sep 06, 2007 501 502 503 504 505  @example make @end example  Carsten Dominik committed Apr 27, 2008 506 507 @noindent If you are running Org from the distribution directory, this is all. If you want to install into the system directories, use  Glenn Morris committed Sep 06, 2007 508 509  @example  Carsten Dominik committed Apr 27, 2008 510 make install  Glenn Morris committed Sep 06, 2007 511 512 513 514 515 516 make install-info @end example @noindent Then add to @file{.emacs}: @lisp  Carsten Dominik committed Apr 27, 2008 517 ;; This line only if Org is not part of the X/Emacs distribution.  Glenn Morris committed Sep 06, 2007 518 519 520 (require 'org-install) @end lisp  Carsten Dominik committed Apr 27, 2008 521   Glenn Morris committed Sep 06, 2007 522 523 524 525 @node Activation, Feedback, Installation, Introduction @section Activation @cindex activation @cindex autoload  Carsten Dominik committed Apr 27, 2008 526 527 @cindex global key bindings @cindex key bindings, global  Glenn Morris committed Sep 06, 2007 528 529 530 531 532 533 534 535 536 537  @iftex @b{Important:} @i{If you use copy-and-paste to copy lisp code from the PDF documentation as viewed by Acrobat reader to your .emacs file, the single quote character comes out incorrectly and the code will not work. You need to fix the single quotes by hand, or copy from Info documentation.} @end iftex Add the following lines to your @file{.emacs} file. The last two lines  Carsten Dominik committed Apr 27, 2008 538 539 540 define @emph{global} keys for the commands @command{org-store-link}, @command{org-agenda}, and @command{org-iswitchb} - please choose suitable keys yourself.  Glenn Morris committed Sep 06, 2007 541 542 543 544 545 546  @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 547 (global-set-key "\C-cb" 'org-iswitchb)  Glenn Morris committed Sep 06, 2007 548 549 @end lisp  Carsten Dominik committed Apr 27, 2008 550 Furthermore, you must activate @code{font-lock-mode} in Org  Glenn Morris committed Sep 06, 2007 551 552 553 554 555 buffers, because significant functionality depends on font-locking being active. You can do this with either one of the following two lines (XEmacs user must use the second option): @lisp (global-font-lock-mode 1) ; for all buffers  Carsten Dominik committed Apr 27, 2008 556 (add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only  Glenn Morris committed Sep 06, 2007 557 558 @end lisp  Carsten Dominik committed Apr 27, 2008 559 @cindex Org mode, turning on  Glenn Morris committed Sep 06, 2007 560 With this setup, all files with extension @samp{.org} will be put  Carsten Dominik committed Apr 27, 2008 561 into Org mode. As an alternative, make the first line of a file look  Glenn Morris committed Sep 06, 2007 562 563 564 565 566 567 like this: @example MY PROJECTS -*- mode: org; -*- @end example  Carsten Dominik committed Apr 27, 2008 568 @noindent which will select Org mode for this buffer no matter what  Glenn Morris committed Sep 06, 2007 569 570 571 the file's name is. See also the variable @code{org-insert-mode-line-in-empty-file}.  Carsten Dominik committed Jan 18, 2008 572 @node Feedback, Conventions, Activation, Introduction  Glenn Morris committed Sep 06, 2007 573 574 575 576 577 578 @section Feedback @cindex feedback @cindex bug reports @cindex maintainer @cindex author  Carsten Dominik committed Jun 17, 2008 579 580 581 582 If you find problems with Org, or if you have questions, remarks, or ideas about it, please mail to the Org mailing list @code{emacs-orgmode@@gnu.org}. If you are not a member of the mailing list, your mail will be reviewed by a moderator and then passed through to the list.  Glenn Morris committed Sep 06, 2007 583 584 585  For bug reports, please provide as much information as possible, including the version information of Emacs (@kbd{C-h v emacs-version  Carsten Dominik committed Apr 27, 2008 586 587 @key{RET}}) and Org (@kbd{C-h v org-version @key{RET}}), as well as the Org related setup in @file{.emacs}. If an error occurs, a  Glenn Morris committed Sep 06, 2007 588 589 590 591 592 593 594 595 596 597 598 599 600 backtrace can be very useful (see below on how to create one). Often a small example file helps, along with clear information about: @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 601 If working with Org produces an error with a message you don't  Glenn Morris committed Sep 06, 2007 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 understand, you may have hit a bug. The best way to report this is by providing, in addition to what was mentioned above, a @emph{Backtrace}. 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 Start a fresh Emacs or XEmacs, and make sure that it will load the original Lisp code in @file{org.el} instead of the compiled version in @file{org.elc}. The backtrace contains much more information if it is produced with uncompiled code. To do this, either rename @file{org.elc} to something else before starting Emacs, or ask Emacs explicitly to load @file{org.el} by using the command line @example emacs -l /path/to/org.el @end example @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 630 631 632 @node Conventions, , Feedback, Introduction @section Typesetting conventions used in this manual  Carsten Dominik committed Apr 27, 2008 633 Org uses three types of keywords: TODO keywords, tags, and property  Carsten Dominik committed Jan 18, 2008 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 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 651 @node Document Structure, Tables, Introduction, Top  Glenn Morris committed Sep 06, 2007 652 653 654 655 @chapter Document Structure @cindex document structure @cindex structure of document  Carsten Dominik committed Apr 27, 2008 656 Org is based on outline mode and provides flexible commands to  Glenn Morris committed Sep 06, 2007 657 658 659 edit the structure of the document. @menu  Carsten Dominik committed Apr 27, 2008 660 661 * Outlines:: Org is based on Outline mode * Headlines:: How to typeset Org tree headlines  Glenn Morris committed Sep 06, 2007 662 663 664 665 666 667 668 * Visibility cycling:: Show and hide, much simplified * Motion:: Jumping to other headlines * Structure editing:: Changing sequence and level of headlines * Archiving:: Move done task trees to a different place * Sparse trees:: Matches embedded in context * Plain lists:: Additional structure within an entry * Drawers:: Tucking stuff away  Carsten Dominik committed Apr 27, 2008 669 * Orgstruct mode:: Structure editing outside Org  Glenn Morris committed Sep 06, 2007 670 671 @end menu  Carsten Dominik committed Apr 27, 2008 672 @node Outlines, Headlines, Document Structure, Document Structure  Glenn Morris committed Sep 06, 2007 673 674 @section Outlines @cindex outlines  Carsten Dominik committed Apr 27, 2008 675 @cindex Outline mode  Glenn Morris committed Sep 06, 2007 676   Carsten Dominik committed Apr 27, 2008 677 Org is implemented on top of Outline mode. Outlines allow a  Glenn Morris committed Sep 06, 2007 678 679 680 681 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 682 currently being worked on. Org greatly simplifies the use of  Glenn Morris committed Sep 06, 2007 683 684 685 outlines by compressing the entire show/hide functionality into a single command @command{org-cycle}, which is bound to the @key{TAB} key.  Carsten Dominik committed Apr 27, 2008 686 @node Headlines, Visibility cycling, Outlines, Document Structure  Glenn Morris committed Sep 06, 2007 687 688 689 690 691 @section Headlines @cindex headlines @cindex outline tree Headlines define the structure of an outline tree. The headlines in  Carsten Dominik committed Apr 27, 2008 692 Org start with one or more stars, on the left margin@footnote{See  Glenn Morris committed Sep 06, 2007 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 the variable @code{org-special-ctrl-a/e} to configure special behavior of @kbd{C-a} and @kbd{C-e} in headlines.}. For example: @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 starters. @ref{Clean view} describes a setup to realize this. 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 717 @node Visibility cycling, Motion, Headlines, Document Structure  Glenn Morris committed Sep 06, 2007 718 719 720 721 722 723 724 725 @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 726 Org uses just two commands, bound to @key{TAB} and  Glenn Morris committed Sep 06, 2007 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 @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 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 766 767 768 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 769 770 771 772 773 774 775  @cindex show all, command @kindex C-c C-a @item C-c C-a Show all. @kindex C-c C-r @item C-c C-r  Carsten Dominik committed Apr 27, 2008 776 777 778 779 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  Glenn Morris committed Sep 06, 2007 780 781 782 783 784 785 786 787 788 789 790 791 792 level, all sibling headings. @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 793 794 795 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 796 797 798 the previously used indirect buffer. @end table  Carsten Dominik committed Apr 27, 2008 799 When Emacs first visits an Org file, the global state is set to  Glenn Morris committed Sep 06, 2007 800 801 802 803 804 805 806 807 808 809 810 OVERVIEW, i.e. only the top level headlines are visible. This can be 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 @end example  Carsten Dominik committed Jun 17, 2008 811 812 813 814 815 816 817 818 819 820 821 822 823 @noindent Forthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties 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} Switch back to the startup visibility of the buffer, i.e. whatever is requested by startup options and @samp{VISIBILITY} properties in individual entries. @end table  Carsten Dominik committed Apr 27, 2008 824 @node Motion, Structure editing, Visibility cycling, Document Structure  Glenn Morris committed Sep 06, 2007 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 @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: @example @key{TAB} @r{Cycle visibility.} @key{down} / @key{up} @r{Next/previous visible headline.} 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.} @key{RET} @r{Select this location.} @end example @end table  Carsten Dominik committed Apr 27, 2008 863 @node Structure editing, Archiving, Motion, Document Structure  Glenn Morris committed Sep 06, 2007 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 @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 @cindex subtrees, cut and paste @table @kbd @kindex M-@key{RET} @item M-@key{RET} 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 880 creation of a new headline, use a prefix argument, or first press @key{RET}  Glenn Morris committed Sep 06, 2007 881 882 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 883 884 885 886 887 888 889 890 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 used at the end of a folded subtree (i.e. behind the ellipses at the end 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 891 892 893 894 @kindex C-@key{RET} @item C-@key{RET} Insert a new heading after the current subtree, same level as the current headline. This command works from anywhere in the entry.  Glenn Morris committed Sep 06, 2007 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 @kindex M-S-@key{RET} @item M-S-@key{RET} Insert new TODO entry with same level as current heading. @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 @kindex C-c C-x C-k @item C-c C-x C-w @itemx C-c C-x C-k Kill subtree, i.e. remove it from buffer but save in kill ring.  Carsten Dominik committed Apr 27, 2008 922 With a numeric prefix argument N, kill N sequential subtrees.  Glenn Morris committed Sep 06, 2007 923 924 @kindex C-c C-x M-w @item C-c C-x M-w  Carsten Dominik committed Apr 27, 2008 925 926 Copy subtree to kill ring. With a numeric prefix argument N, copy the N sequential subtrees.  Glenn Morris committed Sep 06, 2007 927 928 929 @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 930 931 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 932 headline marker like @samp{****}.  Carsten Dominik committed Jan 18, 2008 933 934 935 @kindex C-c C-w @item C-c C-w Refile entry to a different location. @xref{Refiling notes}.  Glenn Morris committed Sep 06, 2007 936 937 @kindex C-c ^ @item C-c ^  Carsten Dominik committed Apr 27, 2008 938 939 940 941 942 943 944 945 946 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 alphabetically, numerically, by time (using the first time stamp in each entry), by priority, or by TODO keyword (in the sequence the keywords have been defined in the setup). 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 947 948 949 950 951 952 @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 Widen buffer to remove a narrowing.  Carsten Dominik committed Mar 13, 2008 953 954 955 956 957 958 959 @kindex C-c * @item C-c * 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. Or, if the first line is a headline, remove the stars from all headlines in the region.  Glenn Morris committed Sep 06, 2007 960 961 962 963 @end table @cindex region, active @cindex active region  Carsten Dominik committed Apr 27, 2008 964 965 @cindex Transient mark mode When there is an active region (Transient mark mode), promotion and  Glenn Morris committed Sep 06, 2007 966 967 968 969 970 971 972 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 Apr 27, 2008 973 @node Archiving, Sparse trees, Structure editing, Document Structure  Glenn Morris committed Sep 06, 2007 974 975 976 977 978 @section Archiving @cindex archiving When a project represented by a (sub)tree is finished, you may want to move the tree out of the way and to stop it from contributing to the  Carsten Dominik committed Apr 27, 2008 979 agenda. Org mode knows two ways of archiving. You can mark a tree with  Glenn Morris committed Sep 06, 2007 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 the ARCHIVE tag, or you can move an entire (sub)tree to a different location. @menu * ARCHIVE tag:: Marking a tree as inactive * Moving subtrees:: Moving a tree to an archive file @end menu @node ARCHIVE tag, Moving subtrees, Archiving, Archiving @subsection The ARCHIVE tag @cindex internal archiving A headline that is marked with the ARCHIVE tag (@pxref{Tags}) stays at its location in the outline tree, but behaves in the following way: @itemize @minus @item It does not open when you attempt to do so with a visibility cycling command (@pxref{Visibility cycling}). You can force cycling archived subtrees with @kbd{C-@key{TAB}}, or by setting the option @code{org-cycle-open-archived-trees}. Also normal outline commands like @code{show-all} will open archived subtrees. @item During sparse tree construction (@pxref{Sparse trees}), matches in archived subtrees are not exposed, unless you configure the option @code{org-sparse-tree-open-archived-trees}. @item  Carsten Dominik committed Apr 27, 2008 1006 During agenda view construction (@pxref{Agenda Views}), the content of  Glenn Morris committed Sep 06, 2007 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 archived trees is ignored unless you configure the option @code{org-agenda-skip-archived-trees}. @item Archived trees are not exported (@pxref{Exporting}), only the headline is. Configure the details using the variable @code{org-export-with-archived-trees}. @end itemize The following commands help managing the ARCHIVE tag: @table @kbd  Carsten Dominik committed Apr 27, 2008 1018 1019 @kindex C-c C-x a @item C-c C-x a  Glenn Morris committed Sep 06, 2007 1020 Toggle the ARCHIVE tag for the current headline. When the tag is set,  Carsten Dominik committed Apr 27, 2008 1021 the headline changes to a shadowed face, and the subtree below it is  Glenn Morris committed Sep 06, 2007 1022 hidden.  Carsten Dominik committed Apr 27, 2008 1023 1024 @kindex C-u C-c C-x a @item C-u C-c C-x a  Glenn Morris committed Sep 06, 2007 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 Check if any direct children of the current headline should be archived. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to set the ARCHIVE tag for the child. If the cursor is @emph{not} on a headline when this command is invoked, the level 1 trees will be checked. @kindex C-@kbd{TAB} @item C-@kbd{TAB} Cycle a tree even if it is tagged with ARCHIVE. @end table @node Moving subtrees, , ARCHIVE tag, Archiving @subsection Moving subtrees @cindex external archiving  Carsten Dominik committed Apr 27, 2008 1039 1040 1041 Once an entire project is finished, you may want to move it to a different location. Org can move it to an @emph{Attic Sibling} in the same tree, to a different tree in the current file, or to a different file, the archive file.  Glenn Morris committed Sep 06, 2007 1042 1043  @table @kbd  Carsten Dominik committed Apr 27, 2008 1044 1045 @kindex C-c C-x A @item C-c C-x A  Juanma Barranquero committed May 02, 2008 1046 Move the current entry to the @emph{Attic Sibling}. This is a sibling of the  Carsten Dominik committed Apr 27, 2008 1047 1048 1049 1050 entry with the heading @samp{Attic} and the tag @samp{ARCHIVE} (@pxref{ARCHIVE tag}). The entry becomes a child of that sibling and in this way retains a lot of its original context, including inherited tags and approximate position in the outline.  Glenn Morris committed Sep 06, 2007 1051 1052 1053 1054 @kindex C-c C-x C-s @item C-c C-x C-s Archive the subtree starting at the cursor position to the location given by @code{org-archive-location}. Context information that could be  Carsten Dominik committed Apr 27, 2008 1055 lost like the file name, the category, inherited tags, and the TODO  Glenn Morris committed Sep 06, 2007 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 state will be store as properties in the entry. @kindex C-u C-c C-x C-s @item C-u C-c C-x C-s Check if any direct children of the current headline could be moved to the archive. To do this, each subtree is checked for open TODO entries. If none are found, the command offers to move it to the archive location. If the cursor is @emph{not} on a headline when this command is invoked, the level 1 trees will be checked. @end table @cindex archive locations The default archive location is a file in the same directory as the current file, with the name derived by appending @file{_archive} to the current file name. For information and examples on how to change this, see the documentation string of the variable @code{org-archive-location}. There is also an in-buffer option for  Carsten Dominik committed Jan 18, 2008 1072 1073 1074 1075 1076 1077 1078 setting this variable, for example@footnote{For backward compatibility, the following also works: If there are several such lines in a file, each specifies the archive location for the text below it. The first such line also applies to any text before its definition. However, using this method is @emph{strongly} deprecated as it is incompatible with the outline structure of the document. The correct method for setting multiple archive locations in a buffer is using a property.}:  Glenn Morris committed Sep 06, 2007 1079 1080 1081 1082 1083 1084  @example #+ARCHIVE: %s_done:: @end example @noindent  Carsten Dominik committed Jan 18, 2008 1085 1086 If you would like to have a special ARCHIVE location for a single entry or a (sub)tree, give the entry an @code{:ARCHIVE:} property with the  Carsten Dominik committed Apr 27, 2008 1087 location as the value (@pxref{Properties and Columns}).  Glenn Morris committed Sep 06, 2007 1088   Carsten Dominik committed Mar 13, 2008 1089 1090 1091 1092 1093 1094 When a subtree is moved, it receives a number of special properties that record context information like the file from where the entry came, it's outline path the archiving time etc. Configure the variable @code{org-archive-save-context-info} to adjust the amount of information added.  Carsten Dominik committed Apr 27, 2008 1095 @node Sparse trees, Plain lists, Archiving, Document Structure  Glenn Morris committed Sep 06, 2007 1096 1097 1098 1099 1100 1101 @section Sparse trees @cindex sparse trees @cindex trees, sparse @cindex folding, sparse trees @cindex occur, command  Carsten Dominik committed Jun 17, 2008 1102 1103 1104 1105 1106 1107 1108 1109 An important feature of Org mode is the ability to construct @emph{sparse trees} for selected information in an outline tree, so that the entire document is folded as much as possible, but the selected information is made visible along with the headline structure above it@footnote{See also the variables @code{org-show-hierarchy-above}, @code{org-show-following-heading}, @code{org-show-siblings}, and @code{org-show-entry-below} for detailed control on how much context is shown around each match.}. Just try it out and you will see immediately how it works.  Carsten Dominik committed Jan 18, 2008 1110   Carsten Dominik committed Apr 27, 2008 1111 Org mode contains several commands creating such trees, all these  Carsten Dominik committed Jan 18, 2008 1112 commands can be accessed through a dispatcher:  Glenn Morris committed Sep 06, 2007 1113 1114 1115 1116  @table @kbd @kindex C-c / @item C-c /  Carsten Dominik committed Jan 18, 2008 1117 1118 1119 This prompts for an extra key to select a sparse-tree creating command. @kindex C-c / r @item C-c / r  Carsten Dominik committed Jun 17, 2008 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 Occur. Prompts for a regexp and shows a sparse tree with all matches. If the match is in a headline, the headline is made visible. If the match is in the body of an entry, headline and body are made visible. In order to provide minimal context, also the full hierarchy of headlines above the match is shown, as well as the headline following the match. Each match is also highlighted; the highlights disappear when the buffer is changed by an editing command@footnote{depending on the option @code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}. When called with a @kbd{C-u} prefix argument, previous highlights are kept, so several calls to this command can be stacked.  Glenn Morris committed Sep 06, 2007 1130 @end table  Carsten Dominik committed Jan 18, 2008 1131   Glenn Morris committed Sep 06, 2007 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 @noindent For frequently used sparse trees of specific search strings, you can use the variable @code{org-agenda-custom-commands} to define fast keyboard access to specific sparse trees. These commands will then be accessible through the agenda dispatcher (@pxref{Agenda dispatcher}). For example: @lisp (setq org-agenda-custom-commands '(("f" occur-tree "FIXME"))) @end lisp @noindent will define the key @kbd{C-c a f} as a shortcut for creating a sparse tree matching the string @samp{FIXME}.  Carsten Dominik committed Jan 18, 2008 1147 1148 The other sparse tree commands select headings based on TODO keywords, tags, or properties and will be discussed later in this manual.  Glenn Morris committed Sep 06, 2007 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159  @kindex C-c C-e v @cindex printing sparse trees @cindex visible text, printing To print a sparse tree, you can use the Emacs command @code{ps-print-buffer-with-faces} which does not print invisible parts of the document @footnote{This does not work under XEmacs, because XEmacs uses selective display for outlining, not text properties.}. Or you can use the command @kbd{C-c C-e v} to export only the visible part of the document and print the resulting file.  Carsten Dominik committed Apr 27, 2008 1160 @node Plain lists, Drawers, Sparse trees, Document Structure  Glenn Morris committed Sep 06, 2007 1161 1162 1163 1164 1165 1166 1167 1168 @section Plain lists @cindex plain lists @cindex lists, plain @cindex lists, ordered @cindex ordered lists Within an entry of the outline tree, hand-formatted lists can provide additional structure. They also provide a way to create lists of  Carsten Dominik committed Apr 27, 2008 1169 checkboxes (@pxref{Checkboxes}). Org supports editing such lists,  Carsten Dominik committed Jan 18, 2008 1170 and the HTML exporter (@pxref{Exporting}) parses and formats them.  Glenn Morris committed Sep 06, 2007 1171   Carsten Dominik committed Jun 17, 2008 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 Org knows ordered lists, unordered lists, and description lists. @itemize @bullet @item @emph{Unordered} list items start with @samp{-}, @samp{+}, or @samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or they will be seen as top-level headlines. Also, when you are hiding leading stars to get a clean outline view, plain list items starting with a star are visually indistinguishable from true headlines. In short: even though @samp{*} is supported, it may be better to not use it for plain list items.} as bullets. @item @emph{Ordered} list items start with a numeral followed by either a period or a right parenthesis, such as @samp{1.} or @samp{1)}. @item @emph{Description} list items are like unordered list items, but contain the separator @samp{ :: } to separate the description @emph{term} from the desciption. @end itemize Items belonging to the same list must have the same indentation on the first line. In particular, if an ordered list reaches number @samp{10.}, then the 2--digit numbers must be written left-aligned with the other numbers in the list. Indentation also determines the end of a list item. It ends before the next line that is indented like the bullet/number, or less. Empty lines are part of the previous item, so you can have several paragraphs in one item. If you would like an empty line to terminate all currently open plain lists, configure the variable @code{org-empty-line-terminates-plain-lists}. Here is an example:  Glenn Morris committed Sep 06, 2007 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212  @example @group ** Lord of the Rings My favorite scenes are (in this order) 1. The attack of the Rohirrim 2. Eowyns fight with the witch king + this was already my favorite scene in the book + I really like Miranda Otto. 3. Peter Jackson being shot by Legolas - on DVD only He makes a really funny face when it happens. But in the end, not individual scenes matter but the film as a whole.  Carsten Dominik committed Jun 17, 2008 1213 1214 1215 1216  Important actors in this film are: - @b{Elijah Wood} :: He plays the Frodo - @b{Sean Austin} :: He plays the Sam, Frodos friend. I still remember him very well from his role as Mikey Walsh a in the Goonies.  Glenn Morris committed Sep 06, 2007 1217 1218 1219 @end group @end example  Carsten Dominik committed Apr 27, 2008 1220 1221 Org supports these lists by tuning filling and wrapping commands to deal with them correctly@footnote{Org only changes the filling  Glenn Morris committed Sep 06, 2007 1222 1223 settings for Emacs. For XEmacs, you should use Kyle E. Jones' @file{filladapt.el}. To turn this on, put into @file{.emacs}:  Carsten Dominik committed Jun 17, 2008 1224 1225 @code{(require 'filladapt)}}, and by exporting them properly (@pxref{Exporting}).  Glenn Morris committed Sep 06, 2007 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239  The following commands act on items when the cursor is in the first line of an item (the line with the bullet or number). @table @kbd @kindex @key{TAB} @item @key{TAB} Items can be folded just like headline levels if you set the variable @code{org-cycle-include-plain-lists}. The level of an item is then given by the indentation of the bullet/number. Items are always subordinate to real headlines, however; the hierarchies remain completely separated. If @code{org-cycle-include-plain-lists} has not been set, @key{TAB}  Carsten Dominik committed Apr 27, 2008 1240 fixes the indentation of the current line in a heuristic way.  Glenn Morris committed Sep 06, 2007 1241 1242 @kindex M-@key{RET} @item M-@key{RET}  Carsten Dominik committed Apr 27, 2008 1243 1244 1245 1246 1247 1248 1249 1250 1251 Insert new item at current level. With a prefix argument, force a new heading (@pxref{Structure editing}). If this command is used in the middle of a line, the line is @emph{split} and the rest of the line becomes the new item@footnote{If you do not want the line to be split, customize the variable @code{org-M-RET-may-split-line}.}. If this command is executed in the @emph{whitespace before a bullet or number}, the new item is created @emph{before} the current item. If the command is executed in the white space before the text that is part of an item but does not contain the bullet, a bullet is added to the current line.  Glenn Morris committed Sep 06, 2007 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 @kindex M-S-@key{RET} @item M-S-@key{RET} Insert a new item with a checkbox (@pxref{Checkboxes}). @kindex S-@key{up} @kindex S-@key{down} @item S-@key{up} @itemx S-@key{down} Jump to the previous/next item in the current list. @kindex M-S-@key{up} @kindex M-S-@key{down} @item M-S-@key{up} @itemx M-S-@key{down} Move the item including subitems up/down (swap with previous/next item of same indentation). If the list is ordered, renumbering is automatic. @kindex M-S-@key{left} @kindex M-S-@key{right} @item M-S-@key{left} @itemx M-S-@key{right} Decrease/increase the indentation of the item, including subitems. Initially, the item tree is selected based on current indentation. When these commands are executed several times in direct succession, the initially selected region is used, even if the new indentation would imply a different hierarchy. To use the new hierarchy, break the command chain with a cursor motion or so. @kindex C-c C-c @item C-c C-c If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the  Carsten Dominik committed Jan 18, 2008 1280 1281 state of the checkbox. If not, this command makes sure that all the items on this list level use the same bullet. Furthermore, if this is  Carsten Dominik committed Apr 27, 2008 1282 an ordered list, make sure the numbering is OK.  Glenn Morris committed Sep 06, 2007 1283 1284 @kindex C-c - @item C-c -  Carsten Dominik committed Apr 27, 2008 1285 1286 1287 1288 1289 1290 1291 Cycle the entire list level through the different itemize/enumerate bullets (@samp{-}, @samp{+}, @samp{*}, @samp{1.}, @samp{1)}). With a numeric prefix argument N, select the Nth bullet from this list. If there is an active region when calling this, all lines will be converted to list items. If the first line already was a list item, any item markers will be removed from the list. Finally, even without an active region, a normal line will be converted into a list item.  Glenn Morris committed Sep 06, 2007 1292 1293 @end table  Carsten Dominik committed Apr 27, 2008 1294 @node Drawers, Orgstruct mode, Plain lists, Document Structure  Glenn Morris committed Sep 06, 2007 1295 1296 1297 1298 1299 @section Drawers @cindex drawers @cindex visibility cycling, drawers Sometimes you want to keep information associated with an entry, but you  Carsten Dominik committed Apr 27, 2008 1300 normally don't want to see it. For this, Org mode has @emph{drawers}.  Carsten Dominik committed Jan 18, 2008 1301 1302 1303 Drawers need to be configured with the variable @code{org-drawers}@footnote{You can define drawers on a per-file basis with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers  Glenn Morris committed Sep 06, 2007 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 look like this: @example ** This is a headline Still outside the drawer :DRAWERNAME: This is inside the drawer. :END: After the drawer. @end example Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and show the entry, but keep the drawer collapsed to a single line. In order to look inside the drawer, you need to move the cursor to the  Carsten Dominik committed Apr 27, 2008 1318 drawer line and press @key{TAB} there. Org mode uses a drawer for  Carsten Dominik committed Jun 17, 2008 1319 1320 storing properties (@pxref{Properties and Columns}), and another one for storing clock times (@pxref{Clocking work time}).  Glenn Morris committed Sep 06, 2007 1321   Carsten Dominik committed Apr 27, 2008 1322 @node Orgstruct mode, , Drawers, Document Structure  Glenn Morris committed Sep 06, 2007