org.texi 191 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073
  1. \input texinfo
  2. @c %**start of header
  3. @setfilename ../info/org
  4. @settitle Org Mode Manual
  5. @set VERSION 4.44
  6. @set DATE August 2006
  7. @dircategory Emacs
  8. @direntry
  9. * Org Mode: (org). outline-based notes management and organizer
  10. @end direntry
  11. @c Version and Contact Info
  12. @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/org/,maintainers webpage}
  13. @set AUTHOR Carsten Dominik
  14. @set MAINTAINER Carsten Dominik
  15. @set MAINTAINEREMAIL @email{dominik@@science.uva.nl}
  16. @set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer}
  17. @c %**end of header
  18. @finalout
  19. @c Macro definitions
  20. @c Subheadings inside a table.
  21. @macro tsubheading{text}
  22. @ifinfo
  23. @subsubheading \text\
  24. @end ifinfo
  25. @ifnotinfo
  26. @item @b{\text\}
  27. @end ifnotinfo
  28. @end macro
  29. @copying
  30. This manual is for Org-mode (version @value{VERSION}).
  31. Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation
  32. @quotation
  33. Permission is granted to copy, distribute and/or modify this document
  34. under the terms of the GNU Free Documentation License, Version 1.1 or
  35. any later version published by the Free Software Foundation; with no
  36. Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
  37. and with the Back-Cover Texts as in (a) below. A copy of the
  38. license is included in the section entitled ``GNU Free Documentation
  39. License.''
  40. (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
  41. this GNU Manual, like GNU software. Copies published by the Free
  42. Software Foundation raise funds for GNU development.''
  43. @end quotation
  44. @end copying
  45. @titlepage
  46. @title Org Mode Manual
  47. @subtitle Release @value{VERSION}
  48. @author by Carsten Dominik
  49. @c The following two commands start the copyright page.
  50. @page
  51. @vskip 0pt plus 1filll
  52. @insertcopying
  53. @end titlepage
  54. @c Output the table of contents at the beginning.
  55. @contents
  56. @ifnottex
  57. @node Top, Introduction, (dir), (dir)
  58. @top Org Mode Manual
  59. @insertcopying
  60. @end ifnottex
  61. @menu
  62. * Introduction:: Getting started
  63. * Document structure:: A tree works like your brain
  64. * Tables:: Pure magic for quick formatting
  65. * Hyperlinks:: Notes in context
  66. * TODO items:: Every tree branch can be a TODO item
  67. * Timestamps:: Assign date and time to items
  68. * Tags:: Tagging headlines and matching sets of tags
  69. * Agenda views:: Collecting information into views
  70. * Embedded LaTeX:: LaTeX fragments and formulas
  71. * Exporting:: Sharing and publishing of notes
  72. * Publishing:: Create a web site of linked Org-mode files
  73. * Miscellaneous:: All the rest which did not fit elsewhere
  74. * Extensions and Hacking:: It is possible to write add-on code
  75. * History and Acknowledgments:: How Org-mode came into being
  76. * Index:: The fast road to specific information
  77. * Key Index:: Key bindings and where they are described
  78. @detailmenu
  79. --- The Detailed Node Listing ---
  80. Introduction
  81. * Summary:: Brief summary of what Org-mode does
  82. * Installation:: How to install a downloaded version of Org-mode
  83. * Activation:: How to activate Org-mode for certain buffers.
  84. * Feedback:: Bug reports, ideas, patches etc.
  85. Document Structure
  86. * Outlines:: Org-mode is based on outline-mode
  87. * Headlines:: How to typeset org-tree headlines
  88. * Visibility cycling:: Show and hide, much simplified
  89. * Motion:: Jumping to other headlines
  90. * Structure editing:: Changing sequence and level of headlines
  91. * Archiving:: Move done task trees to a different place
  92. * Sparse trees:: Matches embedded in context
  93. * Plain lists:: Editing hand-formatted lists
  94. * Checkboxes:: Easily checking off things.
  95. Archiving
  96. * ARCHIVE tag:: Marking a tree as inactive
  97. * Moving subtrees:: Moving a tree to an archive file
  98. Tables
  99. * Built-in table editor:: Simple tables
  100. * Narrow columns:: Stop wasting space in tables
  101. * Table calculations:: Compute a field from other fields
  102. * orgtbl-mode:: The table editor as minor mode
  103. * table.el:: Complex tables
  104. Calculations in tables
  105. * Formula syntax:: How to write a formula
  106. * Lisp formulas:: An alternative way to write formulas
  107. * Column formulas:: Formulas valid for all fields in a column
  108. * Advanced features:: Field names, parameters and automatic recalc
  109. * Named-field formulas:: Formulas valid in single fields
  110. * Editing/debugging formulas:: Changing a stored formula
  111. * Appetizer:: Taste the power of calc
  112. Hyperlinks
  113. * Link format:: How links in Org-mode are formatted
  114. * Internal links:: Links to other places in the current file
  115. * External links:: URL-like links to the world
  116. * Handling links:: Creating, inserting and following
  117. * Search options:: Linking to a specific location
  118. * Custom searches:: When the default search is not enough
  119. * Remember:: Org-trees store quick notes
  120. Internal links
  121. * Radio targets:: Make targets trigger links in plain text.
  122. * CamelCase links:: Activating CamelCase words as links
  123. TODO items
  124. * TODO basics:: Marking and displaying TODO entries
  125. * TODO extensions:: Workflow and assignments
  126. * Priorities:: Some things are more important than others
  127. Extended use of TODO keywords
  128. * Workflow states:: From TODO to DONE in steps
  129. * TODO types:: I do this, Fred the rest
  130. * Per file keywords:: Different files, different requirements
  131. Timestamps
  132. * Time stamps:: Assigning a time to a tree entry
  133. * Creating timestamps:: Commands which insert timestamps
  134. * Progress logging:: Documenting when what work was done.
  135. Progress Logging
  136. * Closing items:: When was this entry marked DONE?
  137. * Clocking work time:: When exactly did you work on this item?
  138. Tags
  139. * Tag inheritance:: Tags use the tree structure of the outline
  140. * Setting tags:: How to assign tags to a headline
  141. * Tag searches:: Searching for combinations of tags
  142. Agenda Views
  143. * Agenda files:: Files being searched for agenda information
  144. * Agenda dispatcher:: Keyboard access to agenda views
  145. * Weekly/Daily agenda:: The calendar page with current tasks
  146. * Global TODO list:: All unfinished action items
  147. * Matching headline tags:: Structured information with fine-tuned search
  148. * Timeline:: Time-sorted view for single file
  149. * Agenda commands:: Remote editing of org trees
  150. The weekly/daily agenda
  151. * Categories:: Not all tasks are equal
  152. * Time-of-day specifications:: How the agenda knows the time
  153. * Calendar/Diary integration:: Integrating Anniversaries and more
  154. * Sorting of agenda items:: The order of things
  155. Embedded LaTeX
  156. * Math symbols:: TeX macros for symbols and Greek letters
  157. * Subscripts and Superscripts:: Simple syntax for raising/lowering text
  158. * LaTeX fragments:: Complex formulas made easy
  159. * Processing LaTeX fragments:: Previewing LaTeX processing
  160. * CDLaTeX mode:: Speed up entering of formulas
  161. Exporting
  162. * ASCII export:: Exporting to plain ASCII
  163. * HTML export:: Exporting to HTML
  164. * XOXO export:: Exporting to XOXO
  165. * iCalendar export:: Exporting in iCalendar format
  166. * Text interpretation:: How the exporter looks at the file
  167. Text interpretation by the exporter
  168. * Comment lines:: Some lines will not be exported
  169. * Enhancing text:: Subscripts, symbols and more
  170. * Export options:: How to influence the export settings
  171. Publishing
  172. * Configuration:: Defining projects
  173. * Sample configuration:: Example projects
  174. * Triggering publication:: Publication commands
  175. Configuration
  176. * Project alist:: The central configuration variable
  177. * Sources and destinations:: From here to there
  178. * Selecting files:: What files are part of the project?
  179. * Publishing action:: Setting the function doing the publishing
  180. * Publishing options:: Tweaking HTML export
  181. * Publishing links:: Which links keep working after publishing?
  182. * Project page index:: Publishing a list of project files
  183. Sample configuration
  184. * Simple example:: One-component publishing
  185. * Complex example:: A multi-component publishing example
  186. Miscellaneous
  187. * Completion:: M-TAB knows what you need
  188. * Customization:: Adapting Org-mode to your taste
  189. * In-buffer settings:: Overview of the #+KEYWORDS
  190. * The very busy C-c C-c key:: When in doubt, press C-c C-c
  191. * Clean view:: Getting rid of leading stars in the outline
  192. * TTY keys:: Using Org-mode on a tty
  193. * Interaction:: Other Emacs packages
  194. * Bugs:: Things which do not work perfectly
  195. Interaction with other packages
  196. * Cooperation:: Packages Org-mode cooperates with
  197. * Conflicts:: Packages that lead to conflicts
  198. Extensions, Hooks and Hacking
  199. * Extensions:: Existing 3rd-part extensions
  200. * Dynamic blocks:: Automatically filled blocks
  201. @end detailmenu
  202. @end menu
  203. @node Introduction, Document structure, Top, Top
  204. @chapter Introduction
  205. @cindex introduction
  206. @menu
  207. * Summary:: Brief summary of what Org-mode does
  208. * Installation:: How to install a downloaded version of Org-mode
  209. * Activation:: How to activate Org-mode for certain buffers.
  210. * Feedback:: Bug reports, ideas, patches etc.
  211. @end menu
  212. @node Summary, Installation, Introduction, Introduction
  213. @section Summary
  214. @cindex summary
  215. Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
  216. project planning with a fast and effective plain-text system.
  217. Org-mode develops organizational tasks around NOTES files that contain
  218. information about projects as plain text. Org-mode is implemented on
  219. top of outline-mode, which makes it possible to keep the content of
  220. large files well structured. Visibility cycling and structure editing
  221. help to work with the tree. Tables are easily created with a built-in
  222. table editor. Org-mode supports ToDo items, deadlines, time stamps,
  223. and scheduling. It dynamically compiles entries into an agenda that
  224. utilizes and smoothly integrates much of the Emacs calendar and diary.
  225. Plain text URL-like links connect to websites, emails, Usenet
  226. messages, BBDB entries, and any files related to the projects. For
  227. printing and sharing of notes, an Org-mode file can be exported as a
  228. structured ASCII file, as HTML, or (todo and agenda items only) as an
  229. iCalendar file. It can also serve as a publishing tool for a set of
  230. linked webpages.
  231. Org-mode keeps simple things simple. When first fired up, it should
  232. feel like a straightforward, easy to use outliner. Complexity is not
  233. imposed, but a large amount of functionality is available when you need
  234. it. Org-mode can be used on different levels and in different ways, for
  235. example:
  236. @example
  237. @r{@bullet{} as an outline extension with visibility cycling and structure editing}
  238. @r{@bullet{} as an ASCII system and table editor for taking structured notes}
  239. @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
  240. @r{@bullet{} as a TODO list editor}
  241. @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
  242. @r{@bullet{} as a simple hypertext system, with HTML export}
  243. @r{@bullet{} as a publishing tool to create a set of interlinked webpages}
  244. @end example
  245. The Org-mode table editor can be integrated into any major mode by
  246. activating the minor Orgtbl-mode.
  247. @cindex FAQ
  248. There is a website for Org-mode which provides links to the newest
  249. version of Org-mode, as well as additional information, frequently asked
  250. questions (FAQ), links to tutorials etc. This page is located at
  251. @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
  252. @page
  253. @node Installation, Activation, Summary, Introduction
  254. @section Installation
  255. @cindex installation
  256. @cindex XEmacs
  257. @b{Important:} If Org-mode is part of the Emacs distribution or an
  258. XEmacs package, please skip this section and go directly to
  259. @ref{Activation}.
  260. If you have downloaded Org-mode from the Web, you must take the
  261. following steps to install it: Go into the Org-mode distribution
  262. directory and edit the top section of the file @file{Makefile}. You
  263. must set the name of the Emacs binary (likely either @file{emacs} or
  264. @file{xemacs}), and the paths to the directories where local Lisp and
  265. Info files are kept. If you don't have access to the system-wide
  266. directories, create your own two directories for these files, enter them
  267. into the Makefile, and make sure Emacs finds the Lisp files by adding
  268. the following line to @file{.emacs}:
  269. @example
  270. (setq load-path (cons "~/path/to/lispdir" load-path))
  271. @end example
  272. @b{XEmacs users now need to install the file @file{noutline.el} from
  273. the @file{xemacs} subdirectory of the Org-mode distribution. Use the
  274. command:}
  275. @example
  276. @b{make install-noutline}
  277. @end example
  278. @noindent Now byte-compile and install the Lisp files with the shell
  279. commands:
  280. @example
  281. make
  282. make install
  283. @end example
  284. @noindent If you want to install the info documentation, use this command:
  285. @example
  286. make install-info
  287. @end example
  288. @noindent Then add to @file{.emacs}:
  289. @lisp
  290. ;; This line only if org-mode is not part of the X/Emacs distribution.
  291. (require 'org-install)
  292. @end lisp
  293. @node Activation, Feedback, Installation, Introduction
  294. @section Activation
  295. @cindex activation
  296. @cindex autoload
  297. @cindex global keybindings
  298. @cindex keybindings, global
  299. Add the following lines to your @file{.emacs} file. The last two lines
  300. define @emph{global} keys for the commands @command{org-store-link} and
  301. @command{org-agenda} - please choose suitable keys yourself.
  302. @lisp
  303. ;; The following lines are always needed. Choose your own keys.
  304. (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
  305. (define-key global-map "\C-cl" 'org-store-link)
  306. (define-key global-map "\C-ca" 'org-agenda)
  307. @end lisp
  308. Furthermore, you must activate @code{font-lock-mode} in org-mode
  309. buffers, because significant functionality depends on font-locking being
  310. active. You can do this with either one of the following two lines
  311. (XEmacs user must use the second option):
  312. @lisp
  313. (global-font-lock-mode 1) ; for all buffers
  314. (add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only
  315. @end lisp
  316. @cindex org-mode, turning on
  317. With this setup, all files with extension @samp{.org} will be put
  318. into Org-mode. As an alternative, make the first line of a file look
  319. like this:
  320. @example
  321. MY PROJECTS -*- mode: org; -*-
  322. @end example
  323. @noindent which will select Org-mode for this buffer no matter what
  324. the file's name is. See also the variable
  325. @code{org-insert-mode-line-in-empty-file}.
  326. @node Feedback, , Activation, Introduction
  327. @section Feedback
  328. @cindex feedback
  329. @cindex bug reports
  330. @cindex maintainer
  331. @cindex author
  332. If you find problems with Org-mode, or if you have questions, remarks,
  333. or ideas about it, please contact the maintainer @value{MAINTAINER} at
  334. @value{MAINTAINEREMAIL}.
  335. For bug reports, please provide as much information as possible,
  336. including the version information of Emacs (@kbd{C-h v emacs-version
  337. @key{RET}}) and Org-mode (@kbd{C-h v org-version @key{RET}}), as well as
  338. the Org-mode related setup in @file{.emacs}. If an error occurs, a
  339. traceback can be very useful. Often a small example file helps, along
  340. with clear information about:
  341. @enumerate
  342. @item What exactly did you do?
  343. @item What did you expect to happen?
  344. @item What happened instead?
  345. @end enumerate
  346. @noindent Thank you for helping to improve this mode.
  347. @node Document structure, Tables, Introduction, Top
  348. @chapter Document Structure
  349. @cindex document structure
  350. @cindex structure of document
  351. Org-mode is based on outline mode and provides flexible commands to
  352. edit the structure of the document.
  353. @menu
  354. * Outlines:: Org-mode is based on outline-mode
  355. * Headlines:: How to typeset org-tree headlines
  356. * Visibility cycling:: Show and hide, much simplified
  357. * Motion:: Jumping to other headlines
  358. * Structure editing:: Changing sequence and level of headlines
  359. * Archiving:: Move done task trees to a different place
  360. * Sparse trees:: Matches embedded in context
  361. * Plain lists:: Editing hand-formatted lists
  362. * Checkboxes:: Easily checking off things.
  363. @end menu
  364. @node Outlines, Headlines, Document structure, Document structure
  365. @section Outlines
  366. @cindex outlines
  367. @cindex outline-mode
  368. Org-mode is implemented on top of outline-mode. Outlines allow to
  369. organize a document in a hierarchical structure, which (at least for
  370. me) is the best representation of notes and thoughts. Overview over
  371. this structure is achieved by folding (hiding) large parts of the
  372. document to show only the general document structure and the parts
  373. currently being worked on. Org-mode greatly simplifies the use of
  374. outlines by compressing the entire show/hide functionality into a
  375. single command @command{org-cycle}, which is bound to the @key{TAB}
  376. key.
  377. @node Headlines, Visibility cycling, Outlines, Document structure
  378. @section Headlines
  379. @cindex headlines
  380. @cindex outline tree
  381. Headlines define the structure of an outline tree. The headlines in
  382. Org-mode start with one or more stars, on the left margin. For
  383. example:
  384. @example
  385. * Top level headline
  386. ** Second level
  387. *** 3rd level
  388. some text
  389. *** 3rd level
  390. more text
  391. * Another top level headline
  392. @end example
  393. @noindent Some people find the many stars too noisy and would prefer an
  394. outline that has whitespace followed by a single star as headline
  395. starters. @ref{Clean view} describes a setup to realize this.
  396. @node Visibility cycling, Motion, Headlines, Document structure
  397. @section Visibility cycling
  398. @cindex cycling, visibility
  399. @cindex visibility cycling
  400. @cindex trees, visibility
  401. @cindex show hidden text
  402. @cindex hide text
  403. Outlines make it possible to hide parts of the text in the buffer.
  404. Org-mode uses just two commands, bound to @key{TAB} and
  405. @kbd{S-@key{TAB}} to change the visibility in the buffer.
  406. @cindex subtree visibility states
  407. @cindex subtree cycling
  408. @cindex folded, subtree visibility state
  409. @cindex children, subtree visibility state
  410. @cindex subtree, subtree visibility state
  411. @table @kbd
  412. @kindex @key{TAB}
  413. @item @key{TAB}
  414. @emph{Subtree cycling}: Rotate current subtree between the states
  415. @example
  416. ,-> FOLDED -> CHILDREN -> SUBTREE --.
  417. '-----------------------------------'
  418. @end example
  419. The cursor must be on a headline for this to work@footnote{see, however,
  420. the option @code{org-cycle-emulate-tab}.}. When the cursor is at the
  421. beginning of the buffer and the first line is not a headline, then
  422. @key{TAB} actually runs global cycling (see below)@footnote{see the
  423. option @code{org-cycle-global-at-bob}.}. Also when called with a prefix
  424. argument (@kbd{C-u @key{TAB}}), global cycling is invoked.
  425. @cindex global visibility states
  426. @cindex global cycling
  427. @cindex overview, global visibility state
  428. @cindex contents, global visibility state
  429. @cindex show all, global visibility state
  430. @kindex S-@key{TAB}
  431. @item S-@key{TAB}
  432. @itemx C-u @key{TAB}
  433. @emph{Global cycling}: Rotate the entire buffer between the states
  434. @example
  435. ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
  436. '--------------------------------------'
  437. @end example
  438. Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
  439. @cindex show all, command
  440. @kindex C-c C-a
  441. @item C-c C-a
  442. Show all.
  443. @end table
  444. When Emacs first visits an Org-mode file, the global state is set to
  445. OVERVIEW, i.e. only the top level headlines are visible. This can be
  446. configured through the variable @code{org-startup-folded}, or on a
  447. per-file basis by adding one of the following lines anywhere in the
  448. buffer:
  449. @example
  450. #+STARTUP: overview
  451. #+STARTUP: content
  452. #+STARTUP: showall
  453. @end example
  454. @node Motion, Structure editing, Visibility cycling, Document structure
  455. @section Motion
  456. @cindex motion, between headlines
  457. @cindex jumping, to headlines
  458. @cindex headline navigation
  459. The following commands jump to other headlines in the buffer.
  460. @table @kbd
  461. @kindex C-c C-n
  462. @item C-c C-n
  463. Next heading.
  464. @kindex C-c C-p
  465. @item C-c C-p
  466. Previous heading.
  467. @kindex C-c C-f
  468. @item C-c C-f
  469. Next heading same level.
  470. @kindex C-c C-b
  471. @item C-c C-b
  472. Previous heading same level.
  473. @kindex C-c C-u
  474. @item C-c C-u
  475. Backward to higher level heading.
  476. @kindex C-c C-j
  477. @item C-c C-j
  478. Jump to a different place without changing the current outline
  479. visibility. Shows the document structure in a temporary buffer, where
  480. you can use visibility cycling (@key{TAB}) to find your destination.
  481. After pressing @key{RET}, the cursor moves to the selected location in
  482. the original buffer, and the headings hierarchy above it is made
  483. visible.
  484. @end table
  485. @node Structure editing, Archiving, Motion, Document structure
  486. @section Structure editing
  487. @cindex structure editing
  488. @cindex headline, promotion and demotion
  489. @cindex promotion, of subtrees
  490. @cindex demotion, of subtrees
  491. @cindex subtree, cut and paste
  492. @cindex pasting, of subtrees
  493. @cindex cutting, of subtrees
  494. @cindex copying, of subtrees
  495. @cindex subtrees, cut and paste
  496. @table @kbd
  497. @kindex M-@key{RET}
  498. @item M-@key{RET}
  499. Insert new heading with same level as current. If the cursor is in a
  500. plain list item, a new item is created (@pxref{Plain lists}). To force
  501. creation of a new headline, use a prefix arg, or first press @key{RET}
  502. to get to the beginning of the next line. When this command is used in
  503. the middle of a line, the line is split and the rest of the line becomes
  504. the new headline. If the command is used at the beginning of a
  505. headline, the new headline is created before the current line. If at
  506. the beginning of any other line, the content of that line is made the
  507. new heading.
  508. @kindex M-S-@key{RET}
  509. @item M-S-@key{RET}
  510. Insert new TODO entry with same level as current heading.
  511. @kindex M-@key{left}
  512. @item M-@key{left}
  513. Promote current heading by one level.
  514. @kindex M-@key{right}
  515. @item M-@key{right}
  516. Demote current heading by one level.
  517. @kindex M-S-@key{left}
  518. @item M-S-@key{left}
  519. Promote the current subtree by one level.
  520. @kindex M-S-@key{right}
  521. @item M-S-@key{right}
  522. Demote the current subtree by one level.
  523. @kindex M-S-@key{up}
  524. @item M-S-@key{up}
  525. Move subtree up (swap with previous subtree of same
  526. level).
  527. @kindex M-S-@key{down}
  528. @item M-S-@key{down}
  529. Move subtree down (swap with next subtree of same level).
  530. @kindex C-c C-x C-w
  531. @kindex C-c C-x C-k
  532. @item C-c C-x C-w
  533. @itemx C-c C-x C-k
  534. Kill subtree, i.e. remove it from buffer but save in kill ring.
  535. @kindex C-c C-x M-w
  536. @item C-c C-x M-w
  537. Copy subtree to kill ring.
  538. @kindex C-c C-x C-y
  539. @item C-c C-x C-y
  540. Yank subtree from kill ring. This does modify the level of the subtree to
  541. make sure the tree fits in nicely at the yank position. The yank
  542. level can also be specified with a prefix arg, or by yanking after a
  543. headline marker like @samp{****}.
  544. @end table
  545. @cindex region, active
  546. @cindex active region
  547. @cindex transient-mark-mode
  548. When there is an active region (transient-mark-mode), promotion and
  549. demotion work on all headlines in the region. To select a region of
  550. headlines, it is best to place both point and mark at the beginning of a
  551. line, mark at the beginning of the first headline, and point at the line
  552. just after the last headline to change. Note that when the cursor is
  553. inside a table (@pxref{Tables}), the Meta-Cursor keys have different
  554. functionality.
  555. @node Archiving, Sparse trees, Structure editing, Document structure
  556. @section Archiving
  557. @cindex archiving
  558. When a project represented by a (sub)tree is finished, you may want
  559. to move the tree out of the way and to stop it from contributing to the
  560. agenda. Org-mode knows two ways of archiving. You can mark a tree with
  561. the ARCHIVE tag, or you can move an entire (sub)tree to a different
  562. location.
  563. @menu
  564. * ARCHIVE tag:: Marking a tree as inactive
  565. * Moving subtrees:: Moving a tree to an archive file
  566. @end menu
  567. @node ARCHIVE tag, Moving subtrees, Archiving, Archiving
  568. @subsection The ARCHIVE tag
  569. @cindex internal archiving
  570. A headline that is marked with the ARCHIVE tag (@pxref{Tags}) stays at
  571. its location in the outline tree, but behaves in the following way:
  572. @itemize @minus
  573. @item
  574. It does not open when you attempt to do so with a visibility cycling
  575. command (@pxref{Visibility cycling}). You can still open it with a
  576. normal outline command like @code{show-all}. Or you can modify the
  577. option @code{org-cycle-open-archived-trees}.
  578. @item
  579. During sparse tree construction (@pxref{Sparse trees}), matches in
  580. archived subtrees are not exposed, unless you configure the option
  581. @code{org-sparse-tree-open-archived-trees}.
  582. @item
  583. During agenda view construction (@pxref{Agenda views}), the content of
  584. archived trees is ignored unless you configure the option
  585. @code{org-agenda-skip-archived-trees}.
  586. @item
  587. Archived trees are not exported (@pxref{Exporting}), only the headline
  588. is. Configure the details using the variable
  589. @code{org-export-with-archived-trees}.
  590. @end itemize
  591. The following commands allow to set or clear the ARCHIVE tag:
  592. @table @kbd
  593. @kindex C-c C-x C-a
  594. @item C-c C-x C-a
  595. Toggle the ARCHIVE tag for the current headline. When the tag is set,
  596. the headline changes to a shadowish face, and the subtree below it is
  597. hidden.
  598. @kindex C-u C-c C-x C-a
  599. @item C-u C-c C-x C-a
  600. Check if any direct children of the current headline should be archived.
  601. To do this, each subtree is checked for open TODO entries. If none are
  602. found, the command offers to set the ARCHIVE tag for the child. If the
  603. cursor is @emph{not} on a headline when this command is invoked, the
  604. level 1 trees will be checked.
  605. @end table
  606. @node Moving subtrees, , ARCHIVE tag, Archiving
  607. @subsection Moving subtrees
  608. @cindex external archiving
  609. Once an entire project is finished, you may want to move it to a
  610. different location, either in the current file, or even in a different
  611. file, the archive file.
  612. @table @kbd
  613. @kindex C-c $
  614. @item C-c $
  615. Archive the subtree starting at the cursor position to the location
  616. given by @code{org-archive-location}.
  617. @kindex C-u C-c $
  618. @item C-u C-c $
  619. Check if any direct children of the current headline could be moved to
  620. the archive. To do this, each subtree is checked for open TODO entries.
  621. If none are found, the command offers to move it to the archive
  622. location. If the cursor is @emph{not} on a headline when this command
  623. is invoked, the level 1 trees will be checked.
  624. @end table
  625. @cindex archive locations
  626. The default archive location is a file in the same directory as the
  627. current file, with the name derived by appending @file{_archive} to the
  628. current file name. For information and examples on how to change this,
  629. see the documentation string of the variable
  630. @code{org-archive-location}.
  631. @node Sparse trees, Plain lists, Archiving, Document structure
  632. @section Sparse trees
  633. @cindex sparse trees
  634. @cindex trees, sparse
  635. @cindex folding, sparse trees
  636. @cindex occur, command
  637. An important feature of Org-mode is the ability to construct
  638. @emph{sparse trees} for selected information in an outline tree. A
  639. sparse tree means that the entire document is folded as much as
  640. possible, but the selected information is made visible along with the
  641. headline structure above it@footnote{See also the variables
  642. @code{org-show-hierarchy-above} and
  643. @code{org-show-following-heading}.}. Just try it out and you will see
  644. immediately how it works.
  645. Org-mode contains several commands creating such trees. The most
  646. basic one is @command{org-occur}:
  647. @table @kbd
  648. @kindex C-c /
  649. @item C-c /
  650. Occur. Prompts for a regexp and shows a sparse tree with all matches.
  651. If the match is in a headline, the headline is made visible. If the
  652. match is in the body of an entry, headline and body are made visible.
  653. In order to provide minimal context, also the full hierarchy of
  654. headlines above the match is shown, as well as the headline following
  655. the match. Each match is also highlighted; the highlights disappear
  656. when the buffer is changed with an editing command.
  657. @end table
  658. @noindent
  659. For frequently used sparse trees of specific search strings, you can
  660. use the variable @code{org-agenda-custom-commands} to define fast
  661. keyboard access to specific sparse trees. These commands will then be
  662. accessible through the agenda dispatcher (@pxref{Agenda dispatcher}).
  663. For example:
  664. @lisp
  665. (setq org-agenda-custom-commands
  666. '(("f" occur-tree "FIXME")))
  667. @end lisp
  668. @noindent will define the key @kbd{C-c a f} as a shortcut for creating
  669. a sparse tree matching the string @samp{FIXME}.
  670. Other commands use sparse trees as well. For example @kbd{C-c
  671. C-v} creates a sparse TODO tree (@pxref{TODO basics}).
  672. @kindex C-c C-e v
  673. @cindex printing sparse trees
  674. @cindex visible text, printing
  675. To print a sparse tree, you can use the Emacs command
  676. @code{ps-print-buffer-with-faces} which does not print invisible parts
  677. of the document @footnote{This does not work under XEmacs, because
  678. XEmacs uses selective display for outlining, not text properties.}.
  679. Or you can use the command @kbd{C-c C-e v} to export only the visible
  680. part of the document and print the resulting file.
  681. @node Plain lists, Checkboxes, Sparse trees, Document structure
  682. @section Plain lists
  683. @cindex plain lists
  684. @cindex lists, plain
  685. @cindex lists, ordered
  686. @cindex ordered lists
  687. Headlines define both the structure of the Org-mode file, and also lists
  688. (for example, TODO items (@pxref{TODO items}) should be created using
  689. headline levels). When taking notes, however, the plain text is
  690. sometimes easier to read with hand-formatted lists. Org-mode supports
  691. editing such lists, and the HTML exporter (@pxref{Exporting}) does
  692. parse and format them.
  693. Org-mode knows ordered and unordered lists. Unordered list items start
  694. with @samp{-}, @samp{+}, or @samp{*}@footnote{When using @samp{*} as a
  695. bullet, lines must be indented or they will be seen as top-level
  696. headlines. Also, when you are hiding leading stars to get a clean
  697. outline view, plain list items starting with a star are visually
  698. indistinguishable from true headlines. In short: even though @samp{*}
  699. is supported, it may be better not to use it for plain list items} as
  700. bullets. Ordered list items start with @samp{1.} or @samp{1)}. Items
  701. belonging to the same list must have the same indentation on the first
  702. line. In particular, if an ordered list reaches number @samp{10.}, then
  703. the 2--digit numbers must be written left-aligned with the other numbers
  704. in the list. Indentation also determines the end of a list item. It
  705. ends before the next line that is indented like the bullet/number, or
  706. less. For example:
  707. @example
  708. @group
  709. ** Lord of the Rings
  710. My favorite scenes are (in this order)
  711. 1. Eowyns fight with the witch king
  712. + this was already my favorite scene in the book
  713. + I really like Miranda Otto.
  714. 2. The attack of the Rohirrim
  715. 3. Peter Jackson being shot by Legolas
  716. - on DVD only
  717. He makes a really funny face when it happens.
  718. But in the end, not individual scenes matter but the film as a whole.
  719. @end group
  720. @end example
  721. Org-mode supports these lists by tuning filling and wrapping commands to
  722. deal with them correctly@footnote{Org-mode only changes the filling
  723. settings for Emacs. For XEmacs, you should use Kyle E. Jones'
  724. @file{filladapt.el}. To turn is on, put into @file{.emacs}:
  725. @example
  726. (require 'filladapt)
  727. @end example
  728. }.
  729. The following commands act on items when the cursor is in the first line
  730. of an item (the line with the bullet or number).
  731. @table @kbd
  732. @kindex @key{TAB}
  733. @item @key{TAB}
  734. Items can be folded just like headline levels if you set the variable
  735. @code{org-cycle-include-plain-lists}. The level of an item is then
  736. given by the indentation of the bullet/number. Items are always
  737. subordinate to real headlines, however; the hierarchies remain
  738. completely separated.
  739. @kindex M-@key{RET}
  740. @item M-@key{RET}
  741. Insert new item at current level. With prefix arg, force a new heading
  742. (@pxref{Structure editing}). If this command is used in the middle of a
  743. line, the line is @emph{split} and the rest of the line becomes the new
  744. item. If this command is executed in the @emph{whitespace before a bullet or
  745. number}, the new item is created @emph{before} the current item. If the
  746. command is executed in the white space before the text that is part of
  747. an item but does not contain the bullet, a bullet is added to the
  748. current line.
  749. @kindex M-S-@key{RET}
  750. @item M-S-@key{RET}
  751. Insert a new item with a checkbox (@pxref{Checkboxes}).
  752. @kindex S-@key{up}
  753. @kindex S-@key{down}
  754. @item S-@key{up}
  755. @itemx S-@key{down}
  756. Jump to the previous/next item in the current list.
  757. @kindex M-S-@key{up}
  758. @kindex M-S-@key{down}
  759. @item M-S-@key{up}
  760. @itemx M-S-@key{down}
  761. Move the item including subitems up/down (swap with previous/next item
  762. of same indentation). If the list is ordered, renumbering is
  763. automatic.
  764. @kindex M-S-@key{left}
  765. @kindex M-S-@key{right}
  766. @item M-S-@key{left}
  767. @itemx M-S-@key{right}
  768. Decrease/increase the indentation of the item, including subitems.
  769. Initially, the item tree is selected based on current indentation.
  770. When these commands are executed several times in direct succession,
  771. the initially selected region is used, even if the new indentation
  772. would imply a different hierarchy. To use the new hierarchy, break
  773. the command chain with a cursor motion or so.
  774. @kindex C-c C-c
  775. @item C-c C-c
  776. If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the
  777. state of the checkbox. Otherwise, if this is an ordered list, renumber
  778. the ordered list at the cursor.
  779. @end table
  780. @page
  781. @node Checkboxes, , Plain lists, Document structure
  782. @section Checkboxes
  783. @cindex checkboxes
  784. Every item in a plain list (ordered and unordered) can be made a
  785. checkbox by starting it with the string @samp{[ ]}. This feature is
  786. similar to TODO items (@pxref{TODO items}), but more lightweight.
  787. Checkboxes are not included into the global TODO list, so they are often
  788. great to split a task into a number of simple steps. Or you can use
  789. them in a shopping list to select the items you need to buy. To toggle
  790. a checkbox, use @kbd{C-c C-c}, or try Piotr Zielinski's
  791. @file{org-mouse.el}. Here is an example of a checkbox list.
  792. @example
  793. * Avoid stupid mistakes when distributing a new version
  794. - [ ] update also Emacs CVS
  795. - [X] forget to update index.html on the website
  796. - [X] leaving a `(debug)' form in the code
  797. @end example
  798. @noindent The following commands work with checkboxes:
  799. @table @kbd
  800. @kindex C-c C-c
  801. @item C-c C-c
  802. Toggle checkbox at point.
  803. @kindex C-c C-x C-b
  804. @item C-c C-x C-b
  805. Toggle checkbox at point.
  806. @itemize @minus
  807. @item
  808. If there is an active region, toggle the first checkbox in the region
  809. and set all remaining boxes to the same status as the first. If you
  810. want to toggle all boxes in the region independently, use a prefix
  811. argument.
  812. @item
  813. If the cursor is in a headline, toggle checkboxes in the region between
  814. this headline and the next. This does @emph{not} act on the entire
  815. subtree, just the current entry.
  816. @item
  817. If no active region, just toggle the checkbox at point.
  818. @end itemize
  819. @kindex M-S-@key{RET}
  820. @item M-S-@key{RET}
  821. Insert a new item with a checkbox.
  822. This works only if the cursor is already in a plain list item
  823. (@pxref{Plain lists}).
  824. @end table
  825. @node Tables, Hyperlinks, Document structure, Top
  826. @chapter Tables
  827. @cindex tables
  828. @cindex editing tables
  829. Org-mode has a very fast and intuitive table editor built-in.
  830. Spreadsheet-like calculations are supported in connection with the
  831. Emacs @file{calc} package.
  832. @menu
  833. * Built-in table editor:: Simple tables
  834. * Narrow columns:: Stop wasting space in tables
  835. * Table calculations:: Compute a field from other fields
  836. * orgtbl-mode:: The table editor as minor mode
  837. * table.el:: Complex tables
  838. @end menu
  839. @node Built-in table editor, Narrow columns, Tables, Tables
  840. @section The built-in table editor
  841. @cindex table editor, builtin
  842. Org-mode makes it easy to format tables in plain ASCII. Any line with
  843. @samp{|} as the first non-white character is considered part of a
  844. table. @samp{|} is also the column separator. A table might look
  845. like this:
  846. @example
  847. | Name | Phone | Age |
  848. |-------+-------+-----|
  849. | Peter | 1234 | 17 |
  850. | Anna | 4321 | 25 |
  851. @end example
  852. A table is re-aligned automatically each time you press @key{TAB} or
  853. @key{RET} or @kbd{C-c C-c} inside the table. @key{TAB} also moves to
  854. the next field (@key{RET} to the next row) and creates new table rows
  855. at the end of the table or before horizontal lines. The indentation
  856. of the table is set by the first line. Any line starting with
  857. @samp{|-} is considered as a horizontal separator line and will be
  858. expanded on the next re-align to span the whole table width. So, to
  859. create the above table, you would only type
  860. @example
  861. |Name|Phone|Age
  862. |-
  863. @end example
  864. @noindent and then press @key{TAB} to align the table and start filling in
  865. fields.
  866. When typing text into a field, Org-mode treats @key{DEL},
  867. @key{Backspace}, and all character keys in a special way, so that
  868. inserting and deleting avoids shifting other fields. Also, when
  869. typing @emph{immediately after the cursor was moved into a new field
  870. with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
  871. field is automatically made blank. If this behavior is too
  872. unpredictable for you, configure the variables
  873. @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
  874. @table @kbd
  875. @tsubheading{Creation and conversion}
  876. @kindex C-c |
  877. @item C-c |
  878. Convert the active region to table. If every line contains at least one
  879. TAB character, the function assumes that the material is tab separated.
  880. If not, lines are split at whitespace into fields. You can use a prefix
  881. argument to indicate the minimum number of consecutive spaces required
  882. to identify a field separator (default: just one).@*
  883. If there is no active region, this command creates an empty Org-mode
  884. table. But it's easier just to start typing, like
  885. @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
  886. @tsubheading{Re-aligning and field motion}
  887. @kindex C-c C-c
  888. @item C-c C-c
  889. Re-align the table without moving the cursor.
  890. @kindex @key{TAB}
  891. @item @key{TAB}
  892. Re-align the table, move to the next field. Creates a new row if
  893. necessary.
  894. @kindex S-@key{TAB}
  895. @item S-@key{TAB}
  896. Re-align, move to previous field.
  897. @kindex @key{RET}
  898. @item @key{RET}
  899. Re-align the table and move down to next row. Creates a new row if
  900. necessary. At the beginning or end of a line, @key{RET} still does
  901. NEWLINE, so it can be used to split a table.
  902. @tsubheading{Column and row editing}
  903. @kindex M-@key{left}
  904. @kindex M-@key{right}
  905. @item M-@key{left}
  906. @itemx M-@key{right}
  907. Move the current column left/right.
  908. @kindex M-S-@key{left}
  909. @item M-S-@key{left}
  910. Kill the current column.
  911. @kindex M-S-@key{right}
  912. @item M-S-@key{right}
  913. Insert a new column to the left of the cursor position.
  914. @kindex M-@key{up}
  915. @kindex M-@key{down}
  916. @item M-@key{up}
  917. @itemx M-@key{down}
  918. Move the current row up/down.
  919. @kindex M-S-@key{up}
  920. @item M-S-@key{up}
  921. Kill the current row or horizontal line.
  922. @kindex M-S-@key{down}
  923. @item M-S-@key{down}
  924. Insert a new row above (with arg: below) the current row.
  925. @kindex C-c -
  926. @item C-c -
  927. Insert a horizontal line below current row. With prefix arg, the line
  928. is created above the current line.
  929. @kindex C-c ^
  930. @item C-c ^
  931. Sort the table lines in the region. Point and mark must be in the first
  932. and last line to be included, and must be in the column that should be
  933. used for sorting. The command prompts for numerical versus
  934. alphanumerical sorting.
  935. @tsubheading{Regions}
  936. @kindex C-c C-x M-w
  937. @item C-c C-x M-w
  938. Copy a rectangular region from a table to a special clipboard. Point
  939. and mark determine edge fields of the rectangle. The process ignores
  940. horizontal separator lines.
  941. @kindex C-c C-x C-w
  942. @item C-c C-x C-w
  943. Copy a rectangular region from a table to a special clipboard, and
  944. blank all fields in the rectangle. So this is the ``cut'' operation.
  945. @kindex C-c C-x C-y
  946. @item C-c C-x C-y
  947. Paste a rectangular region into a table.
  948. The upper right corner ends up in the current field. All involved fields
  949. will be overwritten. If the rectangle does not fit into the present table,
  950. the table is enlarged as needed. The process ignores horizontal separator
  951. lines.
  952. @kindex C-c C-q
  953. @item C-c C-q
  954. Wrap several fields in a column like a paragraph. If there is an active
  955. region, and both point and mark are in the same column, the text in the
  956. column is wrapped to minimum width for the given number of lines. A
  957. prefix ARG may be used to change the number of desired lines. If there
  958. is no region, the current field is split at the cursor position and the
  959. text fragment to the right of the cursor is prepended to the field one
  960. line down. If there is no region, but you specify a prefix ARG, the
  961. current field is made blank, and the content is appended to the field
  962. above.
  963. @tsubheading{Calculations}
  964. @cindex formula, in tables
  965. @cindex calculations, in tables
  966. @kindex C-c =
  967. @item C-c =
  968. Install a new formula for the current column and replace current field
  969. with the result of the formula.
  970. @kindex C-u C-c =
  971. @item C-u C-c =
  972. Install a new formula for the current field, which must be a named
  973. field. Evaluate the formula and replace the field content with the
  974. result.
  975. @kindex C-c '
  976. @item C-c '
  977. Edit all formulas associated with the current table in a separate
  978. buffer.
  979. @kindex C-c *
  980. @item C-c *
  981. Recalculate the current row by applying the stored formulas from left
  982. to right. When called with a @kbd{C-u} prefix, recalculate the
  983. entire table, starting with the first non-header line (i.e. below the
  984. first horizontal separator line). For details, see @ref{Table calculations}.
  985. @kindex C-#
  986. @item C-#
  987. Rotate the calculation mark in first column through the states
  988. @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}. For the meaning of
  989. these marks see @ref{Advanced features}. When there is an active
  990. region, change all marks in the region.
  991. @kindex C-c ?
  992. @item C-c ?
  993. Which table column is the cursor in? Displays number >0 in echo
  994. area.
  995. @cindex region, active
  996. @cindex active region
  997. @cindex transient-mark-mode
  998. @kindex C-c +
  999. @item C-c +
  1000. Sum the numbers in the current column, or in the rectangle defined by
  1001. the active region. The result is shown in the echo area and can
  1002. be inserted with @kbd{C-y}.
  1003. @kindex S-@key{RET}
  1004. @item S-@key{RET}
  1005. When current field is empty, copy from first non-empty field above.
  1006. When not empty, copy current field down to next row and move cursor
  1007. along with it. Depending on the variable
  1008. @code{org-table-copy-increment}, integer field values will be
  1009. incremented during copy. This key is also used by CUA-mode
  1010. (@pxref{Cooperation}).
  1011. @tsubheading{Miscellaneous}
  1012. @kindex C-c `
  1013. @item C-c `
  1014. Edit the current field in a separate window. This is useful for fields
  1015. that are not fully visible (@pxref{Narrow columns}). When called with a
  1016. @kbd{C-u} prefix, just make the full field visible, so that it can be
  1017. edited in place.
  1018. @kindex C-c @key{TAB}
  1019. @item C-c @key{TAB}
  1020. This is an alias for @kbd{C-u C-c `} to make the current field fully
  1021. visible.
  1022. @item M-x org-table-import
  1023. Import a file as a table. The table should be TAB- or whitespace
  1024. separated. Useful, for example, to import an Excel table or data from a
  1025. database, because these programs generally can write TAB-separated text
  1026. files. This command works by inserting the file into the buffer and
  1027. then converting the region to a table. Any prefix argument is passed on
  1028. to the converter, which uses it to determine the separator.
  1029. @item M-x org-table-export
  1030. Export the table as a TAB-separated file. Useful for data exchange with,
  1031. for example, Excel or database programs.
  1032. @end table
  1033. If you don't like the automatic table editor because it gets in your
  1034. way on lines which you would like to start with @samp{|}, you can turn
  1035. it off with
  1036. @lisp
  1037. (setq org-enable-table-editor nil)
  1038. @end lisp
  1039. @noindent Then the only table command that still works is
  1040. @kbd{C-c C-c} to do a manual re-align.
  1041. @node Narrow columns, Table calculations, Built-in table editor, Tables
  1042. @section Narrow columns
  1043. @cindex narrow columns in tables
  1044. The width of columns is automatically determined by the table editor.
  1045. Sometimes a single field or a few fields need to carry more text,
  1046. leading to inconveniently wide columns. To limit@footnote{This feature
  1047. does not work on XEmacs.} the width of a column, one field anywhere in
  1048. the column may contain just the string @samp{<N>} where @samp{N} is an
  1049. integer specifying the width of the column in characters. The next
  1050. re-align will then set the width of this column to no more than this
  1051. value.
  1052. @example
  1053. |---+------------------------------| |---+--------|
  1054. | | | | | <6> |
  1055. | 1 | one | | 1 | one |
  1056. | 2 | two | ----\ | 2 | two |
  1057. | 3 | This is a long chunk of text | ----/ | 3 | This=> |
  1058. | 4 | four | | 4 | four |
  1059. |---+------------------------------| |---+--------|
  1060. @end example
  1061. @noindent
  1062. Fields that are wider become clipped and end in the string @samp{=>}.
  1063. Note that the full text is still in the buffer, it is only invisible.
  1064. To see the full text, hold the mouse over the field - a tooltip window
  1065. will show the full content. To edit such a field, use the command
  1066. @kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will
  1067. open a new window with the full field. Edit it and finish with @kbd{C-c
  1068. C-c}.
  1069. When visiting a file containing a table with narrowed columns, the
  1070. necessary character hiding has not yet happened, and the table needs to
  1071. be aligned before it looks nice. Setting the option
  1072. @code{org-startup-align-all-tables} will realign all tables in a file
  1073. upon visiting, but also slow down startup. You can also set this option
  1074. on a per-file basis with:
  1075. @example
  1076. #+STARTUP: align
  1077. #+STARTUP: noalign
  1078. @end example
  1079. @node Table calculations, orgtbl-mode, Narrow columns, Tables
  1080. @section Calculations in tables
  1081. @cindex calculations, in tables
  1082. @cindex spreadsheet capabilities
  1083. @cindex @file{calc} package
  1084. The table editor makes use of the Emacs @file{calc} package to implement
  1085. spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to
  1086. derive fields from other fields. Org-mode has two levels of complexity
  1087. for table calculations. On the basic level, tables do only horizontal
  1088. computations, so a field can be computed from other fields @emph{in the
  1089. same row}, and Org-mode assumes that there is only one formula for each
  1090. column. This is very efficient to work with and enough for many tasks.
  1091. On the complex level, columns and individual fields can be named for
  1092. easier referencing in formulas, individual named fields can have their
  1093. own formula associated with them, and recalculation can be automated.
  1094. @menu
  1095. * Formula syntax:: How to write a formula
  1096. * Lisp formulas:: An alternative way to write formulas
  1097. * Column formulas:: Formulas valid for all fields in a column
  1098. * Advanced features:: Field names, parameters and automatic recalc
  1099. * Named-field formulas:: Formulas valid in single fields
  1100. * Editing/debugging formulas:: Changing a stored formula
  1101. * Appetizer:: Taste the power of calc
  1102. @end menu
  1103. @node Formula syntax, Lisp formulas, Table calculations, Table calculations
  1104. @subsection Formula syntax
  1105. @cindex formula syntax
  1106. @cindex syntax, of formulas
  1107. A formula can be any algebraic expression understood by the Emacs
  1108. @file{calc} package. Note that @file{calc} has the slightly
  1109. non-standard convention that @samp{/} has lower precedence than
  1110. @samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before
  1111. evaluation by @code{calc-eval} (@pxref{Calling Calc from Your
  1112. Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs
  1113. Calc Manual}), variable substitution takes place:
  1114. @example
  1115. $ @r{refers to the current field}
  1116. $3 @r{refers to the field in column 3 of the current row}
  1117. $3..$7 @r{a vector of the fields in columns 3-7 of current row}
  1118. $P1..$P3 @r{vector of column range, using column names}
  1119. &2 @r{second data field above the current, in same column}
  1120. &5-2 @r{vector from fifth to second field above current}
  1121. &III-II @r{vector of fields between 2nd and 3rd hline above}
  1122. &III @r{vector of fields between third hline above and current field}
  1123. $name @r{a named field, parameter or constant}
  1124. @end example
  1125. @cindex vectors, in table calculations
  1126. The range vectors can be directly fed into the calc vector functions
  1127. like @samp{vmean} and @samp{vsum}.
  1128. @cindex name, of column or field
  1129. @cindex constants, in calculations
  1130. @samp{$name} is interpreted as the name of a column, parameter or
  1131. constant. Constants are defined globally through the variable
  1132. @code{org-table-formula-constants}. If you have the
  1133. @file{constants.el} package, it will also be used to resolve
  1134. constants, including natural constants like @samp{$h} for Planck's
  1135. constant, and units like @samp{$km} for kilometers. Column names and
  1136. parameters can be specified in special table lines. These are
  1137. described below, see @ref{Advanced features}.
  1138. @cindex format specifier
  1139. @cindex mode, for @file{calc}
  1140. A formula can contain an optional mode string after a semicolon. This
  1141. string consists of flags to influence calc's modes@footnote{By
  1142. default, Org-mode uses the standard calc modes (precision 12, angular
  1143. units degrees, fraction and symbolic modes off). The display format,
  1144. however, has been changed to @code{(float 5)} to keep tables compact.
  1145. The default settings can be configured using the variable
  1146. @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to
  1147. switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
  1148. @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
  1149. or fixed display format, respectively, and @samp{D}, @samp{R}, @samp{F},
  1150. and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
  1151. respectively. In addition, you may provide a @code{printf} format
  1152. specifier to reformat the final result. A few examples:
  1153. @example
  1154. $1+$2 @r{Sum of first and second field}
  1155. $1+$2;%.2f @r{Same, format result to two decimals}
  1156. exp($2)+exp($1) @r{Math functions can be used}
  1157. $;%.1f @r{Reformat current cell to 1 decimal}
  1158. ($3-32)*5/9 @r{Degrees F -> C conversion}
  1159. $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}}
  1160. tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1}
  1161. sin($1);Dp3%.1e @r{Same, but use printf specifier for display}
  1162. vmean($2..$7) @r{Compute column range mean, using vector function}
  1163. vsum(&III) @r{Sum numbers from 3rd hline above, up to here}
  1164. taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree}
  1165. @end example
  1166. @node Lisp formulas, Column formulas, Formula syntax, Table calculations
  1167. @subsection Emacs Lisp forms as formulas
  1168. @cindex Lisp forms, as table formulas
  1169. It is also possible to write a formula in Emacs lisp; this can be useful
  1170. for string manipulation and control structures. If a formula starts
  1171. with a single quote followed by an opening parenthesis, then it is
  1172. evaluated as a lisp form. The evaluation should return either a string
  1173. or a number. Just as with @file{calc} formulas, you can provide a
  1174. format specifier after a semicolon. A few examples:
  1175. @example
  1176. @r{swap the first two characters of the content of column 1}
  1177. '(concat (substring "$1" 1 2) (substring "$1" 0 1) (substring "$1" 2))
  1178. @r{Add columns 1 and 2, equivalent to the calc's @code{$1+$2}}
  1179. '(+ $1 $2)
  1180. @end example
  1181. @node Column formulas, Advanced features, Lisp formulas, Table calculations
  1182. @subsection Column formulas
  1183. @cindex column formula
  1184. @cindex formula, for table column
  1185. To apply a formula to a field, type it directly into the field,
  1186. preceded by an equal sign, like @samp{=$1+$2}. When you press
  1187. @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
  1188. field, the formula will be stored as the formula for the current
  1189. column, evaluated and the current field replaced with the result. If
  1190. the field contains only @samp{=}, the previously stored formula for
  1191. this column is used.
  1192. For each column, Org-mode will remember the most recently used
  1193. formula. The information is stored in a special line starting with
  1194. @samp{#+TBLFM} directly below the table. When adding/deleting/moving
  1195. columns with the appropriate commands, the stored equations will be
  1196. modified accordingly. When a column used in a calculation is removed,
  1197. references to this column become invalid and will cause an error upon
  1198. applying the equation.
  1199. Instead of typing an equation into the field, you may also use the
  1200. command @kbd{C-c =}. It prompts for a formula (with default taken
  1201. from the @samp{#+TBLFM:} line) and applies it to the current field. A
  1202. numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
  1203. consecutive fields in the current column.
  1204. @cindex recomputing table fields
  1205. To recompute all the fields in a line, use the command @kbd{C-c *}.
  1206. It re-applies all stored equations to the current row, from left to
  1207. right. With a @kbd{C-u} prefix, this will be done to every line in
  1208. the table, so use this command it you want to make sure the entire
  1209. table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
  1210. entire table. Global updating does not touch the line(s) above the
  1211. first horizontal separator line, assuming that this is the table
  1212. header.
  1213. @node Advanced features, Named-field formulas, Column formulas, Table calculations
  1214. @subsection Advanced features
  1215. If you want the recalculation of fields to happen automatically,
  1216. or if you want to be able to assign a formula to an individual field
  1217. (instead of an entire column) you need to reserve the first column of
  1218. the table for special marking characters. Here is an example of a
  1219. table that collects exam results of students and makes use of these
  1220. features:
  1221. @example
  1222. @group
  1223. |---+---------+--------+--------+--------+-------+------|
  1224. | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
  1225. |---+---------+--------+--------+--------+-------+------|
  1226. | ! | | P1 | P2 | P3 | Tot | |
  1227. | # | Maximum | 10 | 15 | 25 | 50 | 10.0 |
  1228. | ^ | | m1 | m2 | m3 | mt | |
  1229. |---+---------+--------+--------+--------+-------+------|
  1230. | # | Peter | 10 | 8 | 23 | 41 | 8.2 |
  1231. | # | Sara | 6 | 14 | 19 | 39 | 7.8 |
  1232. | # | Sam | 2 | 4 | 3 | 9 | 1.8 |
  1233. |---+---------+--------+--------+--------+-------+------|
  1234. | | Average | | | | 29.7 | |
  1235. | ^ | | | | | at | |
  1236. | $ | max=50 | | | | | |
  1237. |---+---------+--------+--------+--------+-------+------|
  1238. #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
  1239. @end group
  1240. @end example
  1241. @noindent @b{Important}: Please note that for these special tables,
  1242. recalculating the table with @kbd{C-u C-c *} will only affect rows
  1243. that are marked @samp{#} or @samp{*}, and named fields. The column
  1244. formulas are not applied in rows with empty first field.
  1245. @cindex marking characters, tables
  1246. The marking characters have the following meaning:
  1247. @table @samp
  1248. @item !
  1249. The fields in this line define names for the columns, so that you may
  1250. refer to a column as @samp{$Tot} instead of @samp{$6}.
  1251. @item ^
  1252. This row defines names for the fields @emph{above} the row. With such
  1253. a definition, any formula in the table may use @samp{$m1} to refer to
  1254. the value @samp{10}. Also, named fields can have their own formula
  1255. associated with them.
  1256. @item _
  1257. Similar to @samp{^}, but defines names for the fields in the row
  1258. @emph{below}.
  1259. @item $
  1260. Fields in this row can define @emph{parameters} for formulas. For
  1261. example, if a field in a @samp{$} row contains @samp{max=50}, then
  1262. formulas in this table can refer to the value 50 using @samp{$max}.
  1263. Parameters work exactly like constants, only that they can be defined on
  1264. a per-table basis. Changing a parameter and then recalculating the
  1265. table can be useful.
  1266. @item #
  1267. Fields in this row are automatically recalculated when pressing
  1268. @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row
  1269. is selected for a global recalculation with @kbd{C-u C-c *}. Unmarked
  1270. lines will be left alone by this command.
  1271. @item *
  1272. Selects this line for global recalculation with @kbd{C-u C-c *}, but
  1273. not for automatic recalculation. Use this when automatic
  1274. recalculation slows down editing too much.
  1275. @item
  1276. Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}.
  1277. All lines that should be recalculated should be marked with @samp{#}
  1278. or @samp{*}.
  1279. @end table
  1280. @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
  1281. @subsection Named-field formulas
  1282. @cindex named field formula
  1283. @cindex formula, for named table field
  1284. A named field can have its own formula associated with it. In the
  1285. example above, this is used for the @samp{at} field that contains
  1286. the average result of the students. To enter a formula for a named
  1287. field, just type it into the buffer, preceded by @samp{:=}. Or use
  1288. @kbd{C-u C-c =}. This equation will be stored below the table like
  1289. @samp{$name=...}. Any recalculation in the table (even if only
  1290. requested for the current line) will also update all named field
  1291. formulas.
  1292. @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
  1293. @subsection Editing and debugging formulas
  1294. @cindex formula editing
  1295. @cindex editing, of table formulas
  1296. To edit a column or field formula, use the commands @kbd{C-c
  1297. =} and @kbd{C-u C-c =}, respectively. The currently active expression
  1298. is then presented as default in the minibuffer, where it may be edited.
  1299. Note that making a table field blank does not remove the formula
  1300. associated with the field - during the next recalculation the field
  1301. will be filled again. To remove a formula from a field, you have to
  1302. give an empty reply when prompted for the formula, or to edit the
  1303. @samp{#+TBLFM} line.
  1304. @kindex C-c C-c
  1305. You may edit the @samp{#+TBLFM} directly and re-apply
  1306. the changed equations with @kbd{C-c C-c} in that line, or with the
  1307. normal recalculation commands in the table.
  1308. @kindex C-c '
  1309. @kindex C-c C-c
  1310. @kindex C-c C-q
  1311. @kindex C-c ?
  1312. In particular for large tables with many formulas, it is convenient to
  1313. use the command @kbd{C-c '} to edit the formulas of the current table
  1314. in a separate buffer. That buffer will show the formulas one per
  1315. line, and you are free to edit, add and remove formulas. Press
  1316. @kbd{C-c ?} on a @samp{$...} expression to get information about its
  1317. interpretation. Exiting the buffer with @kbd{C-c C-c} only stores the
  1318. modified formulas below the table. Exiting with @kbd{C-u C-c C-c}
  1319. also applies them to the entire table. @kbd{C-c C-q} exits without
  1320. installing the changes.
  1321. When the evaluation of a formula leads to an error, the field content
  1322. becomes the string @samp{#ERROR}. If you would like see what is going
  1323. on during variable substitution and calculation in order to find a
  1324. bug, turn on formula debugging in the menu and repeat the calculation,
  1325. for example by pressing @kbd{C-c = @key{RET}} in a field.
  1326. Detailed information will be displayed.
  1327. @node Appetizer, , Editing/debugging formulas, Table calculations
  1328. @subsection Appetizer
  1329. Finally, just to whet your appetite on what can be done with the fantastic
  1330. @file{calc} package, here is a table that computes the Taylor series
  1331. for a couple of functions (homework: try that with Excel :-)
  1332. @example
  1333. @group
  1334. |---+-------------+---+-----+--------------------------------------|
  1335. | | Func | n | x | Result |
  1336. |---+-------------+---+-----+--------------------------------------|
  1337. | # | exp(x) | 1 | x | 1 + x |
  1338. | # | exp(x) | 2 | x | 1 + x + x^2 / 2 |
  1339. | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 |
  1340. | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
  1341. | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 |
  1342. | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 |
  1343. |---+-------------+---+-----+--------------------------------------|
  1344. #+TBLFM: $5=taylor($2,$4,$3);n3
  1345. @end group
  1346. @end example
  1347. @node orgtbl-mode, table.el, Table calculations, Tables
  1348. @section The Orgtbl minor mode
  1349. @cindex orgtbl-mode
  1350. @cindex minor mode for tables
  1351. If you like the intuitive way the Org-mode table editor works, you
  1352. might also want to use it in other modes like text-mode or mail-mode.
  1353. The minor mode Orgtbl-mode makes this possible. You can always toggle
  1354. the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
  1355. example in mail mode, use
  1356. @lisp
  1357. (add-hook 'mail-mode-hook 'turn-on-orgtbl)
  1358. @end lisp
  1359. @node table.el, , orgtbl-mode, Tables
  1360. @section The @file{table.el} package
  1361. @kindex C-c C-c
  1362. @cindex table editor, @file{table.el}
  1363. @cindex @file{table.el}
  1364. Complex ASCII tables with automatic line wrapping, column- and
  1365. row-spanning, and alignment can be created using the Emacs table
  1366. package by Takaaki Ota (@uref{http://sourceforge.net/projects/table},
  1367. and also part of Emacs 22).
  1368. When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
  1369. will call @command{table-recognize-table} and move the cursor into the
  1370. table. Inside a table, the keymap of Org-mode is inactive. In order
  1371. to execute Org-mode-related commands, leave the table.
  1372. @table @kbd
  1373. @kindex C-c C-c
  1374. @item C-c C-c
  1375. Recognize @file{table.el} table. Works when the cursor is in a
  1376. table.el table.
  1377. @kindex C-c ~
  1378. @item C-c ~
  1379. Insert a table.el table. If there is already a table at point, this
  1380. command converts it between the table.el format and the Org-mode
  1381. format. See the documentation string of the command
  1382. @code{org-convert-table} for the restrictions under which this is
  1383. possible.
  1384. @end table
  1385. @node Hyperlinks, TODO items, Tables, Top
  1386. @chapter Hyperlinks
  1387. @cindex hyperlinks
  1388. Just like HTML, Org-mode provides links inside a file, and external
  1389. links to other files, Usenet articles, emails, and much more.
  1390. @menu
  1391. * Link format:: How links in Org-mode are formatted
  1392. * Internal links:: Links to other places in the current file
  1393. * External links:: URL-like links to the world
  1394. * Handling links:: Creating, inserting and following
  1395. * Search options:: Linking to a specific location
  1396. * Custom searches:: When the default search is not enough
  1397. * Remember:: Org-trees store quick notes
  1398. @end menu
  1399. @node Link format, Internal links, Hyperlinks, Hyperlinks
  1400. @section Link format
  1401. @cindex link format
  1402. @cindex format, of links
  1403. Org-mode will recognize plain URL-like links and activate them as
  1404. clickable links. The general link format, however, looks like this:
  1405. @example
  1406. [[link][description]] @r{or alternatively} [[link]]
  1407. @end example
  1408. Once a link in the buffer is complete (all brackets present), Org-mode
  1409. will change the display so that @samp{description} is displayed instead
  1410. of @samp{[[link][description]]} and @samp{link} is displayed instead of
  1411. @samp{[[link]]}. Links will be highlighted in the face @code{org-link},
  1412. which by default is an underlined face. You can directly edit the
  1413. visible part of a link. Note that this can be either the @samp{link}
  1414. part (if there is no description) or the @samp{description} part. To
  1415. edit also the invisible @samp{link} part, use @kbd{C-c C-l} with the
  1416. cursor on the link.
  1417. If you place the cursor at the beginning or just behind the end of the
  1418. displayed text and press @key{BACKSPACE}, you will remove the
  1419. (invisible) bracket at that location. This makes the link incomplete
  1420. and the internals are again displayed as plain text. Inserting the
  1421. missing bracket hides the link internals again. To show the
  1422. internal structure of all links, use the menu entry
  1423. @code{Org->Hyperlinks->Literal links}.
  1424. @node Internal links, External links, Link format, Hyperlinks
  1425. @section Internal links
  1426. @cindex internal links
  1427. @cindex links, internal
  1428. @cindex CamelCase links
  1429. If the link does not look like a URL, it is considered to be internal in
  1430. the current file. Links such as @samp{[[My Target]]} or @samp{[[My
  1431. Target][Find my target]]} lead to a text search in the current file.
  1432. The link can be followed with @kbd{C-c C-o} when the cursor is on the
  1433. link, or with a mouse click (@pxref{Handling links}). The preferred
  1434. match for such a link is a dedicated target: the same string in double
  1435. angular brackets. Targets may be located anywhere; often it is
  1436. convenient to put them into a comment line. For example
  1437. @example
  1438. # <<My Target>>
  1439. @end example
  1440. @noindent In HTML export (@pxref{HTML export}), such targets will become
  1441. named anchors for direct access through @samp{http} links@footnote{Note
  1442. that text before the first headline will never be exported, so the first
  1443. such target must be after the first headline.}.
  1444. If no dedicated target exists, Org-mode will search for the words in the
  1445. link. In the above example the search would be for @samp{my target}.
  1446. Links starting with a star like @samp{*My Target} restrict the search to
  1447. headlines. When searching, Org-mode will first try an exact match, but
  1448. then move on to more and more lenient searches. For example, the link
  1449. @samp{[[*My Targets]]} will find any of the following:
  1450. @example
  1451. ** My targets
  1452. ** TODO my targets are bright
  1453. ** my 20 targets are
  1454. @end example
  1455. To insert a link targeting a headline, in-buffer completion can be used.
  1456. Just type a star followed by a few optional letters into the buffer and
  1457. press @kbd{M-@key{TAB}}. All headlines in the current buffer will be
  1458. offered as completions. @xref{Handling links}, for more commands
  1459. creating links.
  1460. Following a link pushes a mark onto Org-mode's own mark ring. You can
  1461. return to the previous position with @kbd{C-c &}. Using this command
  1462. several times in direct succession goes back to positions recorded
  1463. earlier.
  1464. @menu
  1465. * Radio targets:: Make targets trigger links in plain text.
  1466. * CamelCase links:: Activating CamelCase words as links
  1467. @end menu
  1468. @node Radio targets, CamelCase links, Internal links, Internal links
  1469. @subsection Radio targets
  1470. You can configure Org-mode to link any occurrences of certain target
  1471. names in normal text. So without explicitly creating a link, the text
  1472. connects to the target radioing its position. Radio targets are
  1473. enclosed by triple angular brackets. For example, a target
  1474. @samp{<<<My Target>>>} causes each occurrence of @samp{my target} in
  1475. normal text to become activated as a link. The Org-mode file is
  1476. scanned automatically for radio targets only when the file is first
  1477. loaded into Emacs. To update the target list during editing, press
  1478. @kbd{C-c C-c} with the cursor on or at a target.
  1479. @node CamelCase links, , Radio targets, Internal links
  1480. @subsection CamelCase words as links
  1481. @cindex completion, of CamelCase links
  1482. @cindex CamelCase links, completion of
  1483. Org-mode also supports CamelCase words as links. This feature is not
  1484. turned on by default because of the inconsistencies this system suffers
  1485. from. To activate CamelCase words as links, you need to customize
  1486. the option @code{org-activate-links}. A CamelCase word then leads to a
  1487. text search such that @samp{CamelCaseLink} is equivalent to
  1488. @samp{[[camel case link]]}.
  1489. @node External links, Handling links, Internal links, Hyperlinks
  1490. @section External links
  1491. @cindex links, external
  1492. @cindex external links
  1493. @cindex links, external
  1494. @cindex GNUS links
  1495. @cindex BBDB links
  1496. @cindex URL links
  1497. @cindex file links
  1498. @cindex VM links
  1499. @cindex RMAIL links
  1500. @cindex WANDERLUST links
  1501. @cindex MH-E links
  1502. @cindex USENET links
  1503. @cindex SHELL links
  1504. @cindex Info links
  1505. @cindex elisp links
  1506. Org-mode supports links to files, websites, Usenet and email messages,
  1507. and BBDB database entries. External links are URL-like locators. They
  1508. start with a short identifying string followed by a colon. There can be
  1509. no space after the colon. The following list shows examples for each
  1510. link type.
  1511. @example
  1512. http://www.astro.uva.nl/~dominik @r{on the web}
  1513. file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
  1514. file:papers/last.pdf @r{file, relative path}
  1515. news:comp.emacs @r{Usenet link}
  1516. mailto:adent@@galaxy.net @r{Mail link}
  1517. vm:folder @r{VM folder link}
  1518. vm:folder#id @r{VM message link}
  1519. vm://myself@@some.where.org/folder#id @r{VM on remote machine}
  1520. wl:folder @r{WANDERLUST folder link}
  1521. wl:folder#id @r{WANDERLUST message link}
  1522. mhe:folder @r{MH-E folder link}
  1523. mhe:folder#id @r{MH-E message link}
  1524. rmail:folder @r{RMAIL folder link}
  1525. rmail:folder#id @r{RMAIL message link}
  1526. gnus:group @r{GNUS group link}
  1527. gnus:group#id @r{GNUS article link}
  1528. bbdb:Richard Stallman @r{BBDB link}
  1529. shell:ls *.org @r{A shell command}
  1530. elisp:(find-file-other-frame "Elisp.org") @r{An elisp form to evaluate}
  1531. @end example
  1532. A link should be enclosed in double brackets and may contain a
  1533. descriptive text to be displayed instead of the url (@pxref{Link
  1534. format}), for example:
  1535. @example
  1536. [[http://www.gnu.org/software/emacs/][GNU Emacs]]
  1537. @end example
  1538. @cindex angular brackets, around links
  1539. @cindex plain text external links
  1540. Org-mode also finds external links in the normal text and activates them
  1541. as links. If spaces must be part of the link (for example in
  1542. @samp{bbdb:Richard Stallman}), or you need to remove ambiguities about the end of
  1543. the link, enclose them in angular brackets.
  1544. @node Handling links, Search options, External links, Hyperlinks
  1545. @section Handling links
  1546. Org-mode provides methods to create a link in the correct syntax, to
  1547. insert it into an org-mode file, and to follow the link.
  1548. @table @kbd
  1549. @kindex C-c l
  1550. @cindex storing links
  1551. @item C-c l
  1552. Store a link to the current location. This is a @emph{global} command
  1553. which can be used in any buffer to create a link. The link will be
  1554. stored for later insertion into an Org-mode buffer (see below). For
  1555. Org-mode files, if there is a @samp{<<target>>} at the cursor, the link
  1556. points to the target. Otherwise it points to the current headline. For
  1557. VM, RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will
  1558. indicate the current article/entry. For W3 and W3M buffers, the link
  1559. goes to the current URL. For any other files, the link will point to
  1560. the file, with a search string (@pxref{Search options}) pointing to the
  1561. contents of the current line. If there is an active region, the
  1562. selected words will form the basis of the search string. If the
  1563. automatically created link is not working correctly or accurately
  1564. enough, you can write custom functions to select the search string and
  1565. to do the search for particular file types - see @ref{Custom searches}.
  1566. The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation}.
  1567. @kindex C-c C-l
  1568. @cindex link completion
  1569. @cindex completion, of links
  1570. @cindex inserting links
  1571. @item C-c C-l
  1572. Insert a link. This prompts for a link to be inserted into the buffer.
  1573. You can just type a link, using text for an internal link, or one of the
  1574. link type prefixes mentioned in the examples above. Through completion,
  1575. all links stored during the current session can be
  1576. accessed@footnote{After insertion of a stored link, the link will be
  1577. removed from the list of stored links. To keep it in the list later
  1578. use, use a triple @kbd{C-u} prefix to @kbd{C-c C-l}, or configure the
  1579. option @code{org-keep-stored-link-after-insertion}.}. The link
  1580. will be inserted into the buffer, along with a descriptive text. Note
  1581. that you don't have to use this command to insert a link. Links in
  1582. Org-mode are plain text, and you can type or paste them straight into
  1583. the buffer. By using this command, the links are automatically enclosed
  1584. in double brackets, and you will be asked for the optional descriptive
  1585. text. If the link is a @samp{file:} link and the linked file is located
  1586. in the same directory as the current file or a subdirectory of it, the
  1587. path of the file will be inserted relative to the current directory.
  1588. @kindex C-u C-c C-l
  1589. @cindex file name completion
  1590. @cindex completion, of file names
  1591. @item C-u C-c C-l
  1592. When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to
  1593. a file will be inserted and you may use file name completion to select
  1594. the name of the file. The path to the file is inserted relative to the
  1595. directory of the current org file, if the linked file is in the current
  1596. directory or in a subdirectory of it, or if the path is written relative
  1597. to the current directory using @samp{../}. Otherwise an absolute path
  1598. is used, if possible with @samp{~/} for your home directory. You can
  1599. force an absolute path with two @kbd{C-u} prefixes.
  1600. @item C-c C-l @r{with cursor on existing link}
  1601. When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the
  1602. link and description parts of the link.
  1603. @cindex following links
  1604. @kindex C-c C-o
  1605. @item C-c C-o
  1606. Open link at point. This will launch a web browser for URLs (using
  1607. @command{browse-url-at-point}), run vm/mh-e/wanderlust/rmail/gnus/bbdb
  1608. for the corresponding links, and execute the command in a shell link.
  1609. When the cursor is on an internal link, this commands runs the
  1610. corresponding search. When the cursor is on a TAG list in a headline,
  1611. it creates the corresponding TAGS view. If the cursor is on a time
  1612. stamp, it compiles the agenda for that date. Furthermore, it will visit
  1613. text and remote files in @samp{file:} links with Emacs and select a
  1614. suitable application for local non-text files. Classification of files
  1615. is based on file extension only. See option @code{org-file-apps}. If
  1616. you want to override the default application and visit the file with
  1617. Emacs, use a @kbd{C-u} prefix.
  1618. @kindex mouse-2
  1619. @kindex mouse-1
  1620. @item mouse-2
  1621. @itemx mouse-1
  1622. On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o}
  1623. would. Under Emacs 22, also @kbd{mouse-1} will follow a link.
  1624. @kindex mouse-3
  1625. @item mouse-3
  1626. Like @kbd{mouse-2}, but force file links to be opened with Emacs.
  1627. @cindex mark ring
  1628. @kindex C-c %
  1629. @item C-c %
  1630. Push the current position onto the mark ring, to be able to return
  1631. easily. Commands following an internal link do this automatically.
  1632. @cindex links, returning to
  1633. @kindex C-c &
  1634. @item C-c &
  1635. Jump back to a recorded position. A position is recorded by the
  1636. commands following internal links, and by @kbd{C-c %}. Using this
  1637. command several times in direct succession moves through a ring of
  1638. previously recorded positions.
  1639. @end table
  1640. @node Search options, Custom searches, Handling links, Hyperlinks
  1641. @section Search options in file links
  1642. @cindex search option in file links
  1643. @cindex file links, searching
  1644. File links can contain additional information to make Emacs jump to a
  1645. particular location in the file when following a link. This can be a
  1646. line number or a search option after a double@footnote{For backward
  1647. compatibility, line numbers can also follow a single colon.} colon. For
  1648. example, when the command @kbd{C-c l} creates a link (@pxref{Handling
  1649. links}) to a file, it encodes the words in the current line as a search
  1650. string that can be used to find this line back later when following the
  1651. link with @kbd{C-c C-o}.
  1652. Here is the syntax of the different ways to attach a search to a file
  1653. link, together with an explanation:
  1654. @example
  1655. [[file:~/code/main.c::255]]
  1656. [[file:~/xx.org::My Target]]
  1657. [[file:~/xx.org::*My Target]]
  1658. [[file:~/xx.org::/regexp/]]
  1659. @end example
  1660. @table @code
  1661. @item 255
  1662. Jump to line 255.
  1663. @item My Target
  1664. Search for a link target @samp{<<My Target>>}, or do a text search for
  1665. @samp{my target}, similar to the search in internal links, see
  1666. @ref{Internal links}. In HTML export (@pxref{HTML export}), such a file
  1667. link will become an HTML reference to the corresponding named anchor in
  1668. the linked file.
  1669. @item *My Target
  1670. In an Org-mode file, restrict search to headlines.
  1671. @item /regexp/
  1672. Do a regular expression search for @code{regexp}. This uses the Emacs
  1673. command @code{occur} to list all matches in a separate window. If the
  1674. target file is in Org-mode, @code{org-occur} is used to create a
  1675. sparse tree with the matches.
  1676. @c If the target file is a directory,
  1677. @c @code{grep} will be used to search all files in the directory.
  1678. @end table
  1679. As a degenerate case, a file link with an empty file name can be used
  1680. to search the current file. For example, @code{<file:::find me>} does
  1681. a search for @samp{find me} in the current file, just as
  1682. @samp{[[find me]]} would.
  1683. @node Custom searches, Remember, Search options, Hyperlinks
  1684. @section Custom Searches
  1685. @cindex custom search strings
  1686. The default mechanism for creating search strings and for doing the
  1687. actual search related to a file link may not work correctly in all
  1688. cases. For example, BibTeX database files have many entries like
  1689. @samp{year="1993"} which would not result in good search strings,
  1690. because the only unique identification for a BibTeX entry is the
  1691. citation key.
  1692. If you come across such a problem, you can write custom functions to set
  1693. the right search string for a particular file type, and to do the search
  1694. for the string in the file. Using @code{add-hook}, these functions need
  1695. to be added to the hook variables
  1696. @code{org-create-file-search-functions} and
  1697. @code{org-execute-file-search-functions}. See the docstring for these
  1698. variables for more information. Org-mode actually uses this mechanism
  1699. for Bib@TeX{} database files, and you can use the corresponding code as
  1700. an implementation example. Search for @samp{BibTeX links} in the source
  1701. file.
  1702. @node Remember, , Custom searches, Hyperlinks
  1703. @section Remember
  1704. @cindex @file{remember.el}
  1705. Another way to create org entries with links to other files is through
  1706. the @emph{Remember} package by John Wiegley. @emph{Remember} lets you
  1707. store quick notes with little interruption of your work flow. See
  1708. @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
  1709. information. The notes produced by @emph{Remember} can be stored in
  1710. different ways, and Org-mode files are a good target. Org-mode allows
  1711. you to file away notes either to a default file, or directly to the correct
  1712. location in your Org-mode outline tree. The following customization
  1713. will tell @emph{Remember} to use org files as target, and to create
  1714. annotations compatible with Org-mode links.
  1715. @example
  1716. (setq org-directory "~/path/to/my/orgfiles/")
  1717. (setq org-default-notes-file "~/.notes")
  1718. (setq remember-annotation-functions '(org-remember-annotation))
  1719. (setq remember-handler-functions '(org-remember-handler))
  1720. (add-hook 'remember-mode-hook 'org-remember-apply-template)
  1721. @end example
  1722. @cindex templates, for remember
  1723. In combination with Org-mode, you can use templates to generate
  1724. different types of remember notes. For example, if you would like to
  1725. use one template to create general TODO entries, and another one for
  1726. journal entries, you could use:
  1727. @example
  1728. (setq org-remember-templates
  1729. '((?t "* TODO %?\n %i\n %a" "~/org/TODO.org")
  1730. (?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org")))
  1731. @end example
  1732. @noindent In these entries, the character specifies how to select the
  1733. template, the first string specifies the template, and the (optional)
  1734. second string specifies a default file (overruling
  1735. @code{org-default-notes-file}) as a target for this note.
  1736. When you call @kbd{M-x remember} to remember something, org will prompt
  1737. for a key to select the template and then prepare the buffer like
  1738. @example
  1739. * TODO
  1740. <file:link to where you called remember>
  1741. @end example
  1742. @noindent or
  1743. @example
  1744. * [2006-03-21 Tue 15:37]
  1745. <file:link to where you called remember>
  1746. @end example
  1747. @noindent See the variable @code{org-remember-templates} for more details.
  1748. When you are finished composing a note with remember, you have to press
  1749. @kbd{C-c C-c} to file the note away. The handler first prompts for a
  1750. target file - if you press @key{RET}, the value of
  1751. @code{org-default-notes-file} is used. Then the command offers the
  1752. headings tree of the selected file. You can either immediately press
  1753. @key{RET} to get the note appended to the file. Or you can use vertical
  1754. cursor motion (@key{up} and @key{down}) and visibility cycling
  1755. (@key{TAB}) to find a better place. Pressing @key{RET} or @key{left} or
  1756. @key{right} leads to the following result.
  1757. @multitable @columnfractions 0.2 0.1 0.7
  1758. @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
  1759. @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
  1760. @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
  1761. @item @tab @key{left} @tab as same level, before current heading
  1762. @item @tab @key{right} @tab as same level, after current heading
  1763. @item not on headline @tab @key{RET}
  1764. @tab at cursor position, level taken from context.
  1765. Or use prefix arg to specify level manually.
  1766. @end multitable
  1767. So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
  1768. @key{RET}} to append it to the default file. Even shorter would be
  1769. @kbd{C-u C-c C-c}, which does the same without even showing the tree.
  1770. But with little extra effort, you can push it directly to the correct
  1771. location.
  1772. Before inserting the text into a tree, the function ensures that the
  1773. text has a headline, i.e. a first line that starts with a @samp{*}.
  1774. If not, a headline is constructed from the current date and some
  1775. additional data. If the variable @code{org-adapt-indentation} is
  1776. non-nil, the entire text is also indented so that it starts in the
  1777. same column as the headline (after the asterisks).
  1778. @node TODO items, Timestamps, Hyperlinks, Top
  1779. @chapter TODO items
  1780. @cindex TODO items
  1781. Org-mode does not maintain TODO lists as a separate document. TODO
  1782. items are an integral part of the notes file, because TODO items
  1783. usually come up while taking notes! With Org-mode, you simply mark
  1784. any entry in a tree as being a TODO item. In this way, the
  1785. information is not duplicated, and the entire context from which the
  1786. item emerged is always present when you check.
  1787. Of course, this technique causes TODO items to be scattered throughout
  1788. your file. Org-mode provides methods to give you an overview over all
  1789. things you have to do.
  1790. @menu
  1791. * TODO basics:: Marking and displaying TODO entries
  1792. * TODO extensions:: Workflow and assignments
  1793. * Priorities:: Some things are more important than others
  1794. @end menu
  1795. @node TODO basics, TODO extensions, TODO items, TODO items
  1796. @section Basic TODO functionality
  1797. Any headline can become a TODO item by starting it with the word TODO,
  1798. for example:
  1799. @example
  1800. *** TODO Write letter to Sam Fortune
  1801. @end example
  1802. @noindent
  1803. The most important commands to work with TODO entries are:
  1804. @table @kbd
  1805. @kindex C-c C-t
  1806. @cindex cycling, of TODO states
  1807. @item C-c C-t
  1808. Rotate the TODO state of the current item between
  1809. @example
  1810. ,-> (unmarked) -> TODO -> DONE --.
  1811. '--------------------------------'
  1812. @end example
  1813. The same rotation can also be done ``remotely'' from the timeline and
  1814. agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
  1815. @kindex S-@key{right}
  1816. @kindex S-@key{left}
  1817. @item S-@key{right}
  1818. @itemx S-@key{left}
  1819. Select the following/preceding TODO state, similar to cycling. Mostly
  1820. useful if more than two TODO states are possible (@pxref{TODO extensions}).
  1821. @kindex C-c C-v
  1822. @cindex sparse tree, for TODO
  1823. @item C-c C-v
  1824. View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
  1825. the entire buffer, but shows all TODO items and the headings hierarchy
  1826. above them. With prefix arg, show also the DONE entries. With
  1827. numerical prefix N, show the tree for the Nth keyword in the variable
  1828. @code{org-todo-keywords}.
  1829. @kindex C-c a t
  1830. @item C-c a t
  1831. Show the global TODO list. This collects the TODO items from all
  1832. agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
  1833. @code{agenda-mode}, so there are commands to examine and manipulate
  1834. the TODO entries directly from that buffer (@pxref{Agenda commands}).
  1835. @xref{Global TODO list}, for more information.
  1836. @c @item @code{org-agenda-include-all-todo}
  1837. @c If you would like to have all your TODO items listed as part of your
  1838. @c agenda, customize the variable @code{org-agenda-include-all-todo}.
  1839. @end table
  1840. @node TODO extensions, Priorities, TODO basics, TODO items
  1841. @section Extended use of TODO keywords
  1842. @cindex extended TODO keywords
  1843. The default implementation of TODO entries is just two states: TODO and
  1844. DONE. You can, however, use the TODO feature for more complicated
  1845. things by configuring the variables @code{org-todo-keywords} and
  1846. @code{org-todo-interpretation}. Using special setup, you can even use
  1847. TODO keywords in different ways in different org files.
  1848. Note that @i{tags} are another way to classify headlines in general and
  1849. TODO items in particular (@pxref{Tags}).
  1850. @menu
  1851. * Workflow states:: From TODO to DONE in steps
  1852. * TODO types:: I do this, Fred the rest
  1853. * Per file keywords:: Different files, different requirements
  1854. @end menu
  1855. @node Workflow states, TODO types, TODO extensions, TODO extensions
  1856. @subsection TODO keywords as workflow states
  1857. @cindex TODO workflow
  1858. @cindex workflow states as TODO keywords
  1859. You can use TODO keywords to indicate different states in the process
  1860. of working on an item, for example:
  1861. @lisp
  1862. (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
  1863. org-todo-interpretation 'sequence)
  1864. @end lisp
  1865. @cindex completion, of TODO keywords
  1866. Changing these variables only becomes effective in a new Emacs session.
  1867. With this setup, the command @kbd{C-c C-t} will cycle an entry from
  1868. TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
  1869. use a prefix argument to quickly select a specific state. For example
  1870. @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
  1871. If you define many keywords, you can use in-buffer completion (see
  1872. @ref{Completion}) to insert these words into the buffer.
  1873. @node TODO types, Per file keywords, Workflow states, TODO extensions
  1874. @subsection TODO keywords as types
  1875. @cindex TODO types
  1876. @cindex names as TODO keywords
  1877. @cindex types as TODO keywords
  1878. The second possibility is to use TODO keywords to indicate different
  1879. types of action items. For example, you might want to indicate that
  1880. items are for ``work'' or ``home''. If you are into David Allen's
  1881. @emph{Getting Things DONE}, you might want to use todo types
  1882. @samp{NEXTACTION}, @samp{WAITING}, @samp{MAYBE}. Or, when you work
  1883. with several people on a single project, you might want to assign
  1884. action items directly to persons, by using their names as TODO
  1885. keywords. This would be set up like this:
  1886. @lisp
  1887. (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
  1888. org-todo-interpretation 'type)
  1889. @end lisp
  1890. In this case, different keywords do not indicate a sequence, but
  1891. rather different types. So it is normally not useful to change from
  1892. one type to another. Therefore, in this case the behavior of the
  1893. command @kbd{C-c C-t} is changed slightly@footnote{This is also true
  1894. for the @kbd{t} command in the timeline and agenda buffers.}. When
  1895. used several times in succession, it will still cycle through all
  1896. names. But when you return to the item after some time and execute
  1897. @kbd{C-c C-t} again, it will switch from each name directly to DONE.
  1898. Use prefix arguments or completion to quickly select a specific name.
  1899. You can also review the items of a specific TODO type in a sparse tree
  1900. by using a numeric prefix to @kbd{C-c C-v}. For example, to see all
  1901. things Lucy has to do, you would use @kbd{C-3 C-c C-v}. To collect
  1902. Lucy's items from all agenda files into a single buffer, you
  1903. would use the prefix arg as well when creating the global todo list:
  1904. @kbd{C-3 C-c t}.
  1905. @node Per file keywords, , TODO types, TODO extensions
  1906. @subsection Setting up TODO keywords for individual files
  1907. @cindex keyword options
  1908. @cindex per file keywords
  1909. It can be very useful to use different aspects of the TODO mechanism
  1910. in different files, which is not possible with the global settings
  1911. described above. For file-local settings, you need to add special
  1912. lines to the file which set the keywords and interpretation for that
  1913. file only. For example, to set one of the two examples discussed
  1914. above, you need one of the following lines, starting in column zero
  1915. anywhere in the file:
  1916. @example
  1917. #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
  1918. #+TYP_TODO: Fred Sara Lucy Mike DONE
  1919. @end example
  1920. @cindex Completion, of option keywords
  1921. @kindex M-@key{TAB}
  1922. @noindent To make sure you are using the correct keyword, type
  1923. @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
  1924. @cindex DONE, final TODO keyword
  1925. Remember that the last keyword must always mean that the item is DONE
  1926. (although you may use a different word). Also note that in each file,
  1927. only one of the two aspects of TODO keywords can be used. After
  1928. changing one of these lines, use @kbd{C-c C-c} with the cursor still
  1929. in the line to make the changes known to Org-mode@footnote{Org-mode
  1930. parses these lines only when Org-mode is activated after visiting a
  1931. file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
  1932. is simply restarting Org-mode, making sure that these changes will be
  1933. respected.}.
  1934. If you want to use very many keywords, for example when working with a
  1935. large group of people, you may split the names over several lines:
  1936. @example
  1937. #+TYP_TODO: Fred Sara Lucy Mike
  1938. #+TYP_TODO: Luis George Jules Jessica
  1939. #+TYP_TODO: Kim Arnold Peter
  1940. #+TYP_TODO: DONE
  1941. @end example
  1942. @node Priorities, , TODO extensions, TODO items
  1943. @section Priorities
  1944. @cindex priorities
  1945. If you use Org-mode extensively to organize your work, you may end up
  1946. with a number of TODO entries so large that you'd like to prioritize
  1947. them. This can be done by placing a @emph{priority cookie} into the
  1948. headline, like this
  1949. @example
  1950. *** TODO [#A] Write letter to Sam Fortune
  1951. @end example
  1952. @noindent
  1953. With its standard setup, Org-mode supports priorities @samp{A},
  1954. @samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
  1955. without a cookie is treated as priority @samp{B}. Priorities make a
  1956. difference only in the agenda (@pxref{Weekly/Daily agenda}).
  1957. @table @kbd
  1958. @kindex @kbd{C-c ,}
  1959. @item @kbd{C-c ,}
  1960. Set the priority of the current headline. The command prompts for a
  1961. priority character @samp{A}, @samp{B} or @samp{C}. When you press
  1962. @key{SPC} instead, the priority cookie is removed from the headline.
  1963. The priorities can also be changed ``remotely'' from the timeline and
  1964. agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
  1965. @kindex S-@key{up}
  1966. @kindex S-@key{down}
  1967. @item S-@key{up}
  1968. @itemx S-@key{down}
  1969. Increase/decrease priority of current headline. Note that these keys
  1970. are also used to modify time stamps (@pxref{Creating timestamps}).
  1971. Furthermore, these keys are also used by CUA-mode (@pxref{Conflicts}).
  1972. @end table
  1973. @node Timestamps, Tags, TODO items, Top
  1974. @chapter Timestamps
  1975. Items can be labeled with timestamps to make them useful for project
  1976. planning.
  1977. @menu
  1978. * Time stamps:: Assigning a time to a tree entry
  1979. * Creating timestamps:: Commands which insert timestamps
  1980. * Progress logging:: Documenting when what work was done.
  1981. @end menu
  1982. @node Time stamps, Creating timestamps, Timestamps, Timestamps
  1983. @section Time stamps, deadlines and scheduling
  1984. @cindex time stamps
  1985. @cindex ranges, time
  1986. @cindex date stamps
  1987. @cindex deadlines
  1988. @cindex scheduling
  1989. A time stamp is a specification of a date (possibly with time) in a
  1990. special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
  1991. Tue 09:39>}. A time stamp can appear anywhere in the headline or body
  1992. of an org-tree entry. Its presence allows entries to be shown on specific
  1993. dates in the agenda (@pxref{Weekly/Daily agenda}). We distinguish:
  1994. @table @var
  1995. @item Plain time stamp
  1996. @cindex timestamp
  1997. A simple time stamp just assigns a date/time to an item. This is just
  1998. like writing down an appointment in a paper agenda, or like writing down
  1999. an event in a diary, when you want to take note of when something
  2000. happened. In the timeline and agenda displays, the headline of an entry
  2001. associated with a plain time stamp will be shown exactly on that date.
  2002. @item Time stamp range
  2003. @cindex timerange
  2004. Two time stamps connected by @samp{--} denote a time range. The
  2005. headline will be shown on the first and last day of the range, and on
  2006. any dates that are displayed and fall in the range. Here is an
  2007. example:
  2008. @example
  2009. ** Meeting in Amsterdam
  2010. <2004-08-23 Mon>--<2004-08-26 Thu>
  2011. @end example
  2012. @item Time stamp with SCHEDULED keyword
  2013. @cindex SCHEDULED keyword
  2014. If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you
  2015. are planning to start working on that task on the given date. So this is
  2016. not about recording an event, but about planning your work. The
  2017. headline will be listed under the given date. In addition, a reminder
  2018. that the scheduled date has passed will be present in the compilation
  2019. for @emph{today}, until the entry is marked DONE. I.e., the task will
  2020. automatically be forwarded until completed.
  2021. @example
  2022. *** TODO Call Trillian for a date on New Years Eve.
  2023. SCHEDULED: <2004-12-25 Sat>
  2024. @end example
  2025. @item Time stamp with DEADLINE keyword
  2026. @cindex DEADLINE keyword
  2027. If a time stamp is preceded by the word @samp{DEADLINE:}, the task
  2028. (most likely a TODO item) is supposed to be finished on that date, and
  2029. it will be listed then. In addition, the compilation for @emph{today}
  2030. will carry a warning about the approaching or missed deadline,
  2031. starting @code{org-deadline-warning-days} before the due date, and
  2032. continuing until the entry is marked DONE. An example:
  2033. @example
  2034. *** TODO write article about the Earth for the Guide
  2035. The editor in charge is <bbdb:Ford Prefect>
  2036. DEADLINE: <2004-02-29 Sun>
  2037. @end example
  2038. @item Time stamp with CLOSED keyword
  2039. @cindex CLOSED keyword
  2040. When @code{org-log-done} is non-nil, Org-mode will automatically insert
  2041. a special time stamp each time a TODO entry is marked done
  2042. (@pxref{Progress logging}). This time stamp is enclosed in square
  2043. brackets instead of angular brackets.
  2044. @item Time range with CLOCK keyword
  2045. @cindex CLOCK keyword
  2046. When using the clock to time the work that is being done on specific
  2047. items, time ranges preceded by the CLOCK keyword are inserted
  2048. automatically into the file. The time stamps are enclosed in square
  2049. brackets instead of angular brackets. @xref{Clocking work time}.
  2050. @end table
  2051. @node Creating timestamps, Progress logging, Time stamps, Timestamps
  2052. @section Creating timestamps
  2053. @cindex creating timestamps
  2054. @cindex timestamps, creating
  2055. For Org-mode to recognize time stamps, they need to be in the specific
  2056. format. All commands listed below produce time stamps in the correct
  2057. format.
  2058. @table @kbd
  2059. @kindex C-c .
  2060. @item C-c .
  2061. Prompt for a date and insert a corresponding time stamp. When the
  2062. cursor is at a previously used time stamp, it is updated to NOW. When
  2063. this command is used twice in succession, a time range is inserted.
  2064. @kindex C-u C-c .
  2065. @item C-u C-c .
  2066. Like @kbd{C-c .}, but use the alternative format which contains date
  2067. and time. The default time can be rounded to multiples of 5 minutes,
  2068. see the option @code{org-time-stamp-rounding-minutes}.
  2069. @kindex C-c !
  2070. @item C-c !
  2071. Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
  2072. agenda.
  2073. @kindex C-c <
  2074. @item C-c <
  2075. Insert a time stamp corresponding to the cursor date in the Calendar.
  2076. @kindex C-c >
  2077. @item C-c >
  2078. Access the Emacs calendar for the current date. If there is a
  2079. timestamp in the current line, goto the corresponding date
  2080. instead.
  2081. @kindex C-c C-o
  2082. @item C-c C-o
  2083. Access the agenda for the date given by the time stamp at point
  2084. (@pxref{Weekly/Daily agenda}).
  2085. @kindex C-c C-d
  2086. @item C-c C-d
  2087. Insert @samp{DEADLINE} keyword along with a stamp. The insertion will
  2088. happen in the line directly following the headline.
  2089. @c FIXME Any CLOSED timestamp will be removed.????????
  2090. @kindex C-c C-w
  2091. @cindex sparse tree, for deadlines
  2092. @item C-c C-w
  2093. Create a sparse tree with all deadlines that are either past-due, or
  2094. which will become due within @code{org-deadline-warning-days}.
  2095. With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
  2096. prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
  2097. all deadlines due tomorrow.
  2098. @kindex C-c C-s
  2099. @item C-c C-s
  2100. Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
  2101. happen in the line directly following the headline. Any CLOSED
  2102. timestamp will be removed.
  2103. @kindex S-@key{left}
  2104. @kindex S-@key{right}
  2105. @item S-@key{left}
  2106. @itemx S-@key{right}
  2107. Change date at cursor by one day. These key bindings conflict with
  2108. CUA-mode (@pxref{Conflicts}).
  2109. @kindex S-@key{up}
  2110. @kindex S-@key{down}
  2111. @item S-@key{up}
  2112. @itemx S-@key{down}
  2113. Change the item under the cursor in a timestamp. The cursor can be on
  2114. a year, month, day, hour or minute. Note that if the cursor is not at
  2115. a time stamp, these same keys modify the priority of an item.
  2116. (@pxref{Priorities}). The key bindings also conflict with CUA-mode
  2117. (@pxref{Conflicts}).
  2118. @kindex C-c C-y
  2119. @cindex evaluate time range
  2120. @item C-c C-y
  2121. Evaluate a time range by computing the difference between start and
  2122. end. With prefix arg, insert result after the time range (in a table:
  2123. into the following column).
  2124. @end table
  2125. @cindex date, reading in minibuffer
  2126. @cindex time, reading in minibuffer
  2127. @cindex calendar, for selecting date
  2128. When Org-mode prompts for a date/time, the function reading your input
  2129. will replace anything you choose not to specify with the current date
  2130. and time. For details, see the documentation string of
  2131. @command{org-read-date}. Also, a calender will pop up to allow
  2132. selecting a date. The calendar can be fully controlled from the
  2133. minibuffer, and a date can be selected with the following commands:
  2134. @table @kbd
  2135. @kindex <
  2136. @item <
  2137. Scroll calendar backwards by one month.
  2138. @kindex >
  2139. @item >
  2140. Scroll calendar forwards by one month.
  2141. @kindex mouse-1
  2142. @item mouse-1
  2143. Select date by clicking on it.
  2144. @kindex S-@key{right}
  2145. @item S-@key{right}
  2146. One day forward.
  2147. @kindex S-@key{left}
  2148. @item S-@key{left}
  2149. One day back.
  2150. @kindex S-@key{down}
  2151. @item S-@key{down}
  2152. One week forward.
  2153. @kindex S-@key{up}
  2154. @item S-@key{up}
  2155. One week back.
  2156. @kindex M-S-@key{right}
  2157. @item M-S-@key{right}
  2158. One month forward.
  2159. @kindex M-S-@key{left}
  2160. @item M-S-@key{left}
  2161. One month back.
  2162. @kindex @key{RET}
  2163. @item @key{RET}
  2164. Choose date in calendar (only if nothing typed into minibuffer).
  2165. @end table
  2166. @node Progress logging, , Creating timestamps, Timestamps
  2167. @section Progress Logging
  2168. @cindex progress logging
  2169. @cindex logging, of progress
  2170. Org-mode can automatically record a time stamp when you mark a TODO item
  2171. as DONE. You can also measure precisely the time you spent on specific
  2172. items in a project by starting and stopping a clock when you start and
  2173. stop working on an aspect of a project.
  2174. @menu
  2175. * Closing items:: When was this entry marked DONE?
  2176. * Clocking work time:: When exactly did you work on this item?
  2177. @end menu
  2178. @node Closing items, Clocking work time, Progress logging, Progress logging
  2179. @subsection Closing items
  2180. If you want to keep track of @emph{when} a certain TODO item was
  2181. finished, turn on logging with
  2182. @lisp
  2183. (setq org-log-done t)
  2184. @end lisp
  2185. @noindent
  2186. Then each time you turn a TODO entry into DONE using either @kbd{C-c
  2187. C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
  2188. @samp{CLOSED: [timestamp]} will be inserted just after the headline.
  2189. If you turn the entry back into a TODO item again through further
  2190. state cycling, that line will be removed again. In the timeline
  2191. (@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily agenda}),
  2192. you can then use the @kbd{l} key to display the TODO items closed on
  2193. each day, giving you an overview of what has been done on a day.
  2194. @node Clocking work time, , Closing items, Progress logging
  2195. @subsection Clocking work time
  2196. Org-mode allows you to clock the time you spent on specific tasks in a
  2197. project. When you start working on an item, you can start the clock.
  2198. When you stop working on that task, or when you mark the task done, the
  2199. clock is stopped and the corresponding time interval is recorded. It
  2200. also computes the total time spent on each subtree of a project.
  2201. @table @kbd
  2202. @kindex C-c C-x C-i
  2203. @item C-c C-x C-i
  2204. Start the clock on the current item (clock-in). This inserts the CLOCK
  2205. keyword together with a timestamp.
  2206. @kindex C-c C-x C-o
  2207. @item C-c C-x C-o
  2208. Stop the clock (clock-out). The inserts another timestamp at the same
  2209. location where the clock was last started. It also directly computes
  2210. the resulting time in inserts it after the time range as @samp{=>
  2211. HH:MM}.
  2212. @kindex C-c C-y
  2213. @item C-c C-y
  2214. Recompute the time interval after changing one of the time stamps. This
  2215. is only necessary if you edit the time stamps directly. If you change
  2216. them with @kbd{S-@key{cursor}} keys, the update is automatic.
  2217. @kindex C-c C-t
  2218. @item C-c C-t
  2219. Changing the TODO state of an item to DONE automatically stops the clock
  2220. if it is running in this same item.
  2221. @kindex C-c C-x C-x
  2222. @item C-c C-x C-x
  2223. Cancel the current clock. This is useful if a clock was started by
  2224. mistake, or if you ended up working on something else.
  2225. @kindex C-c C-x C-d
  2226. @item C-c C-x C-d
  2227. Display time summaries for each subtree in the current buffer. This
  2228. puts overlays at the end of each headline, showing the total time
  2229. recorded under that heading, including the time of any subheadings. You
  2230. can use visibility cycling to study the tree, but the overlays disappear
  2231. automatically when the buffer is changed.
  2232. @kindex C-c C-x C-r
  2233. @item C-c C-x C-r
  2234. Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock
  2235. report as an org-mode table into the current file.
  2236. @example
  2237. #+BEGIN: clocktable :maxlevel 2 :emphasize nil
  2238. #+END: clocktable
  2239. @end example
  2240. @noindent
  2241. If such a block already exists, its content is replaced by the new
  2242. table. The @samp{BEGIN} line can specify options:
  2243. @example
  2244. :maxlevels @r{Maximum level depth to which times are listed in the table.}
  2245. :emphasize @r{When @code{t}, emphasize level one and level two items}
  2246. :block @r{The time block to consider. This block is specified relative}
  2247. @r{to the current time and may be any of these keywords:}
  2248. @r{@code{today}, @code{yesterday}, @code{thisweek}, @code{lastweek},}
  2249. @r{@code{thismonth}, @code{lastmonth}, @code{thisyear}, or @code{lastyear}}.
  2250. :tstart @r{A time string specifying when to start considering times}
  2251. :tend @r{A time string specifying when to stop considering times}
  2252. @end example
  2253. So to get a clock summary for the current day, you could write
  2254. @example
  2255. #+BEGIN: clocktable :maxlevel 2 :block today
  2256. #+END: clocktable
  2257. @end example
  2258. and to use a specific time range you could write@footnote{Note that all
  2259. parameters must be specified in a single line - the line is broken here
  2260. only to fit it onto the manual.}
  2261. @example
  2262. #+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
  2263. :tend "<2006-08-10 Thu 12:00>"
  2264. #+END: clocktable
  2265. @end example
  2266. @kindex C-u C-c C-x C-u
  2267. @item C-u C-c C-x C-u
  2268. Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if
  2269. you have several clocktable blocks in a buffer.
  2270. @end table
  2271. The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
  2272. the agenda (@pxref{Weekly/Daily agenda}) to show which tasks have been
  2273. worked on or closed during a day.
  2274. @node Tags, Agenda views, Timestamps, Top
  2275. @chapter Tags
  2276. @cindex tags
  2277. @cindex headline tagging
  2278. @cindex matching, tags
  2279. @cindex sparse tree, tag based
  2280. If you wish to implement a system of labels and contexts for
  2281. cross-correlating information, an excellent way is to assign @i{tags} to
  2282. headlines. Org-mode has extensive support for using tags.
  2283. Every headline can contain a list of tags, at the end of the headline.
  2284. Tags are normal words containing letters, numbers, @samp{_}, and
  2285. @samp{@@}. Tags must be preceded and followed by a single colon; like
  2286. @samp{:WORK:}. Several tags can be specified like @samp{:WORK:URGENT:}.
  2287. @menu
  2288. * Tag inheritance:: Tags use the tree structure of the outline
  2289. * Setting tags:: How to assign tags to a headline
  2290. * Tag searches:: Searching for combinations of tags
  2291. @end menu
  2292. @node Tag inheritance, Setting tags, Tags, Tags
  2293. @section Tag inheritance
  2294. @cindex inheritance, of tags
  2295. @i{Tags} make use of the hierarchical structure of outline trees. If a
  2296. heading has a certain tag, all subheadings will inherit the tag as
  2297. well. For example, in the list
  2298. @example
  2299. * Meeting with the French group :WORK:
  2300. ** Summary by Frank :BOSS:NOTES:
  2301. *** TODO Prepare slides for him :ACTION:
  2302. @end example
  2303. @noindent
  2304. the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
  2305. @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and
  2306. Org-mode finds that a certain headline matches the search criterion, it
  2307. will not check any sublevel headline, assuming that these likely also
  2308. match, and that the list of matches can become very long. This may
  2309. not be what you want, however, and you can influence inheritance and
  2310. searching using the variables @code{org-use-tag-inheritance} and
  2311. @code{org-tags-match-list-sublevels}.
  2312. @node Setting tags, Tag searches, Tag inheritance, Tags
  2313. @section Setting tags
  2314. @cindex setting tags
  2315. @kindex M-@key{TAB}
  2316. Tags can simply be typed into the buffer at the end of a headline.
  2317. After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is
  2318. also a special command for inserting tags:
  2319. @table @kbd
  2320. @kindex C-c C-c
  2321. @item C-c C-c
  2322. @cindex completion, of tags
  2323. Enter new tags for the current headline. Org-mode will either offer
  2324. completion or a special single-key interface for setting tags, see
  2325. below. After pressing @key{RET}, the tags will be inserted and aligned
  2326. to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all
  2327. tags in the current buffer will be aligned to that column, just to make
  2328. things look nice. TAGS are automatically realigned after promotion,
  2329. demotion, and TODO state changes (@pxref{TODO basics}).
  2330. @end table
  2331. Org will support tag insertion based on a @emph{list of tags}. By
  2332. default this list is constructed dynamically, containing all tags
  2333. currently used in the buffer. You may also globally specify a hard list
  2334. of tags with the variable @code{org-tag-alist}. Finally you can set
  2335. the allowed tags for a given file with lines like
  2336. @example
  2337. #+TAGS: @@WORK @@HOME @@TENNISCLUB
  2338. #+TAGS: Laptop Car PC Sailboat
  2339. @end example
  2340. The default support method is minibuffer completion. However, Org-mode
  2341. also implements a much better method: @emph{fast tag selection}. This
  2342. method allows to select and deselect tags with a single key per tag. To
  2343. function efficiently, you should assign unique keys to all tags. This
  2344. can be done globally with
  2345. @lisp
  2346. (setq org-tag-alist '(("@@WORK" . ?w) ("@@HOME" . ?h) ("Laptop" . ?l)))
  2347. @end lisp
  2348. @noindent or on a per-file basis with
  2349. @example
  2350. #+TAGS: @@WORK(w) @@HOME(h) @@TENNISCLUB(t) Laptop(l) PC(p)
  2351. @end example
  2352. @noindent
  2353. You can also group together tags that are mutually exclusive. With
  2354. curly braces@footnote{In @code{org-mode-alist} use
  2355. @code{'(:startgroup)} and @code{'(:endgroup)}, respectively. Several
  2356. groups are allowed.}
  2357. @example
  2358. #+TAGS: @{ @@WORK(w) @@HOME(h) @@TENNISCLUB(t) @} Laptop(l) PC(p)
  2359. @end example
  2360. @noindent you indicate that at most one of @samp{@@WORK}, @samp{@@HOME},
  2361. and @samp{@@SAILBOAT} should be selected.
  2362. @noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of
  2363. these lines to activate any changes.
  2364. If at least one tag has a selection key, pressing @kbd{C-c C-c} will
  2365. automatically present you with a special interface, listing inherited
  2366. tags, the tags of the current headline, and a list of all legal tags
  2367. with corresponding keys@footnote{Keys will automatically assigned to
  2368. tags which have no configured keys.}. Pressing keys for the tags will
  2369. add or remove them from the list of tags in the current line. Selecting
  2370. a tag in a group of mutually exclusive tags will turn off any other tags
  2371. from that group. @key{SPC} clears all tags for this line, @kbd{RET}
  2372. accepts the modified set, and @kbd{C-g} aborts without installing
  2373. changes. This method lets you assign tags to a headline with very few
  2374. keys. With the above setup, you could clear the current tags and set
  2375. @samp{@@HOME}, @samp{Laptop} and @samp{PC} tags with just the following
  2376. keys: @kbd{C-c C-c @key{SPC} h l p @key{RET}}. Switching from
  2377. @samp{@@HOME} to @samp{@@WORK} would be done with @kbd{C-c C-c w
  2378. @key{RET}}.
  2379. What if you have globally defined your preferred set of tags using the
  2380. variable @code{org-tag-alist}, but would like to use a dynamic tag list
  2381. in a specific file? Just add an empty TAGS option line to that file:
  2382. @example
  2383. #+TAGS:
  2384. @end example
  2385. @node Tag searches, , Setting tags, Tags
  2386. @section Tag searches
  2387. @cindex tag searches
  2388. Once a tags system has been set up, it can be used to collect related
  2389. information into special lists.
  2390. @table @kbd
  2391. @kindex C-c \
  2392. @item C-c \
  2393. Create a sparse tree with all headlines matching a tags search.
  2394. @kindex C-c a m
  2395. @item C-c a m
  2396. Create a global list of tag matches from all agenda files.
  2397. @xref{Matching headline tags}.
  2398. @kindex C-c a M
  2399. @item C-c a M
  2400. Create a global list of tag matches from all agenda files, but check
  2401. only TODO items and force checking subitems (see variable
  2402. @code{org-tags-match-list-sublevels}).
  2403. @end table
  2404. A @i{tags} search string can use Boolean operators @samp{&} for AND and
  2405. @samp{|} for OR. @samp{&} binds more strongly than @samp{|}.
  2406. Parenthesis are currently not implemented. A tag may also be preceded
  2407. by @samp{-}, to select against it, and @samp{+} is syntactic sugar for
  2408. positive selection. The AND operator @samp{&} is optional when @samp{+}
  2409. or @samp{-} is present. For example, @samp{+WORK-BOSS} would select all
  2410. headlines that are tagged @samp{:WORK:}, but discard those also tagged
  2411. @samp{:BOSS:}. The search string @samp{WORK|LAPTOP} selects all lines
  2412. tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
  2413. @samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
  2414. also tagged @samp{NIGHT}.
  2415. @node Agenda views, Embedded LaTeX, Tags, Top
  2416. @chapter Agenda Views
  2417. @cindex agenda views
  2418. Due to the way Org-mode works, TODO items, time-stamped items, and
  2419. tagged headlines can be scattered throughout a file or even a number of
  2420. files. To get an overview over open action items, or over events that
  2421. are important for a particular date, this information must be collected,
  2422. sorted and displayed in an organized way.
  2423. Org-mode can select items based on various criteria, and display them
  2424. in a separate buffer. Three different views are provided:
  2425. @itemize @bullet
  2426. @item
  2427. an @emph{agenda} that is like a calendar and shows information
  2428. for specific dates
  2429. @item
  2430. a @emph{TODO list} that covers all unfinished
  2431. action items, and
  2432. @item
  2433. a @emph{tags view} that shows information based on
  2434. the tags associated with headlines in the outline tree.
  2435. @end itemize
  2436. @noindent
  2437. The extracted information is displayed in a special @emph{agenda
  2438. buffer}. This buffer is read-only, but provides commands to visit the
  2439. corresponding locations in the original Org-mode files, and even to
  2440. edit these files remotely.
  2441. @menu
  2442. * Agenda files:: Files being searched for agenda information
  2443. * Agenda dispatcher:: Keyboard access to agenda views
  2444. * Weekly/Daily agenda:: The calendar page with current tasks
  2445. * Global TODO list:: All unfinished action items
  2446. * Matching headline tags:: Structured information with fine-tuned search
  2447. * Timeline:: Time-sorted view for single file
  2448. * Agenda commands:: Remote editing of org trees
  2449. @end menu
  2450. @node Agenda files, Agenda dispatcher, Agenda views, Agenda views
  2451. @section Agenda files
  2452. The information to be shown is collected from all @emph{agenda files},
  2453. the files listed in the variable @code{org-agenda-files}@footnote{If the
  2454. value of that variable is not a list, but a single file name, then the
  2455. list of agenda files will be maintained in that external file.}. Thus even
  2456. if you only work with a single Org-mode file, this file should be put
  2457. into that list@footnote{When using the dispatcher pressing @kbd{1}
  2458. before selecting a command will actually limit the command to the
  2459. current file, and ignore @code{org-agenda-files} until the next
  2460. dispatcher command.}. You can customize @code{org-agenda-files}, but
  2461. the easiest way to maintain it is through the following commands
  2462. @cindex files, adding to agenda list
  2463. @table @kbd
  2464. @kindex C-c [
  2465. @item C-c [
  2466. Add current file to the list of agenda files. The file is added to
  2467. the front of the list. If it was already in the list, it is moved to
  2468. the front. With prefix arg, file is added/moved to the end.
  2469. @kindex C-c ]
  2470. @item C-c ]
  2471. Remove current file from the list of agenda files.
  2472. @kindex C-,
  2473. @item C-,
  2474. Cycle through agenda file list, visiting one file after the other.
  2475. @end table
  2476. @noindent
  2477. The Org menu contains the current list of files and can be used
  2478. to visit any of them.
  2479. @node Agenda dispatcher, Weekly/Daily agenda, Agenda files, Agenda views
  2480. @section The agenda dispatcher
  2481. @cindex agenda dispatcher
  2482. @cindex dispatching agenda commands
  2483. @cindex custom agenda commands
  2484. @cindex agenda commands, custom
  2485. The views are created through a dispatcher that should be bound to a
  2486. global key, for example @kbd{C-c a} (@pxref{Installation}). In the
  2487. following we will assume that @kbd{C-c a} is indeed how the dispatcher
  2488. is accessed and list keyboard access to commands accordingly. After
  2489. pressing @kbd{C-c a}, an additional letter is required to execute a
  2490. command. The dispatcher offers the following default commands:
  2491. @table @kbd
  2492. @item a
  2493. Create the calendar-like agenda (@pxref{Weekly/Daily agenda}).
  2494. @item t / T
  2495. Create a list of all TODO items (@pxref{Global TODO list}).
  2496. @item m / M
  2497. Create a list of headlines matching a TAGS expression (@pxref{Matching
  2498. headline tags}).
  2499. @end table
  2500. You can also define custom commands that will be accessible through
  2501. the dispatcher, just like the default commands. Custom commands are
  2502. global searches for tags and specific TODO keywords, or a variety of
  2503. sparse tree creating commands (@pxref{Sparse trees}). As sparse trees
  2504. are only defined for a single org-mode file, these latter commands act
  2505. on the current buffer instead of the list of agenda files.
  2506. @kindex C-c a C
  2507. Custom commands are configured in the variable
  2508. @code{org-agenda-custom-commands}. You can customize this variable,
  2509. for example by pressing @kbd{C-c a C}. You can also directly set it
  2510. with Emacs Lisp in @file{.emacs}. For example:
  2511. @lisp
  2512. (setq org-agenda-custom-commands
  2513. '(("w" todo "WAITING")
  2514. ("u" tags "+BOSS-URGENT")
  2515. ("U" tags-tree "+BOSS-URGENT")
  2516. ("f" occur-tree "\\<FIXME\\>")))
  2517. @end lisp
  2518. @noindent will define @kbd{C-c a w} as a global search for
  2519. TODO entries with @samp{WAITING} as the TODO keyword, @kbd{C-c a u} as a
  2520. global tags search for headlines marked @samp{:BOSS:} but not
  2521. @samp{:URGENT:}, @kbd{C-c a U} to do the same search but only in the
  2522. current buffer and display the result as a sparse tree, and @kbd{C-c a
  2523. f} to create a sparse tree with all entries containing the word
  2524. @samp{FIXME}. For more information, look at the documentation string
  2525. of the variable @code{org-agenda-custom-commands}.
  2526. @node Weekly/Daily agenda, Global TODO list, Agenda dispatcher, Agenda views
  2527. @section The weekly/daily agenda
  2528. @cindex agenda
  2529. The purpose of the weekly/daily @emph{agenda} is to act like a page of
  2530. a paper agenda, showing all the tasks for the current week or day.
  2531. @table @kbd
  2532. @cindex org-agenda, command
  2533. @kindex C-c a a
  2534. @item C-c a a
  2535. Compile an agenda for the current week from a list of org files. The
  2536. agenda shows the entries for each day. With a @kbd{C-u} prefix (or
  2537. when the variable @code{org-agenda-include-all-todo} is @code{t}), all
  2538. unfinished TODO items (including those without a date) are also listed at
  2539. the beginning of the buffer, before the first date.@*
  2540. @end table
  2541. Remote editing from the agenda buffer means, for example, that you can
  2542. change the dates of deadlines and appointments from the agenda buffer.
  2543. The commands available in the Agenda buffer are listed in @ref{Agenda
  2544. commands}.
  2545. @menu
  2546. * Categories:: Not all tasks are equal
  2547. * Time-of-day specifications:: How the agenda knows the time
  2548. * Calendar/Diary integration:: Integrating Anniversaries and more
  2549. * Sorting of agenda items:: The order of things
  2550. @end menu
  2551. @node Categories, Time-of-day specifications, Weekly/Daily agenda, Weekly/Daily agenda
  2552. @subsection Categories
  2553. @cindex category
  2554. In the agenda buffer, each entry is preceded by a @emph{category},
  2555. which is derived from the file name. The category can also be set
  2556. with a special line anywhere in the buffer, looking like this:
  2557. @example
  2558. #+CATEGORY: Thesis
  2559. @end example
  2560. If there are several such lines in a file, each specifies the category
  2561. for the text below it (but the first category also applies to any text
  2562. before the first CATEGORY line). The display in the agenda buffer looks
  2563. best if the category is not longer than 10 characters.
  2564. @node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily agenda
  2565. @subsection Time-of-Day Specifications
  2566. Org-mode checks each agenda item for a time-of-day specification. The
  2567. time can be part of the time stamp that triggered inclusion into the
  2568. agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
  2569. ranges can be specified with two time stamps, like
  2570. @c
  2571. @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
  2572. In the headline of the entry itself, a time(range) may also appear as
  2573. plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda
  2574. integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
  2575. specifications in diary entries are recognized as well.
  2576. For agenda display, Org-mode extracts the time and displays it in a
  2577. standard 24 hour format as part of the prefix. The example times in
  2578. the previous paragraphs would end up in the agenda like this:
  2579. @example
  2580. 8:30-13:00 Arthur Dent lies in front of the bulldozer
  2581. 12:45...... Ford Prefect arrives and takes Arthur to the pub
  2582. 19:00...... The Vogon reads his poem
  2583. 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
  2584. @end example
  2585. If the agenda is in single-day mode, or for the display of today, the
  2586. timed entries are embedded in a time grid, like
  2587. @example
  2588. 8:00...... ------------------
  2589. 8:30-13:00 Arthur Dent lies in front of the bulldozer
  2590. 10:00...... ------------------
  2591. 12:00...... ------------------
  2592. 12:45...... Ford Prefect arrives and takes Arthur to the pub
  2593. 14:00...... ------------------
  2594. 16:00...... ------------------
  2595. 18:00...... ------------------
  2596. 19:00...... The Vogon reads his poem
  2597. 20:00...... ------------------
  2598. 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
  2599. @end example
  2600. The time grid can be turned on and off with the variable
  2601. @code{org-agenda-use-time-grid}, and can be configured with
  2602. @code{org-agenda-time-grid}.
  2603. @node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily agenda
  2604. @subsection Calendar/Diary integration
  2605. @cindex calendar integration
  2606. @cindex diary integration
  2607. Emacs contains the calendar and diary by Edward M. Reingold. The
  2608. calendar displays a three-month calendar with holidays from different
  2609. countries and cultures. The diary allows you to keep track of
  2610. anniversaries, lunar phases, sunrise/set, recurrent appointments
  2611. (weekly, monthly) and more. In this way, it is quite complementary to
  2612. Org-mode. It can be very useful to combine output from Org-mode with
  2613. the diary.
  2614. In order to include entries from the Emacs diary into Org-mode's
  2615. agenda, you only need to customize the variable
  2616. @lisp
  2617. (setq org-agenda-include-diary t)
  2618. @end lisp
  2619. @noindent After that, everything will happen automatically. All diary
  2620. entries including holidays, anniversaries etc will be included in the
  2621. agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and
  2622. @key{RET} can be used from the agenda buffer to jump to the diary
  2623. file in order to edit existing diary entries. The @kbd{i} command to
  2624. insert new entries for the current date works in the agenda buffer, as
  2625. well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
  2626. Sunrise/Sunset times, show lunar phases and to convert to other
  2627. calendars, respectively. @kbd{c} can be used to switch back and forth
  2628. between calendar and agenda.
  2629. @node Sorting of agenda items, , Calendar/Diary integration, Weekly/Daily agenda
  2630. @subsection Sorting of agenda items
  2631. @cindex sorting, of agenda items
  2632. @cindex priorities, of agenda items
  2633. The entries for each day are sorted. The default order is to first
  2634. collect all items containing an explicit time-of-day specification.
  2635. These entries will be shown at the beginning of the list, as a
  2636. @emph{schedule} for the day. After that, items remain grouped in
  2637. categories, in the sequence given by @code{org-agenda-files}. Within
  2638. each category, items are sorted by priority (@pxref{Priorities}).
  2639. The priority is a numerical quantity composed of the base priority
  2640. (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
  2641. plus additional increments for overdue scheduled or deadline items.
  2642. Sorting can be customized using the variable
  2643. @code{org-agenda-sorting-strategy}.
  2644. @node Global TODO list, Matching headline tags, Weekly/Daily agenda, Agenda views
  2645. @section The global TODO list
  2646. @cindex global TODO list
  2647. @cindex TODO list, global
  2648. The global TODO list contains all unfinished TODO items, formatted and
  2649. collected into a single place.
  2650. @table @kbd
  2651. @kindex C-c a t
  2652. @item C-c a t
  2653. Show the global TODO list. This collects the TODO items from all
  2654. agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
  2655. @code{agenda-mode}, so there are commands to examine and manipulate
  2656. the TODO entries directly from that buffer (@pxref{Agenda commands}).
  2657. @kindex C-c a T
  2658. @item C-c a T
  2659. Like the above, but allows selection of a specific TODO keyword. You can
  2660. also do this by specifying a prefix argument to @kbd{C-c a t}. With a
  2661. @kbd{C-u} prefix you are prompted for a keyword. With a numeric
  2662. prefix, the Nth keyword in @code{org-todo-keywords} is selected.
  2663. @kindex r
  2664. The @kbd{r} key in the agenda buffer regenerates it, and you can give
  2665. a prefix argument to this command to change the selected TODO keyword,
  2666. for example @kbd{3 r}. If you often need a search for a specific
  2667. keyword, define a custom command for it (@pxref{Agenda dispatcher}).
  2668. @end table
  2669. Remote editing of TODO items means that you can change the state of a
  2670. TODO entry with a single key press. The commands available in the
  2671. TODO list are described in @ref{Agenda commands}.
  2672. Nomally the global todo list simply shows all headlines with TODO
  2673. keywords. This list can become very long. There are two ways to keep
  2674. it more compact:
  2675. @itemize @minus
  2676. @item
  2677. Some people view a TODO item that has been @emph{scheduled} for
  2678. execution (@pxref{Time stamps}) as no longer @emph{open}. Configure the
  2679. variable @code{org-agenda-todo-ignore-scheduled} to exclude scheduled
  2680. items from the global TODO list.
  2681. @item
  2682. TODO items may have sublevels to break up the task into subtasks. In
  2683. such cases it may be enough to list only the highest level TODO headline
  2684. and omit the sublevels from the global list. Configure the variable
  2685. @code{org-agenda-todo-list-sublevels} to get this behavior.
  2686. @end itemize
  2687. @node Matching headline tags, Timeline, Global TODO list, Agenda views
  2688. @section Matching headline tags
  2689. @cindex matching, of tags
  2690. @cindex tags view
  2691. If headlines in the agenda files are marked with @emph{tags}
  2692. (@pxref{Tags}), you can select headlines based on the tags that apply
  2693. to them and collect them into an agenda buffer.
  2694. @table @kbd
  2695. @kindex C-c a m
  2696. @item C-c a m
  2697. Produce a list of all headlines that match a given set of tags. The
  2698. command prompts for a selection criterion, which is a boolean logic
  2699. expression with tags, like @samp{+WORK+URGENT-WITHBOSS} or
  2700. @samp{WORK|HOME} (@pxref{Tags}). If you often need a specific search,
  2701. define a custom command for it (@pxref{Agenda dispatcher}).
  2702. @kindex C-c a M
  2703. @item C-c a M
  2704. Like @kbd{C-c a m}, but only select headlines that are also TODO items
  2705. and force checking subitems (see variable
  2706. @code{org-tags-match-list-sublevels}.
  2707. @end table
  2708. The commands available in the tags list are described in @ref{Agenda
  2709. commands}.
  2710. @node Timeline, Agenda commands, Matching headline tags, Agenda views
  2711. @section Timeline for a single file
  2712. @cindex single file summary
  2713. @cindex agenda, for single file
  2714. @cindex timeline, single file
  2715. @cindex time-sorted view
  2716. The timeline is not really an agenda view, because it only summarizes
  2717. items from a single Org-mode file. But it also uses the agenda buffer
  2718. and provides similar commands, so we discuss it here. The timeline
  2719. shows all time-stamped items in a single Org-mode file (or the
  2720. selected part of it), in a @emph{time-sorted view}. The main purpose of
  2721. this command is to give an overview over events in a project.
  2722. @table @kbd
  2723. @kindex C-c C-r
  2724. @item C-c C-r
  2725. Show a time-sorted view of the org file, with all time-stamped items.
  2726. When called with a @kbd{C-u} prefix, all unfinished TODO entries
  2727. (scheduled or not) are also listed under the current date.
  2728. @end table
  2729. @noindent
  2730. The commands available in the timeline buffer are listed in
  2731. @ref{Agenda commands}.
  2732. @node Agenda commands, , Timeline, Agenda views
  2733. @section Commands in the agenda buffer
  2734. @cindex commands, in agenda buffer
  2735. Entries in the agenda buffer are linked back to the org file or diary
  2736. file where they originate. You are not allowed to edit the agenda
  2737. buffer itself, but commands are provided to show and jump to the
  2738. original entry location, and to edit the org-files ``remotely'' from
  2739. the agenda buffer. In this way, all information is stored only once,
  2740. removing the risk that your agenda and note files may diverge.
  2741. Some commands can be executed with mouse clicks on agenda lines. For
  2742. the other commands, the cursor needs to be in the desired line.
  2743. @table @kbd
  2744. @tsubheading{Motion}
  2745. @kindex n
  2746. @item n
  2747. Next line (same as @key{up}).
  2748. @kindex p
  2749. @item p
  2750. Previous line (same as @key{down}).
  2751. @tsubheading{View/GoTo org file}
  2752. @kindex mouse-3
  2753. @kindex @key{SPC}
  2754. @item mouse-3
  2755. @itemx @key{SPC}
  2756. Display the original location of the item in another window.
  2757. @kindex L
  2758. @item L
  2759. Display original location and recenter that window.
  2760. @kindex mouse-2
  2761. @kindex mouse-1
  2762. @kindex @key{TAB}
  2763. @item mouse-2
  2764. @itemx mouse-1
  2765. @itemx @key{TAB}
  2766. Go to the original location of the item in another window. Under Emacs
  2767. 22, @kbd{mouse-1} will also works for this.
  2768. @kindex @key{RET}
  2769. @itemx @key{RET}
  2770. Go to the original location of the item and delete other windows.
  2771. @kindex f
  2772. @item f
  2773. Toggle Follow mode. In Follow mode, as you move the cursor through
  2774. the agenda buffer, the other window always shows the corresponding
  2775. location in the org file. The initial setting for this mode in new
  2776. agenda buffers can be set with the variable
  2777. @code{org-agenda-start-with-follow-mode}.
  2778. @kindex l
  2779. @item l
  2780. Toggle Logbook mode. In Logbook mode, entries that where marked DONE while
  2781. logging was on (variable @code{org-log-done}) are shown in the agenda,
  2782. as are entries that have been clocked on that day.
  2783. @tsubheading{Change display}
  2784. @kindex o
  2785. @item o
  2786. Delete other windows.
  2787. @kindex w
  2788. @item w
  2789. Switch to weekly view (7 days displayed together).
  2790. @kindex d
  2791. @item d
  2792. Switch to daily view (just one day displayed).
  2793. @kindex D
  2794. @item D
  2795. Toggle the inclusion of diary entries. See @ref{Calendar/Diary integration}.
  2796. @kindex g
  2797. @item g
  2798. Toggle the time grid on and off. See also the variables
  2799. @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
  2800. @kindex r
  2801. @item r
  2802. Recreate the agenda buffer, for example to reflect the changes
  2803. after modification of the time stamps of items with S-@key{left} and
  2804. S-@key{right}. When the buffer is the global todo list, a prefix
  2805. argument is interpreted to create a selective list for a specific TODO
  2806. keyword.
  2807. @kindex s
  2808. @item s
  2809. Save all Org-mode buffers in the current Emacs session.
  2810. @kindex @key{right}
  2811. @item @key{right}
  2812. Display the following @code{org-agenda-ndays} days. For example, if
  2813. the display covers a week, switch to the following week. With prefix
  2814. arg, go forward that many times @code{org-agenda-ndays} days.
  2815. @kindex @key{left}
  2816. @item @key{left}
  2817. Display the previous dates.
  2818. @kindex .
  2819. @item .
  2820. Goto today.
  2821. @tsubheading{Remote editing}
  2822. @item 0-9
  2823. Digit argument.
  2824. @kindex t
  2825. @item t
  2826. Change the TODO state of the item, both in the agenda and in the
  2827. original org file.
  2828. @kindex T
  2829. @item T
  2830. Show all tags associated with the current item. Because of
  2831. inheritance, this may be more than the tags listed in the line itself.
  2832. @kindex :
  2833. @item :
  2834. Set tags for the current headline.
  2835. @kindex a
  2836. @item a
  2837. Toggle the ARCHIVE tag for the current headline.
  2838. @kindex ,
  2839. @item ,
  2840. Set the priority for the current item. Org-mode prompts for the
  2841. priority character. If you reply with @key{SPC}, the priority cookie
  2842. is removed from the entry.
  2843. @kindex P
  2844. @item p
  2845. Display weighted priority of current item.
  2846. @kindex +
  2847. @kindex S-@key{up}
  2848. @item +
  2849. @itemx S-@key{up}
  2850. Increase the priority of the current item. The priority is changed in
  2851. the original buffer, but the agenda is not resorted. Use the @kbd{r}
  2852. key for this.
  2853. @kindex -
  2854. @kindex S-@key{down}
  2855. @item -
  2856. @itemx S-@key{down}
  2857. Decrease the priority of the current item.
  2858. @kindex C-c C-s
  2859. @item C-c C-s
  2860. Schedule this item
  2861. @kindex C-c C-d
  2862. @item C-c C-d
  2863. Set a deadline for this item.
  2864. @kindex S-@key{right}
  2865. @item S-@key{right}
  2866. Change the time stamp associated with the current line by one day into
  2867. the future. With prefix argument, change it by that many days. For
  2868. example, @kbd{3 6 5 S-@key{right}} will change it by a year. The
  2869. stamp is changed in the original org file, but the change is not
  2870. directly reflected in the agenda buffer. Use the
  2871. @kbd{r} key to update the buffer.
  2872. @kindex S-@key{left}
  2873. @item S-@key{left}
  2874. Change the time stamp associated with the current line by one day
  2875. into the past.
  2876. @kindex >
  2877. @item >
  2878. Change the time stamp associated with the current line to today.
  2879. The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
  2880. on my keyboard.
  2881. @kindex I
  2882. @item I
  2883. Start the clock on the current item. If a clock is running already, it
  2884. is stopped first.
  2885. @kindex O
  2886. @item O
  2887. Stop the previously started clock.
  2888. @kindex X
  2889. @item X
  2890. Cancel the currently running clock.
  2891. @tsubheading{Calendar commands}
  2892. @kindex c
  2893. @item c
  2894. Open the Emacs calendar and move to the date at the agenda cursor.
  2895. @item c
  2896. When in the calendar, compute and show the Org-mode agenda for the
  2897. date at the cursor.
  2898. @cindex diary entries, creating from agenda
  2899. @kindex i
  2900. @item i
  2901. Insert a new entry into the diary. Prompts for the type of entry
  2902. (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
  2903. entry in the diary, just as @kbd{i d} etc. would do in the calendar.
  2904. The date is taken from the cursor position.
  2905. @kindex M
  2906. @item M
  2907. Show the phases of the moon for the three months around current date.
  2908. @kindex S
  2909. @item S
  2910. Show sunrise and sunset times. The geographical location must be set
  2911. with calendar variables, see documentation of the Emacs calendar.
  2912. @kindex C
  2913. @item C
  2914. Convert the date at cursor into many other cultural and historic
  2915. calendars.
  2916. @kindex H
  2917. @item H
  2918. Show holidays for three month around the cursor date.
  2919. @c FIXME: This should be a different key.
  2920. @kindex C-c C-x C-c
  2921. @item C-c C-x C-c
  2922. Export a single iCalendar file containing entries from all agenda files.
  2923. @tsubheading{Quit and Exit}
  2924. @kindex q
  2925. @item q
  2926. Quit agenda, remove the agenda buffer.
  2927. @kindex x
  2928. @cindex agenda files, removing buffers
  2929. @item x
  2930. Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
  2931. for the compilation of the agenda. Buffers created by the user to
  2932. visit org files will not be removed.
  2933. @end table
  2934. @node Embedded LaTeX, Exporting, Agenda views, Top
  2935. @chapter Embedded LaTeX
  2936. @cindex @TeX{} interpretation
  2937. @cindex La@TeX{} interpretation
  2938. Plain ASCII is normally sufficient for almost all note taking. One
  2939. exception, however, are scientific notes which need to be able to
  2940. contain mathematical symbols and the occasional formula.
  2941. La@TeX{}@footnote{La@TeX{} is a macro system based on Donald E. Knuth's
  2942. @TeX{} system. Many of the features described here as ``La@TeX{}'' are
  2943. really from @TeX{}, but for simplicity I am blurring this distinction.}
  2944. is widely used to typeset scientific documents. Org-mode supports
  2945. embedding La@TeX{} code into its files, because many academics are used
  2946. to read La@TeX{} source code, and because it can be readily processed
  2947. into images for HTML production.
  2948. It is not necessary to mark La@TeX{} macros and code in any special way.
  2949. If you observe a few conventions, Org-mode knows how to find it and what
  2950. to do with it.
  2951. @menu
  2952. * Math symbols:: TeX macros for symbols and Greek letters
  2953. * Subscripts and Superscripts:: Simple syntax for raising/lowering text
  2954. * LaTeX fragments:: Complex formulas made easy
  2955. * Processing LaTeX fragments:: Previewing LaTeX processing
  2956. * CDLaTeX mode:: Speed up entering of formulas
  2957. @end menu
  2958. @node Math symbols, Subscripts and Superscripts, Embedded LaTeX, Embedded LaTeX
  2959. @section Math symbols
  2960. You can use La@TeX{} macros to insert special symbols like @samp{\alpha}
  2961. to indicate the Greek letter, or @samp{\to} to indicate an arrow.
  2962. Completion for these macros is available, just type @samp{\} and maybe a
  2963. few letters, and press @kbd{M-@key{TAB}} to see possible completions.
  2964. Unlike La@TeX{} code, Org-mode allows these macros to be present
  2965. without surrounding math delimiters, for example:
  2966. @example
  2967. Angles are written as Greek letters \alpha, \beta and \gamma.
  2968. @end example
  2969. During HTML export (@pxref{HTML export}), these symbols are translated
  2970. into the proper syntax for HTML, for the above examples this is
  2971. @samp{&alpha;} and @samp{&rarr;}, respectively.
  2972. @node Subscripts and Superscripts, LaTeX fragments, Math symbols, Embedded LaTeX
  2973. @section Subscripts and Superscripts
  2974. Just like in La@TeX{}, @samp{^} and @samp{_} are used to indicate super-
  2975. and subscripts. Again, these can be used without embedding them in
  2976. math-mode delimiters. To increase the readability of ASCII text, it is
  2977. not necessary (but OK) to surround multi-character sub- and superscripts
  2978. with curly braces. For example
  2979. @example
  2980. The mass if the sun is M_sun = 1.989 x 10^30 kg. The radius of
  2981. the sun is R_@{sun@} = 6.96 x 10^8 m.
  2982. @end example
  2983. To avoid interpretation as raised or lowered text, you can quote
  2984. @samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}.
  2985. During HTML export (@pxref{HTML export}), subscript and superscripts
  2986. are surrounded with @code{<sub>} and @code{<sup>} tags, respectively.
  2987. @node LaTeX fragments, Processing LaTeX fragments, Subscripts and Superscripts, Embedded LaTeX
  2988. @section LaTeX fragments
  2989. With symbols, sub- and superscripts, HTML is pretty much at its end when
  2990. it comes to representing mathematical formulas. More complex
  2991. expressions need a dedicated formula processor. To this end, Org-mode
  2992. can contain arbitrary La@TeX{} fragments. It provides commands to
  2993. preview the typeset result of these fragments, and upon export to HTML,
  2994. all fragments will be converted to images and inlined into the HTML
  2995. document. For this to work you need to be on a system with a working
  2996. La@TeX{} installation. You also need the @file{dvipng} program,
  2997. available at @url{http://sourceforge.net/projects/dvipng/}.
  2998. La@TeX{} fragments don't need any special marking at all. The following
  2999. snippets will be identified as LaTeX source code:
  3000. @itemize @bullet
  3001. @item
  3002. Environments of any kind. The only requirement is that the
  3003. @code{\begin} statement appears on a new line, preceded by only
  3004. whitespace.
  3005. @item
  3006. Text within the usual La@TeX{} math delimiters. To avoid conflicts with
  3007. currency specifications, single @samp{$} characters are only recognized
  3008. as math delimiters if the enclosed text contains at most two line breaks,
  3009. is directly attached to the @samp{$} characters with no whitespace in
  3010. between, and if the closing @samp{$} is followed by whitespace or
  3011. punctuation. For the other delimiters, there is no such restriction, so
  3012. when in doubt, use @samp{\(...\)} as inline math delimiters.
  3013. @end itemize
  3014. @noindent For example:
  3015. @example
  3016. \begin@{equation@} % arbitrary environments,
  3017. x=\sqrt@{b@} % even tables, figures
  3018. \end@{equation@} % etc
  3019. If $a^2=b$ and \( b=2 \), then the solution must be
  3020. either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \].
  3021. @end example
  3022. @noindent
  3023. If you need any of the delimiter ASCII sequences for other purposes, you
  3024. can configure the option @code{org-format-latex-options} to deselect the
  3025. ones you do not wish to have interpreted by the La@TeX{} converter.
  3026. @node Processing LaTeX fragments, CDLaTeX mode, LaTeX fragments, Embedded LaTeX
  3027. @section Processing LaTeX fragments
  3028. La@TeX{} fragments can be processed to produce a preview images of the
  3029. typeset expressions:
  3030. @table @kbd
  3031. @kindex C-c C-x C-l
  3032. @item C-c C-x C-l
  3033. Produce a preview image of the La@TeX{} fragment at point and overlay it
  3034. over the source code. If there is no fragment at point, process all
  3035. fragments in the current entry (between two headlines). When called
  3036. with a prefix argument, process the entire subtree. When called with
  3037. two prefix arguments, or when the cursor is before the first headline,
  3038. process the entire buffer.
  3039. @kindex C-c C-c
  3040. @item C-c C-c
  3041. Remove the overlay preview images.
  3042. @end table
  3043. During HTML export (@pxref{HTML export}), all La@TeX{} fragments are
  3044. converted into images and inlined into the document if the following
  3045. setting is active:
  3046. @lisp
  3047. (setq org-export-with-LaTeX-fragments t)
  3048. @end lisp
  3049. @node CDLaTeX mode, , Processing LaTeX fragments, Embedded LaTeX
  3050. @section Using CDLaTeX to enter math
  3051. CDLaTeX-mode is a minor mode that is normally used in combination with a
  3052. major LaTeX mode like AUCTeX in order to speed-up insertion of
  3053. environments and math templates. Inside Org-mode, you can make use of
  3054. some of the features of cdlatex-mode. You need to install
  3055. @file{cdlatex.el} and @file{texmathp.el} (the latter comes also with
  3056. AUCTeX) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}.
  3057. Don't turn cdlatex-mode itself under Org-mode, but use the light
  3058. version @code{org-cdlatex-mode} that comes as part of Org-mode. Turn it
  3059. on for the current buffer with @code{M-x org-cdlatex-mode}, or for all
  3060. Org-mode files with
  3061. @lisp
  3062. (add-hook 'org-mode-hook 'turn-on-org-cdlatex)
  3063. @end lisp
  3064. When this mode is enabled, the following features are present (for more
  3065. details see the documentation of cdlatex-mode):
  3066. @itemize @bullet
  3067. @kindex C-c @{
  3068. @item
  3069. Environment templates can be inserted with @kbd{C-c @{}.
  3070. @item
  3071. @kindex @key{TAB}
  3072. The @key{TAB} key will do template expansion if the cursor is inside a
  3073. LaTeX fragment@footnote{Org-mode has a method to test if the cursor is
  3074. inside such a fragment, see the documentation of the function
  3075. @code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will
  3076. expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor
  3077. correctly inside the first brace. Another @key{TAB} will get you into
  3078. the second brace. Even outside fragments, @key{TAB} will expand
  3079. environment abbreviations at the beginning of a line. For example, if
  3080. you write @samp{equ} at the beginning of a line and press @key{TAB},
  3081. this abbreviation will be expanded to an @code{equation} environment.
  3082. To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help}.
  3083. @item
  3084. @kindex _
  3085. @kindex ^
  3086. Pressing @kbd{_} and @kbd{^} inside a LaTeX fragment will insert these
  3087. characters together with a pair of braces. If you use @key{TAB} to move
  3088. out of the braces, and if the braces surround only a single character or
  3089. macro, they are removed again (depending on the variable
  3090. @code{cdlatex-simplify-sub-super-scripts}).
  3091. @item
  3092. @kindex `
  3093. Pressing the backquote @kbd{`} followed by a character inserts math
  3094. macros, also outside LaTeX fragments. If you wait more than 1.5 seconds
  3095. after the backquote, a help window will pop up.
  3096. @item
  3097. @kindex '
  3098. Pressing the normal quote @kbd{'} followed by another character modifies
  3099. the symbol before point with an accent or a font. If you wait more than
  3100. 1.5 seconds after the backquote, a help window will pop up. Character
  3101. modification will work only inside La@TeX{} fragments, outside the quote
  3102. is normal.
  3103. @end itemize
  3104. @node Exporting, Publishing, Embedded LaTeX, Top
  3105. @chapter Exporting
  3106. @cindex exporting
  3107. Org-mode documents can be exported into a variety of other formats. For
  3108. printing and sharing of notes, ASCII export produces a readable and
  3109. simple version of an Org-mode file. HTML export allows you to publish a
  3110. notes file on the web, while the XOXO format provides a solid base for
  3111. exchange with a broad range of other applications. To incorporate
  3112. entries with associated times like deadlines or appointments into a
  3113. desktop calendar program like iCal, Org-mode can also produce extracts
  3114. in the iCalendar format. Currently Org-mode only supports export, not
  3115. import of these different formats.
  3116. When exporting, Org-mode uses special conventions to enrich the output
  3117. produced. @xref{Text interpretation}, for more details.
  3118. @table @kbd
  3119. @kindex C-c C-e
  3120. @item C-c C-e
  3121. Dispatcher for export and publishing commands. Displays a help-window
  3122. listing the additional key(s) needed to launch an export or publishing
  3123. command.
  3124. @end table
  3125. @menu
  3126. * ASCII export:: Exporting to plain ASCII
  3127. * HTML export:: Exporting to HTML
  3128. * XOXO export:: Exporting to XOXO
  3129. * iCalendar export:: Exporting in iCalendar format
  3130. * Text interpretation:: How the exporter looks at the file
  3131. @end menu
  3132. @node ASCII export, HTML export, Exporting, Exporting
  3133. @section ASCII export
  3134. @cindex ASCII export
  3135. ASCII export produces a simple and very readable version of an Org-mode
  3136. file.
  3137. @cindex region, active
  3138. @cindex active region
  3139. @cindex transient-mark-mode
  3140. @table @kbd
  3141. @kindex C-c C-e a
  3142. @item C-c C-e a
  3143. Export as ASCII file. If there is an active region, only the region
  3144. will be exported. For an org file @file{myfile.org}, the ASCII file
  3145. will be @file{myfile.txt}. The file will be overwritten without
  3146. warning.
  3147. @kindex C-c C-e v a
  3148. @item C-c C-e v a
  3149. Export only the visible part of the document.
  3150. @end table
  3151. @cindex headline levels, for exporting
  3152. In the exported version, the first 3 outline levels will become
  3153. headlines, defining a general document structure. Additional levels
  3154. will be exported as itemized lists. If you want that transition to occur
  3155. at a different level, specify it with a prefix argument. For example,
  3156. @example
  3157. @kbd{C-1 C-c C-e a}
  3158. @end example
  3159. @noindent
  3160. creates only top level headlines and does the rest as items. When
  3161. headlines are converted to items, the indentation of the text following
  3162. the headline is changed to fit nicely under the item. This is done with
  3163. the assumption that the first bodyline indicates the base indentation of
  3164. the body text. Any indentation larger than this is adjusted to preserve
  3165. the layout relative to the first line. Should there be lines with less
  3166. indentation than the first, these are left alone.
  3167. @node HTML export, XOXO export, ASCII export, Exporting
  3168. @section HTML export
  3169. @cindex HTML export
  3170. Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive
  3171. HTML formatting, in ways similar to John Grubers @emph{markdown}
  3172. language, but with additional support for tables.
  3173. @cindex region, active
  3174. @cindex active region
  3175. @cindex transient-mark-mode
  3176. @table @kbd
  3177. @kindex C-c C-e h
  3178. @item C-c C-e h
  3179. Export as HTML file @file{myfile.html}.
  3180. @kindex C-c C-e b
  3181. @item C-c C-e b
  3182. Export as HTML file and open it with a browser.
  3183. @kindex C-c C-e v h
  3184. @kindex C-c C-e v b
  3185. @item C-c C-e v h
  3186. @item C-c C-e v b
  3187. Export only the visible part of the document.
  3188. @end table
  3189. @cindex headline levels, for exporting
  3190. In the exported version, the first 3 outline levels will become
  3191. headlines, defining a general document structure. Additional levels
  3192. will be exported as itemized lists. If you want that transition to occur
  3193. at a different level, specify it with a prefix argument. For example,
  3194. @example
  3195. @kbd{C-2 C-c C-e b}
  3196. @end example
  3197. @noindent
  3198. creates two levels of headings and does the rest as items.
  3199. If you want to include HTML tags which should be interpreted as such,
  3200. mark them with @samp{@@} as in @samp{@@<b>bold text@@</b>}.
  3201. Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
  3202. @samp{&gt;} in HTML export.
  3203. @cindex links, in HTML export
  3204. @cindex internal links, in HTML export
  3205. @cindex external links, in HTML export
  3206. Internal links (@pxref{Internal links}) will continue to work in HTML
  3207. files only if they match a dedicated @samp{<<target>>}. Automatic links
  3208. created by radio targets (@pxref{Radio targets}) will also work in the
  3209. HTML file. Links to external files will still work if the HTML file is
  3210. in the same directory as the Org-mode file. Links to other @file{.org}
  3211. files will be translated into HTML links under the assumption that an
  3212. HTML version also exists of the linked file. For information related to
  3213. linking files while publishing them to a publishing directory see
  3214. @ref{Publishing links}.
  3215. You can also give style information for the exported file. The HTML
  3216. exporter assigns the following CSS classes to appropriate parts of the
  3217. document - your style specifications may change these:
  3218. @example
  3219. .todo @r{TODO keywords}
  3220. .done @r{the DONE keyword}
  3221. .timestamp @r{time stamp}
  3222. .timestamp-kwd @r{keyword associated with a time stamp, like SCHEDULED}
  3223. .tag @r{tag in a headline}
  3224. .target @r{target for links}
  3225. @end example
  3226. The default style specification can be configured through the option
  3227. @code{org-export-html-style}. If you want to use a file-local style,
  3228. you may use file variables, best wrapped into a COMMENT section at the
  3229. end of the outline tree. For example:
  3230. @example
  3231. * COMMENT HTML style specifications
  3232. # Local Variables:
  3233. # org-export-html-style: " <style type=\"text/css\">
  3234. # p @{font-weight: normal; color: gray; @}
  3235. # h1 @{color: black; @}
  3236. # </style>"
  3237. # End:
  3238. @end example
  3239. Remember to execute @kbd{M-x normal-mode} after changing this to make
  3240. the new style visible to Emacs. This command restarts org-mode for the
  3241. current buffer and forces Emacs to re-evaluate the local variables
  3242. section in the buffer.
  3243. @c FIXME: More about header and footer styles
  3244. @c FIXME: Talk about links and targets.
  3245. @node XOXO export, iCalendar export, HTML export, Exporting
  3246. @section XOXO export
  3247. @cindex XOXO export
  3248. Org-mode contains an exporter that produces XOXO-style output.
  3249. Currently, this exporter only handles the general outline structure and
  3250. does not interpret any additional Org-mode features.
  3251. @table @kbd
  3252. @kindex C-c C-e x
  3253. @item C-c C-e x
  3254. Export as XOXO file @file{myfile.html}.
  3255. @kindex C-c C-e v
  3256. @item C-c C-e v x
  3257. Export only the visible part of the document.
  3258. @end table
  3259. @node iCalendar export, Text interpretation, XOXO export, Exporting
  3260. @section iCalendar export
  3261. @cindex iCalendar export
  3262. Some people like to use Org-mode for keeping track of projects, but
  3263. still prefer a standard calendar application for anniversaries and
  3264. appointments. In this case it can be useful to have deadlines and
  3265. other time-stamped items in Org-mode files show up in the calendar
  3266. application. Org-mode can export calendar information in the standard
  3267. iCalendar format.
  3268. @table @kbd
  3269. @kindex C-c C-e i
  3270. @item C-c C-e i
  3271. Create iCalendar entries for the current file and store them in the same
  3272. directory, using a file extension @file{.ics}.
  3273. @kindex C-c C-e I
  3274. @item C-c C-e I
  3275. Like @kbd{C-c C-e i}, but do this for all files in
  3276. @code{org-agenda-files}. For each of these files, a separate iCalendar
  3277. file will be written.
  3278. @kindex C-c C-e c
  3279. @item C-c C-e c
  3280. Create a single large iCalendar file from all files in
  3281. @code{org-agenda-files} and write it to the file given by
  3282. @code{org-combined-agenda-icalendar-file}.
  3283. @end table
  3284. How this calendar is best read and updated, depends on the application
  3285. you are using. For example, when using iCal under Apple MacOS X, you
  3286. could create a new calendar @samp{OrgMode} (the default name for the
  3287. calendar created by @kbd{C-c C-e c}, see the variables
  3288. @code{org-icalendar-combined-name} and
  3289. @code{org-combined-agenda-icalendar-file}). Then set Org-mode to
  3290. overwrite the corresponding file
  3291. @file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
  3292. to make iCal re-read the calendar files each time a new version of
  3293. @file{OrgMode.ics} is produced. Here is the setup needed for this:
  3294. @cindex applescript, for calendar update
  3295. @lisp
  3296. (setq org-combined-agenda-icalendar-file
  3297. "~/Library/Calendars/OrgMode.ics")
  3298. (add-hook 'org-after-save-iCalendar-file-hook
  3299. (lambda ()
  3300. (shell-command
  3301. "osascript -e 'tell application \"iCal\" to reload calendars'")))
  3302. @end lisp
  3303. @node Text interpretation, , iCalendar export, Exporting
  3304. @section Text interpretation by the exporter
  3305. The exporter backends interpret additional structure in the Org-mode file
  3306. in order to produce better output.
  3307. @menu
  3308. * Comment lines:: Some lines will not be exported
  3309. * Enhancing text:: Subscripts, symbols and more
  3310. * Export options:: How to influence the export settings
  3311. @end menu
  3312. @node Comment lines, Enhancing text, Text interpretation, Text interpretation
  3313. @subsection Comment lines
  3314. @cindex comment lines
  3315. @cindex exporting, not
  3316. Lines starting with @samp{#} in column zero are treated as comments
  3317. and will never be exported. Also entire subtrees starting with the
  3318. word @samp{COMMENT} will never be exported. Finally, any text before
  3319. the first headline will not be exported either.
  3320. @table @kbd
  3321. @kindex C-c ;
  3322. @item C-c ;
  3323. Toggle the COMMENT keyword at the beginning of an entry.
  3324. @end table
  3325. @node Enhancing text, Export options, Comment lines, Text interpretation
  3326. @subsection Enhancing text for export
  3327. @cindex enhancing text
  3328. @cindex richer text
  3329. Some of the export backends of Org-mode allow for sophisticated text
  3330. formatting, this is true in particular for the HTML backend. Org-mode
  3331. has a number of typing conventions that allow to produce a richly
  3332. formatted output.
  3333. @itemize @bullet
  3334. @cindex hand-formatted lists
  3335. @cindex lists, hand-formatted
  3336. @item
  3337. Plain lists @samp{-}, @samp{*} or @samp{+} as bullet, or with @samp{1.}
  3338. or @samp{2)} as enumerator will be recognized and transformed if the
  3339. backend supports lists. See @xref{Plain lists}.
  3340. @cindex underlined text
  3341. @cindex bold text
  3342. @cindex italic text
  3343. @item
  3344. You can make words @b{*bold*}, @i{/italic/}, _underlined_,
  3345. @code{=code=}, and @samp{+strikethrough+}.
  3346. @cindex LaTeX fragments, export
  3347. @cindex TeX macros, export
  3348. @item
  3349. Many @TeX{} macros and entire La@TeX{} fragments are converted into HTML
  3350. entities or images (@pxref{Embedded LaTeX}).
  3351. @cindex tables, export
  3352. @item
  3353. Tables are transformed into native tables under the exporter, if the
  3354. export backend supports this. Data fields before the first horizontal
  3355. separator line will be formatted as table header fields.
  3356. @cindex fixed width
  3357. @item
  3358. If a headline starts with the word @samp{QUOTE}, the text below the
  3359. headline will be typeset as fixed-width, to allow quoting of computer
  3360. codes etc. Lines starting with @samp{:} are also typeset in
  3361. fixed-width font.
  3362. @table @kbd
  3363. @kindex C-c :
  3364. @item C-c :
  3365. Toggle fixed-width for entry (QUOTE) or region, see below.
  3366. @end table
  3367. @cindex linebreak, forced
  3368. @item
  3369. A double backslash @emph{at the end of a line} enforces a line break at
  3370. this position.
  3371. @end itemize
  3372. If these conversions conflict with your habits of typing ASCII text,
  3373. they can all be turned off with corresponding variables (see the
  3374. customization group @code{org-export-general}, and the following section
  3375. which explains how to set export options with special lines in a
  3376. buffer.
  3377. @node Export options, , Enhancing text, Text interpretation
  3378. @subsection Export options
  3379. @cindex options, for export
  3380. @cindex completion, of option keywords
  3381. The exporter recognizes special lines in the buffer which provide
  3382. additional information. These lines may be put anywhere in the file.
  3383. The whole set of lines can be inserted into the buffer with @kbd{C-c
  3384. C-e t}. For individual lines, a good way to make sure the keyword is
  3385. correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
  3386. (@pxref{Completion}).
  3387. @table @kbd
  3388. @kindex C-c C-e t
  3389. @item C-c C-e t
  3390. Insert template with export options, see example below.
  3391. @end table
  3392. @example
  3393. #+TITLE: the title to be shown (default is the buffer name)
  3394. #+AUTHOR: the author (default taken from @code{user-full-name})
  3395. #+EMAIL: his/her email address (default from @code{user-mail-address})
  3396. #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
  3397. #+TEXT: Some descriptive text to be inserted at the beginning.
  3398. #+TEXT: Several lines may be given.
  3399. #+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t *:nil TeX:t LaTeX:t
  3400. @end example
  3401. @noindent
  3402. The OPTIONS line is a compact form to specify export settings. Here
  3403. you can:
  3404. @cindex headline levels
  3405. @cindex section-numbers
  3406. @cindex table of contents
  3407. @cindex linebreak preservation
  3408. @cindex quoted HTML tags
  3409. @cindex fixed-width sections
  3410. @cindex tables
  3411. @cindex @TeX{}-like syntax for sub- and superscripts
  3412. @cindex emphasized text
  3413. @cindex @TeX{} macros
  3414. @cindex La@TeX{} fragments
  3415. @example
  3416. H: @r{set the number of headline levels for export}
  3417. num: @r{turn on/off section-numbers}
  3418. toc: @r{turn on/off table of contents}
  3419. \n: @r{turn on/off linebreak-preservation}
  3420. @@: @r{turn on/off quoted HTML tags}
  3421. :: @r{turn on/off fixed-width sections}
  3422. |: @r{turn on/off tables}
  3423. ^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
  3424. *: @r{turn on/off emphasized text (bold, italic, underlined)}
  3425. TeX: @r{turn on/off simple @TeX{} macros in plain text}
  3426. LaTeX: @r{turn on/off La@TeX{} fragments}
  3427. @end example
  3428. @node Publishing, Miscellaneous, Exporting, Top
  3429. @chapter Publishing
  3430. @cindex publishing
  3431. Org-mode includes@footnote{@file{org-publish.el} is not yet part of
  3432. emacs, so if you are using @file{org.el} as it comes with Emacs, you
  3433. need to download this file separately. Also make sure org.el is at
  3434. least version 4.27.} a publishing management system
  3435. that allows you to configure automatic HTML conversion of
  3436. @emph{projects} composed of interlinked org files. This system is
  3437. called @emph{org-publish}. You can also configure org-publish to
  3438. automatically upload your exported HTML pages and related attachments,
  3439. such as images and source code files, to a web server. Org-publish turns
  3440. org-mode into a web-site authoring tool.
  3441. Org-publish has been contributed to Org-mode by David O'Toole.
  3442. @menu
  3443. * Configuration:: Defining projects
  3444. * Sample configuration:: Example projects
  3445. * Triggering publication:: Publication commands
  3446. @end menu
  3447. @node Configuration, Sample configuration, Publishing, Publishing
  3448. @section Configuration
  3449. Publishing needs significant configuration to specify files, destination
  3450. and many other properties of a project.
  3451. @menu
  3452. * Project alist:: The central configuration variable
  3453. * Sources and destinations:: From here to there
  3454. * Selecting files:: What files are part of the project?
  3455. * Publishing action:: Setting the function doing the publishing
  3456. * Publishing options:: Tweaking HTML export
  3457. * Publishing links:: Which links keep working after publishing?
  3458. * Project page index:: Publishing a list of project files
  3459. @end menu
  3460. @node Project alist, Sources and destinations, Configuration, Configuration
  3461. @subsection The variable @code{org-publish-project-alist}
  3462. @cindex org-publish-project-alist
  3463. @cindex projects, for publishing
  3464. Org-publish is configured almost entirely through setting the value of
  3465. one variable, called @code{org-publish-project-alist}.
  3466. Each element of the list configures one project, and may be in one of
  3467. the two following forms:
  3468. @lisp
  3469. ("project-name" :property value :property value ...)
  3470. @r{or}
  3471. ("project-name" :components ("project-name" "project-name" ...))
  3472. @end lisp
  3473. In both cases, projects are configured by specifying property values.
  3474. A project defines the set of files that will be published, as well as
  3475. the publishing configuration to use when publishing those files. When
  3476. a project takes the second form listed above, the individual members
  3477. of the ``components'' property are taken to be components of the
  3478. project, which group together files requiring different publishing
  3479. options. When you publish such a ``meta-project'' all the components
  3480. will also publish.
  3481. @node Sources and destinations, Selecting files, Project alist, Configuration
  3482. @subsection Sources and destinations for files
  3483. @cindex directories, for publishing
  3484. Most properties are optional, but some should always be set. In
  3485. particular, org-publish needs to know where to look for source files,
  3486. and where to put published files.
  3487. @multitable @columnfractions 0.3 0.7
  3488. @item @code{:base-directory}
  3489. @tab Directory containing publishing source files
  3490. @item @code{:publishing-directory}
  3491. @tab Directory (possibly remote) where output files will be published.
  3492. @end multitable
  3493. @noindent
  3494. @node Selecting files, Publishing action, Sources and destinations, Configuration
  3495. @subsection Selecting files
  3496. @cindex files, selecting for publishing
  3497. By default, all files with extension @file{.org} in the base directory
  3498. are considered part of the project. This can be modified by setting the
  3499. properties
  3500. @multitable @columnfractions 0.25 0.75
  3501. @item @code{:base-extension}
  3502. @tab Extension (without the dot!) of source files. This actually is a
  3503. regular expression.
  3504. @item @code{:exclude}
  3505. @tab Regular expression to match file names that should not be
  3506. published, even though they have been selected on the basis of their
  3507. extension.
  3508. @item @code{:include}
  3509. @tab List of files to be included regardless of @code{:base-extension}
  3510. and @code{:exclude}.
  3511. @end multitable
  3512. @node Publishing action, Publishing options, Selecting files, Configuration
  3513. @subsection Publishing Action
  3514. @cindex action, for publishing
  3515. Publishing means that a file is copied to the destination directory and
  3516. possibly transformed in the process. The default transformation is to
  3517. export Org-mode files as HTML files, and this is done by the function
  3518. @code{org-publish-org-to-html} which calls the HTML exporter
  3519. (@pxref{HTML export}). Other files like images only need to be copied
  3520. to the publishing destination. For non-Org-mode files, you need to
  3521. specify the publishing function.
  3522. @multitable @columnfractions 0.3 0.7
  3523. @item @code{:publishing-function}
  3524. @tab Function executing the publication of a file.
  3525. @end multitable
  3526. The function must accept two arguments: a property list containing at
  3527. least a @code{:publishing-directory} property, and the name of the file
  3528. to be published. It should take the specified file, make the necessary
  3529. transformation (if any) and place the result into the destination folder.
  3530. You can write your own publishing function, but @code{org-publish}
  3531. provides one for attachments (files that only need to be copied):
  3532. @code{org-publish-attachment}.
  3533. @node Publishing options, Publishing links, Publishing action, Configuration
  3534. @subsection Options for the HTML exporter
  3535. @cindex options, for publishing
  3536. The property list can be used to set many export options for the HTML
  3537. exporter. In most cases, these properties correspond to user variables
  3538. in Org-mode. The table below lists these properties along with the
  3539. variable they belong to. See the documentation string for the
  3540. respective variable for details.
  3541. @multitable @columnfractions 0.3 0.7
  3542. @item @code{:language} @tab @code{org-export-default-language}
  3543. @item @code{:headline-levels} @tab @code{org-export-headline-levels}
  3544. @item @code{:section-numbers} @tab @code{org-export-with-section-numbers}
  3545. @item @code{:table-of-contents} @tab @code{org-export-with-toc}
  3546. @item @code{:archived-trees} @tab @code{org-export-with-archived-trees}
  3547. @item @code{:emphasize} @tab @code{org-export-with-emphasize}
  3548. @item @code{:sub-superscript} @tab @code{org-export-with-sub-superscripts}
  3549. @item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros}
  3550. @item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments}
  3551. @item @code{:fixed-width} @tab @code{org-export-with-fixed-width}
  3552. @item @code{:timestamps} .@tab @code{org-export-with-timestamps}
  3553. @item @code{:tags} .@tab @code{org-export-with-tags}
  3554. @item @code{:tables} @tab @code{org-export-with-tables}
  3555. @item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line}
  3556. @item @code{:style} @tab @code{org-export-html-style}
  3557. @item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html}
  3558. @item @code{:inline-images} @tab @code{org-export-html-inline-images}
  3559. @item @code{:expand-quoted-html} @tab @code{org-export-html-expand}
  3560. @item @code{:timestamp} @tab @code{org-export-html-with-timestamp}
  3561. @item @code{:publishing-directory} @tab @code{org-export-publishing-directory}
  3562. @item @code{:preamble} @tab @code{org-export-html-preamble}
  3563. @item @code{:postamble} @tab @code{org-export-html-postamble}
  3564. @item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble}
  3565. @item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble}
  3566. @item @code{:author} @tab @code{user-full-name}
  3567. @item @code{:email} @tab @code{user-mail-address}
  3568. @end multitable
  3569. When a property is given a value in org-publish-project-alist, its
  3570. setting overrides the value of the corresponding user variable (if any)
  3571. during publishing. options set within a file (@pxref{Export
  3572. options}), however, override everything.
  3573. @node Publishing links, Project page index, Publishing options, Configuration
  3574. @subsection Links between published files
  3575. @cindex links, publishing
  3576. To create a link from one Org-mode file to another, you would use
  3577. something like @samp{[[file:foo.org][The foo]]} or simply
  3578. @samp{file:foo.org.} (@pxref{Hyperlinks}). Upon publishing this link
  3579. becomes a link to @file{foo.html}. In this way, you can interlink the
  3580. pages of your "org web" project and the links will work as expected when
  3581. you publish them to HTML.
  3582. You may also link to related files, such as images. Provided you are
  3583. careful with relative pathnames, and provided you have also configured
  3584. org-publish to upload the related files, these links will work
  3585. too. @ref{Complex example} for an example of this usage.
  3586. Sometime an Org-mode file to be published may contain links that are
  3587. only valid in your production environment, but not in the publishing
  3588. location. In this case, use the property
  3589. @multitable @columnfractions 0.4 0.6
  3590. @item @code{:link-validation-function}
  3591. @tab Function to validate links
  3592. @end multitable
  3593. @noindent
  3594. to define a function for checking link validity. This function must
  3595. accept two arguments, the file name and a directory relative to which
  3596. the file name is interpreted in the production environment. If this
  3597. function returns @code{nil}, then the HTML generator will only insert a
  3598. description into the HTML file, but no link. One option for this
  3599. function is @code{org-publish-validate-link} which checks if the given
  3600. file is part of any project in @code{org-publish-project-alist}.
  3601. @node Project page index, , Publishing links, Configuration
  3602. @subsection Project page index
  3603. @cindex index, of published pages
  3604. The following properties may be used to control publishing of an
  3605. index of files or summary page for a given project.
  3606. @multitable @columnfractions 0.25 0.75
  3607. @item @code{:auto-index}
  3608. @tab When non-nil, publish an index during org-publish-current-project or
  3609. org-publish-all.
  3610. @item @code{:index-filename}
  3611. @tab Filename for output of index. Defaults to @file{index.org} (which
  3612. becomes @file{index.html}).
  3613. @item @code{:index-title}
  3614. @tab Title of index page. Defaults to name of file.
  3615. @item @code{:index-function}
  3616. @tab Plugin function to use for generation of index.
  3617. Defaults to @code{org-publish-org-index}, which generates a plain list
  3618. of links to all files in the project.
  3619. @end multitable
  3620. @node Sample configuration, Triggering publication, Configuration, Publishing
  3621. @section Sample configuration
  3622. Below we provide two example configurations. The first one is a simple
  3623. project publishing only a set of Org-mode files. The second example is
  3624. more complex, with a multi-component project.
  3625. @menu
  3626. * Simple example:: One-component publishing
  3627. * Complex example:: A multi-component publishing example
  3628. @end menu
  3629. @node Simple example, Complex example, Sample configuration, Sample configuration
  3630. @subsection Example: simple publishing configuration
  3631. This example publishes a set of Org-mode files to the @file{public_html}
  3632. directory on the local machine.
  3633. @lisp
  3634. (setq org-publish-project-alist
  3635. '(("org"
  3636. :base-directory "~/org/"
  3637. :publishing-directory "~/public_html"
  3638. :section-numbers nil
  3639. :table-of-contents nil
  3640. :style "<link rel=stylesheet
  3641. href=\"../other/mystyle.css\"
  3642. type=\"text/css\">")))
  3643. @end lisp
  3644. @node Complex example, , Simple example, Sample configuration
  3645. @subsection Example: complex publishing configuration
  3646. This more complicated example publishes an entire website, including
  3647. org files converted to HTML, image files, emacs lisp source code, and
  3648. stylesheets. The publishing-directory is remote and private files are
  3649. excluded.
  3650. To ensure that links are preserved, care should be taken to replicate
  3651. your directory structure on the web server, and to use relative file
  3652. paths. For example, if your org files are kept in @file{~/org} and your
  3653. publishable images in @file{~/images}, you'd link to an image with
  3654. @c
  3655. @example
  3656. file:../images/myimage.png
  3657. @end example
  3658. @c
  3659. On the web server, the relative path to the image should be the
  3660. same. You can accomplish this by setting up an "images" folder in the
  3661. right place on the webserver, and publishing images to it.
  3662. @lisp
  3663. (setq org-publish-project-alist
  3664. '(("orgfiles"
  3665. :base-directory "~/org/"
  3666. :base-extension "org"
  3667. :publishing-directory "/ssh:user@@host:~/html/notebook/"
  3668. :publishing-function org-publish-org-to-html
  3669. :exclude "PrivatePage.org" ;; regexp
  3670. :headline-levels 3
  3671. :section-numbers nil
  3672. :table-of-contents nil
  3673. :style "<link rel=stylesheet
  3674. href=\"../other/mystyle.css\" type=\"text/css\">"
  3675. :auto-preamble t
  3676. :auto-postamble nil)
  3677. ("images"
  3678. :base-directory "~/images/"
  3679. :base-extension "jpg\\|gif\\|png"
  3680. :publishing-directory "/ssh:user@@host:~/html/images/"
  3681. :publishing-function org-publish-attachment)
  3682. ("other"
  3683. :base-directory "~/other/"
  3684. :base-extension "css\\|el"
  3685. :publishing-directory "/ssh:user@@host:~/html/other/"
  3686. :publishing-function org-publish-attachment)
  3687. ("website" :components ("orgfiles" "images" "other"))))
  3688. @end lisp
  3689. @node Triggering publication, , Sample configuration, Publishing
  3690. @section Triggering publication
  3691. Once org-publish is properly configured, you can publish with the
  3692. following functions:
  3693. @table @kbd
  3694. @item C-c C-e c
  3695. Prompt for a specific project and publish all files that belong to it.
  3696. @item C-c C-e p
  3697. Publish the project containin the current file.
  3698. @item C-c C-e f
  3699. Publish only the current file.
  3700. @item C-c C-e a
  3701. Publish all projects.
  3702. @end table
  3703. Org uses timestamps to track when a file has changed. The above
  3704. functions normally only publish changed files. You can override this and
  3705. force publishing of all files by giving a prefix argument.
  3706. @node Miscellaneous, Extensions and Hacking, Publishing, Top
  3707. @chapter Miscellaneous
  3708. @menu
  3709. * Completion:: M-TAB knows what you need
  3710. * Customization:: Adapting Org-mode to your taste
  3711. * In-buffer settings:: Overview of the #+KEYWORDS
  3712. * The very busy C-c C-c key:: When in doubt, press C-c C-c
  3713. * Clean view:: Getting rid of leading stars in the outline
  3714. * TTY keys:: Using Org-mode on a tty
  3715. * Interaction:: Other Emacs packages
  3716. * Bugs:: Things which do not work perfectly
  3717. @end menu
  3718. @node Completion, Customization, Miscellaneous, Miscellaneous
  3719. @section Completion
  3720. @cindex completion, of @TeX{} symbols
  3721. @cindex completion, of TODO keywords
  3722. @cindex completion, of dictionary words
  3723. @cindex completion, of option keywords
  3724. @cindex completion, of CamelCase links
  3725. @cindex completion, of tags
  3726. @cindex @TeX{} symbol completion
  3727. @cindex TODO keywords completion
  3728. @cindex dictionary word completion
  3729. @cindex option keyword completion
  3730. @cindex CamelCase link completion
  3731. @cindex tag completion
  3732. Org-mode supports in-buffer completion. This type of completion does
  3733. not make use of the minibuffer. You simply type a few letters into
  3734. the buffer and use the key to complete text right there.
  3735. @table @kbd
  3736. @kindex M-@key{TAB}
  3737. @item M-@key{TAB}
  3738. Complete word at point
  3739. @itemize @bullet
  3740. @item
  3741. At the beginning of a headline, complete TODO keywords.
  3742. @item
  3743. After @samp{\}, complete @TeX{} symbols supported by the exporter.
  3744. @item
  3745. After @samp{*}, complete CamelCase versions of all headlines in the
  3746. buffer.
  3747. @item
  3748. After @samp{:}, complete tags used elsewhere in the buffer.
  3749. @item
  3750. After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
  3751. @samp{OPTIONS} which set file-specific options for Org-mode. When the
  3752. option keyword is already complete, pressing @kbd{M-@key{TAB}} again
  3753. will insert example settings for this keyword.
  3754. @item
  3755. Elsewhere, complete dictionary words using ispell.
  3756. @end itemize
  3757. @end table
  3758. @node Customization, In-buffer settings, Completion, Miscellaneous
  3759. @section Customization
  3760. @cindex customization
  3761. @cindex options, for customization
  3762. @cindex variables, for customization
  3763. There are more than 100 variables that can be used to customize
  3764. Org-mode. For the sake of compactness of the manual, we are not
  3765. describing the variables here. A structured overview of customization
  3766. variables is available with @kbd{M-x org-customize}. Or select
  3767. @code{Browse Org Group} from the @code{Org->Customization} menu. Many
  3768. settings can also be activated on a per-file basis, by putting special
  3769. lines into the buffer (@pxref{In-buffer settings}).
  3770. @node In-buffer settings, The very busy C-c C-c key, Customization, Miscellaneous
  3771. @section Summary of in-buffer settings
  3772. @cindex in-buffer settings
  3773. @cindex special keywords
  3774. Org-mode uses special lines in the buffer to define settings on a
  3775. per-file basis. These lines start with a @samp{#+} followed by a
  3776. keyword, a colon, and then individual words defining a setting. Several
  3777. setting words can be in the same line, but you can also have multiple
  3778. lines for the keyword. While these settings are described throughout
  3779. the manual, here is a summary. After changing any of those lines in the
  3780. buffer, press @kbd{C-c C-c} with the cursor still in the line to
  3781. activate the changes immediately. Otherwise they become effective only
  3782. when the file is visited again in a new Emacs session.
  3783. @table @kbd
  3784. @item #+STARTUP:
  3785. This line sets options to be used at startup of org-mode, when an
  3786. Org-mode file is being visited. The first set of options deals with the
  3787. initial visibility of the outline tree. The corresponding variable for
  3788. global default settings is @code{org-startup-folded}, with a default
  3789. value @code{t}, which means @code{overview}.
  3790. @example
  3791. overview @r{top-level headlines only}
  3792. content @r{all headlines}
  3793. showall @r{no folding at all, show everything}
  3794. @end example
  3795. Then there are options for aligning tables upon visiting a file. This
  3796. is useful in files containing narrowed table columns. The corresponding
  3797. variable is @code{org-startup-align-all-tables}, with a default value
  3798. @code{nil}.
  3799. @example
  3800. align @r{align all tables}
  3801. noalign @r{don't align tables on startup}
  3802. @end example
  3803. Logging when a TODO item is marked DONE (variable @code{org-log-done})
  3804. can be configured using these options.
  3805. @example
  3806. logging @r{record a timestamp when an item is marked DONE}
  3807. nologging @r{don't record when items are marked DONE}
  3808. @end example
  3809. Here are the options for hiding leading stars in outline headings. The
  3810. corresponding variables are @code{org-hide-leading-stars} and
  3811. @code{org-odd-levels-only}, both with a default setting @code{nil}
  3812. (meaning @code{showstars} and @code{oddeven}).
  3813. @example
  3814. hidestars @r{make all but one of the stars starting a headline invisible.}
  3815. showstars @r{show all stars starting a headline}
  3816. odd @r{allow only odd outline levels (1,3,...)}
  3817. oddeven @r{allow all outline levels}
  3818. @end example
  3819. @item #+SEQ_TODO: #+TYP_TODO:
  3820. These lines set the TODO keywords and their interpretation in the
  3821. current file. The corresponding variables are @code{org-todo-keywords}
  3822. and @code{org-todo-interpretation}.
  3823. @item #+TAGS: TAG1(c1) TAG2(c2)
  3824. These lines (several such lines are allowed) specify the legal tags in
  3825. this file, and (potentially) the corresponding @emph{fast tag selection}
  3826. keys. The corresponding variable is @code{org-tag-alist}.
  3827. @item #+CATEGORY:
  3828. This line sets the category for the agenda file. The category applies
  3829. for all subsequent lines until the next @samp{#+CATEGORY} line, or the
  3830. end of the file.
  3831. @item #+TBLFM:
  3832. This line contains the formulas for the table directly above the line.
  3833. @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS:
  3834. These lines provide settings for exporting files. For more details see
  3835. @ref{Export options}.
  3836. @end table
  3837. @node The very busy C-c C-c key, Clean view, In-buffer settings, Miscellaneous
  3838. @section The very busy C-c C-c key
  3839. @kindex C-c C-c
  3840. The key @kbd{C-c C-c} has many purposes in org-mode, which are all
  3841. mentioned scattered throughout this manual. One specific function of
  3842. this key is to add @emph{tags} to a headline (@pxref{Tags}). In many
  3843. other circumstances it means something like @emph{Hey Org-mode, look
  3844. here and update according to what you see here}. Here is a summary of
  3845. what this means in different contexts.
  3846. @itemize @minus
  3847. @item
  3848. If there are highlights in the buffer from the creation of a sparse
  3849. tree, or from clock display, remove these highlights.
  3850. @item
  3851. If the cursor is in one of the special @code{#+KEYWORD} lines, this
  3852. triggers scanning the buffer for these lines and updating the
  3853. information.
  3854. @item
  3855. If the cursor is inside a table, realign the table. This command
  3856. works even if the automatic table editor has been turned off.
  3857. @item
  3858. If the cursor is on a @code{#+TBLFM} line, re-apply the formulas to
  3859. the entire table.
  3860. @item
  3861. If the cursor is inside a table created by the @file{table.el} package,
  3862. activate that table.
  3863. @item
  3864. If the current buffer is a remember buffer, close note and file it.
  3865. with a prefix argument, file it without further interaction to the default
  3866. location.
  3867. @item
  3868. If the cursor is on a @code{<<<target>>>}, update radio targets and
  3869. corresponding links in this buffer.
  3870. @item
  3871. If the cursor is in a plain list item with a checkbox, toggle the status
  3872. of the checkbox.
  3873. @item
  3874. If the cursor is on a numbered item in a plain list, renumber the
  3875. ordered list.
  3876. @end itemize
  3877. @node Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous
  3878. @section A cleaner outline view
  3879. @cindex hiding leading stars
  3880. @cindex clean outline view
  3881. Some people find it noisy and distracting that the Org-mode headlines
  3882. are starting with a potentially large number of stars. For example
  3883. the tree from @ref{Headlines}:
  3884. @example
  3885. * Top level headline
  3886. ** Second level
  3887. *** 3rd level
  3888. some text
  3889. *** 3rd level
  3890. more text
  3891. * Another top level headline
  3892. @end example
  3893. @noindent
  3894. Unfortunately this is deeply ingrained into the code of Org-mode and
  3895. cannot be easily changed. You can, however, modify the display in such
  3896. a way that all leading stars become invisible and the outline more easy
  3897. to read. To do this, customize the variable
  3898. @code{org-hide-leading-stars} like this:
  3899. @lisp
  3900. (setq org-hide-leading-stars t)
  3901. @end lisp
  3902. @noindent
  3903. or change this on a per-file basis with one of the lines (anywhere in
  3904. the buffer)
  3905. @example
  3906. #+STARTUP: showstars
  3907. #+STARTUP: hidestars
  3908. @end example
  3909. @noindent
  3910. Press @kbd{C-c C-c} with the cursor in a @samp{STARTUP} line to activate
  3911. the modifications.
  3912. With stars hidden, the tree becomes:
  3913. @example
  3914. * Top level headline
  3915. * Second level
  3916. * 3rd level
  3917. some text
  3918. * 3rd level
  3919. more text
  3920. * Another top level headline
  3921. @end example
  3922. @noindent
  3923. Note that the leading stars are not truly replaced by whitespace, they
  3924. are only fontified with the face @code{org-hide} that uses the
  3925. background color as font color. If are are not using either white or
  3926. black background, you may have to customize this face to get the wanted
  3927. effect. Another possibility is to set this font such that the extra
  3928. stars are @i{almost} invisible, for example using the color
  3929. @code{grey90} on a white background.
  3930. Things become cleaner still if you skip all the even levels and use only
  3931. odd levels 1, 3, 5..., effectively adding two stars to go from one
  3932. outline level to the next:
  3933. @example
  3934. * Top level headline
  3935. * Second level
  3936. * 3rd level
  3937. some text
  3938. * 3rd level
  3939. more text
  3940. * Another top level headline
  3941. @end example
  3942. @noindent
  3943. In order to make the structure editing and export commands handle this
  3944. convention correctly, use
  3945. @lisp
  3946. (setq org-odd-levels-only t)
  3947. @end lisp
  3948. @noindent
  3949. or set this on a per-file basis with one of the following lines (don't
  3950. forget to press @kbd{C-c C-c} with the cursor in the startup line to
  3951. activate changes immediately).
  3952. @example
  3953. #+STARTUP: odd
  3954. #+STARTUP: oddeven
  3955. @end example
  3956. You can convert an Org-mode file from single-star-per-level to the
  3957. double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels
  3958. RET} in that file. The reverse operation is @kbd{M-x
  3959. org-convert-to-oddeven-levels}.
  3960. @node TTY keys, Interaction, Clean view, Miscellaneous
  3961. @section Using org-mode on a tty
  3962. @cindex tty keybindings
  3963. Org-mode uses a number of keys that are not accessible on a tty. This
  3964. applies to most special keys like cursor keys, @key{TAB} and
  3965. @key{RET}, when these are combined with modifier keys like @key{Meta}
  3966. and/or @key{Shift}. Org-mode uses these bindings because it needs to
  3967. provide keys for a large number of commands, and because these keys
  3968. appeared particularly easy to remember. In order to still be able to
  3969. access the core functionality of Org-mode on a tty, alternative
  3970. bindings are provided. Here is a complete list of these bindings,
  3971. which are obviously more cumbersome to use. Note that sometimes a
  3972. work-around can be better. For example changing a time stamp is
  3973. really only fun with @kbd{S-@key{cursor}} keys. On a tty you would
  3974. rather use @kbd{C-c .} to re-insert the timestamp.
  3975. @multitable @columnfractions 0.15 0.2 0.2
  3976. @item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
  3977. @item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
  3978. @item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}}
  3979. @item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab
  3980. @item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{@key{Esc} @key{right}}
  3981. @item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab
  3982. @item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}}
  3983. @item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab
  3984. @item @kbd{M-@key{down}} @tab @kbd{C-c C-x d} @tab @kbd{@key{Esc} @key{down}}
  3985. @item @kbd{M-S-@key{down}} @tab @kbd{C-c C-x D} @tab
  3986. @item @kbd{S-@key{RET}} @tab @kbd{C-c C-x c} @tab
  3987. @item @kbd{M-@key{RET}} @tab @kbd{C-c C-x m} @tab @kbd{@key{Esc} @key{RET}}
  3988. @item @kbd{M-S-@key{RET}} @tab @kbd{C-c C-x M} @tab
  3989. @item @kbd{S-@key{left}} @tab @kbd{C-c C-x @key{left}} @tab
  3990. @item @kbd{S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab
  3991. @item @kbd{S-@key{up}} @tab @kbd{C-c C-x @key{up}} @tab
  3992. @item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab
  3993. @end multitable
  3994. @node Interaction, Bugs, TTY keys, Miscellaneous
  3995. @section Interaction with other packages
  3996. @cindex packages, interaction with other
  3997. Org-mode lives in the world of GNU Emacs and interacts in various ways
  3998. with other code out there.
  3999. @menu
  4000. * Cooperation:: Packages Org-mode cooperates with
  4001. * Conflicts:: Packages that lead to conflicts
  4002. @end menu
  4003. @node Cooperation, Conflicts, Interaction, Interaction
  4004. @subsection Packages that Org-mode cooperates with
  4005. @table @asis
  4006. @cindex @file{calc.el}
  4007. @item @file{calc.el} by Dave Gillespie
  4008. Org-mode uses the calc package for implementing spreadsheet
  4009. functionality in its tables (@pxref{Table calculations}). Org-modes
  4010. checks for the availability of calc by looking for the function
  4011. @code{calc-eval} which should be autoloaded in your setup if calc has
  4012. been installed properly. As of Emacs 22, calc is part of the Emacs
  4013. distribution. Another possibility for interaction between the two
  4014. packages is using calc for embedded calculations. @xref{Embedded Mode,
  4015. , Embedded Mode, calc, GNU Emacs Calc Manual}.
  4016. @cindex @file{constants.el}
  4017. @item @file{constants.el} by Carsten Dominik
  4018. In a table formula (@pxref{Table calculations}), it is possible to use
  4019. names for natural constants or units. Instead of defining your own
  4020. constants in the variable @code{org-table-formula-constants}, install
  4021. the @file{constants} package which defines a large number of constants
  4022. and units, and lets you use unit prefixes like @samp{M} for
  4023. @samp{Mega} etc. You will need version 2.0 of this package, available
  4024. at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for
  4025. the function @code{constants-get}, which has to be autoloaded in your
  4026. setup. See the installation instructions in the file
  4027. @file{constants.el}.
  4028. @item @file{cdlatex.el} by Carsten Dominik
  4029. @cindex @file{cdlatex.el}
  4030. Org-mode can make use of the cdlatex package to efficiently enter
  4031. La@TeX{} fragments into Org-mode files. See @ref{CDLaTeX mode}.
  4032. @item @file{remember.el} by John Wiegley
  4033. @cindex @file{remember.el}
  4034. Org mode cooperates with remember, see @ref{Remember}.
  4035. @file{Remember.el} is not part of Emacs, find it on the web.
  4036. @cindex @file{table.el}
  4037. @item @file{table.el} by Takaaki Ota
  4038. Org mode cooperates with table.el, see @ref{table.el}. @file{table.el}
  4039. is part of Emacs 22.
  4040. @end table
  4041. @node Conflicts, , Cooperation, Interaction
  4042. @subsection Packages that lead to conflicts with Org-mode
  4043. @table @asis
  4044. @cindex @file{allout.el}
  4045. @item @file{allout.el} by Ken Manheimer
  4046. Startup of Org-mode may fail with the error message
  4047. @code{(wrong-type-argument keymapp nil)} when there is an outdated
  4048. version @file{allout.el} on the load path, for example the version
  4049. distributed with Emacs 21.x. Upgrade to Emacs 22 and this problem will
  4050. disappear. If for some reason you cannot do this, make sure that org.el
  4051. is loaded @emph{before} @file{allout.el}, for example by putting
  4052. @code{(require 'org)} early enough into your @file{.emacs} file.
  4053. @cindex @file{CUA.el}
  4054. @item @file{CUA.el} by Kim. F. Storm
  4055. Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
  4056. used by CUA-mode (as well as pc-select-mode and s-region-mode) to
  4057. select and extend the region. If you want to use one of these
  4058. packages along with Org-mode, configure the variable
  4059. @code{org-CUA-compatible}. When set, Org-mode will move the following
  4060. keybindings in org-mode files, and in the agenda buffer (but not
  4061. during date selection).
  4062. @example
  4063. S-UP -> M-p S-DOWN -> M-n
  4064. S-LEFT -> M-- S-RIGHT -> M-+
  4065. S-RET -> C-S-RET
  4066. @end example
  4067. Yes, these are unfortunately more difficult to remember. If you want
  4068. to have other replacement keys, look at the variable
  4069. @code{org-disputed-keys}.
  4070. @item @file{windmove.el} by Hovav Shacham
  4071. @cindex @file{windmove.el}
  4072. Also this package uses the @kbd{S-<cursor>} keys, so everything written
  4073. in the paragraph above about CUA mode also applies here.
  4074. @end table
  4075. @node Bugs, , Interaction, Miscellaneous
  4076. @section Bugs
  4077. @cindex bugs
  4078. Here is a list of things that should work differently, but which I
  4079. have found too hard to fix.
  4080. @itemize @bullet
  4081. @item
  4082. If a table field starts with a link, and if the corresponding table
  4083. column is narrowed (@pxref{Narrow columns}) to a width too small to
  4084. display the link, the field would look entirely empty even though it is
  4085. not. To prevent this, Org-mode throws an error. The work-around is to
  4086. make the column wide enough to fit the link, or to add some text (at
  4087. least 2 characters) before the link in the same field.
  4088. @item
  4089. Narrowing table columns does not work on XEmacs, because the
  4090. @code{format} function does not transport text properties.
  4091. @item
  4092. Text in an entry protected with the @samp{QUOTE} keyword should not
  4093. autowrap.
  4094. @item
  4095. When the application called by @kbd{C-c C-o} to open a file link fails
  4096. (for example because the application does not exist or refuses to open
  4097. the file), it does so silently. No error message is displayed.
  4098. @item
  4099. The remote-editing commands in the agenda buffer cannot be undone with
  4100. @code{undo} called from within the agenda buffer. But you can go to
  4101. the corresponding buffer (using @key{TAB} or @key{RET} and execute
  4102. @code{undo} there.
  4103. @item
  4104. Recalculating a table line applies the formulas from left to right.
  4105. If a formula uses @emph{calculated} fields further down the row,
  4106. multiple recalculation may be needed to get all fields consistent.
  4107. @item
  4108. A single letter cannot be made bold, for example @samp{*a*}.
  4109. @item
  4110. The exporters work well, but could be made more efficient.
  4111. @end itemize
  4112. @node Extensions and Hacking, History and Acknowledgments, Miscellaneous, Top
  4113. @appendix Extensions, Hooks and Hacking
  4114. This appendix lists extensions for Org-mode written by other authors.
  4115. It also covers some aspects where users can easily extend the
  4116. functionality of Org-mode.
  4117. @menu
  4118. * Extensions:: Existing 3rd-part extensions
  4119. * Dynamic blocks:: Automatically filled blocks
  4120. @end menu
  4121. @node Extensions, Dynamic blocks, Extensions and Hacking, Extensions and Hacking
  4122. @section Third-party extensions for Org-mode
  4123. The following extensions for Org-mode have been written by other people:
  4124. @table @asis
  4125. @cindex @file{org-mouse.el}
  4126. @item @file{org-mouse.el} by Piotr Zielinski
  4127. This package implements extended mouse functionality for Org-mode. It
  4128. allows you to cycle visibility and to edit the document structure with
  4129. the mouse. Best of all, it provides a context-sensitive menu on
  4130. @key{mouse-3} that changes depending on the context of a mouse-click.
  4131. @file{org-mouse.el} is freely available at @url{http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el}.
  4132. @cindex @file{org-publish.el}
  4133. @item @file{org-publish.el} by David O'Toole
  4134. This package provides facilities for publishing related sets of Org-mode
  4135. files together with linked files like images as a webpages. It is
  4136. highly configurable and can be used for other publishing purposes as
  4137. well. As of Org-mode version 4.30, @file{org-publish.el} is part of the
  4138. Org-mode distribution. It is not yet part of Emacs, however, a delay
  4139. caused by the preparations for the 22.1 release. In the mean time,
  4140. @file{org-publish.el} can be downloaded from David's site:
  4141. @url{http://dto.freeshell.org/e/org-publish.el}.
  4142. @cindex @file{org-blog.el}
  4143. @item @file{org-blog.el} by David O'Toole
  4144. A blogging plug-in for @file{org-publish.el}.@*
  4145. @url{http://dto.freeshell.org/notebook/OrgMode.html}.
  4146. @cindex @file{org-blogging.el}
  4147. @item @file{org-blogging.el} by Bastien Guerry
  4148. Publish Org-mode files as
  4149. blogs. @url{http://www.cognition.ens.fr/~guerry/org-blogging.html}.
  4150. @end table
  4151. @node Dynamic blocks, , Extensions, Extensions and Hacking
  4152. @section Dynamic blocks
  4153. Org-mode documents can contain @emph{dynamic blocks}. These are
  4154. specially marked regions that are updated by some user-written
  4155. function. A good example for such a block is the clock table inserted
  4156. by the command @kbd{C-c C-x C-r} (@pxref{Clocking work time}).
  4157. Dynamic block are enclosed by a BEGIN-END structure that assigns a name
  4158. to the block and can also specify parameters for the function producing
  4159. the content of the block.
  4160. @example
  4161. #+BEGIN: myblock :parameter1 value1 :parameter2 value2 ...
  4162. #+END:
  4163. @end example
  4164. Dynamic blocks are updated with the following commands
  4165. @table @kbd
  4166. @kindex C-c C-x C-u
  4167. @item C-c C-x C-u
  4168. Update dynamic block at point.
  4169. @kindex C-u C-c C-x C-u
  4170. @item C-u C-c C-x C-u
  4171. Update all dynamic blocks in the current file.
  4172. @end table
  4173. Updating a dynamic block means to remove all the text between BEGIN and
  4174. END, parse the BEGIN line for parameters and then call the specific
  4175. writer function for this block to insert the new content. For a block
  4176. with name @code{myblock}, the writer function is
  4177. @code{org-dblock-write:myblock} with as only parameter a property list
  4178. with the parameters given in the begin line. Here is a trivial example
  4179. of a block that keeps track of when the block update function was last
  4180. run:
  4181. @example
  4182. #+BEGIN: block-update-time :format "on %m/%d/%Y at %H:%M"
  4183. #+END:
  4184. @end example
  4185. @noindent
  4186. The corresponding block writer function could look like this:
  4187. @lisp
  4188. (defun org-dblock-write:block-update-time (params)
  4189. (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
  4190. (insert "Last block update at: "
  4191. (format-time-string fmt (current-time)))))
  4192. @end lisp
  4193. If you want to make sure that all dynamic blocks are always up-to-date,
  4194. you could add the function @code{org-update-all-dblocks} to a hook, for
  4195. example @code{before-save-hook}. @code{org-update-all-dblocks} is
  4196. written in a way that is does nothing in buffers that are not in Org-mode.
  4197. @node History and Acknowledgments, Index, Extensions and Hacking, Top
  4198. @appendix History and Acknowledgments
  4199. @cindex acknowledgments
  4200. @cindex history
  4201. @cindex thanks
  4202. The beginnings of Org-mode go back to 2003. It was borne out of
  4203. frustration over the user interface of the emacs outline-mode. All I
  4204. wanted was to make working with an outline tree possible without having
  4205. to remember more than 10 commands just for hiding and unhiding parts of
  4206. the outline tree, and to allow to restructure a tree easily. Visibility
  4207. cycling and structure editing were originally implemented in the package
  4208. @file{outline-magic.el}, but quickly moved to the more general
  4209. @file{org.el}. TODO entries, basic time stamps, and table support were
  4210. added next, and highlight the two main goals that Org-mode still has
  4211. today: To create a new, outline-based, plain text mode with innovative
  4212. and intuitive editing features, and to incorporate project planning
  4213. functionality directly into a notes file.
  4214. Since the first release, hundreds of emails to me or on
  4215. @code{emacs-orgmode@@gnu.org} have provided a constant stream of bug
  4216. reports, feedback, new ideas, and sometimes even patches and add-on
  4217. code. Many thanks to everyone who has helped to improve this package.
  4218. I am trying to keep here a list of the people who had significant
  4219. influence in shaping one or more aspects of Org-mode. The list may not
  4220. be complete, if I have forgotten someone, please accept my apologies and
  4221. let me know.
  4222. @itemize @bullet
  4223. @item
  4224. @i{Thomas Baumann} contributed the code for links to the MH-E email
  4225. system.
  4226. @item
  4227. @i{Alex Bochannek} provided a patch for rounding time stamps.
  4228. @item
  4229. @i{Charles Cave}'s suggestion sparked the implementation of templates
  4230. for Remember.
  4231. @item
  4232. @i{Pavel Chalmoviansky} influenced the agenda treatment of items with
  4233. specified time.
  4234. @item
  4235. @i{Gregory Chernov} patched support for lisp forms into table
  4236. calculations and improved XEmacs compatibility, in particular by porting
  4237. @file{nouline.el} to XEmacs.
  4238. @item
  4239. @i{Sacha Chua} suggested to copy some linking code from Planner.
  4240. @item
  4241. @i{Kees Dullemond} inspired the use of narrowed tabled columns.
  4242. @item
  4243. @i{Christian Egli} converted the documentation into TeXInfo format,
  4244. patched CSS formatting into the HTML exporter, and inspired the agenda.
  4245. @item
  4246. @i{Nic Ferrier} contributed mailcap and XOXO support.
  4247. @item
  4248. @i{Niels Giessen} had the idea to automatically archive DONE trees.
  4249. @item
  4250. @i{Bastien Guerry} provoded extensive feedback.
  4251. @item
  4252. @i{Kai Grossjohann} pointed out key-binding conflicts caused by
  4253. Org-mode.
  4254. @item
  4255. @i{Leon Liu} asked for embedded LaTeX and tested it.
  4256. @item
  4257. @i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler
  4258. happy.
  4259. @item
  4260. @i{Todd Neal} provided patches for links to Info files and elisp forms.
  4261. @item
  4262. @i{Tim O'Callaghan} suggested in-file links, search options for general
  4263. file links, and TAGS.
  4264. @item
  4265. @i{Oliver Oppitz} suggested multi-state TODO items.
  4266. @item
  4267. @i{Scott Otterson} sparked the introduction of descriptive text for
  4268. links, among other things.
  4269. @item
  4270. @i{Pete Phillips} helped the development of the TAGS feature.
  4271. @item
  4272. @i{T.V. Raman} reported bugs and suggested improvements.
  4273. @item
  4274. @i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality
  4275. control.
  4276. @item
  4277. @i{Kevin Rogers} contributed code to access VM files on remote hosts.
  4278. @item
  4279. @i{Frank Ruell} solved the mystery of the @code{keymapp nil} bug, a
  4280. conflict with @file{allout.el}.
  4281. @item
  4282. @i{Philip Rooke} created the Org-mode reference card and provided lots
  4283. of feedback.
  4284. @item
  4285. @i{Christian Schlauer} proposed angular brackets around links, among
  4286. other things.
  4287. @item
  4288. Linking to VM/BBDB/GNUS was inspired by @i{Tom Shannon}'s
  4289. @file{organizer-mode.el}.
  4290. @item
  4291. @i{Daniel Sinder} came up with the idea of internal archiving by locking
  4292. subtrees.
  4293. @item
  4294. @i{David O'Toole} wrote @file{org-publish.el} and drafted the manual
  4295. chapter about publishing.
  4296. @item
  4297. @i{J@"urgen Vollmer} contributed code generating the table of contents
  4298. in HTML output.
  4299. @item
  4300. @i{Chris Wallace} provided a patch implementing the @samp{QUOTE}
  4301. keyword.
  4302. @item
  4303. @i{David Wainberg} suggested archiving, and improvements to the linking
  4304. system.
  4305. @item
  4306. @i{John Wiegley} wrote @file{emacs-wiki.el} and @file{planner.el}. The
  4307. development of Org-mode was fully independent, and both systems are
  4308. really different beasts in their basic ideas and implementation details.
  4309. I later looked at John's code, however, and learned from his
  4310. implementation of (i) links where the link itself is hidden and only a
  4311. description is shown, and (ii) popping up a calendar to select a date.
  4312. @item
  4313. @i{Carsten Wimmer} suggested some changes and helped fix a bug in
  4314. linking to GNUS.
  4315. @item
  4316. @i{Roland Winkler} requested additional keybindings to make Org-mode
  4317. work on a tty.
  4318. @item
  4319. @i{Piotr Zielinski} wrote @file{org-mouse.el} and showed how to follow
  4320. links with mouse-1.
  4321. @end itemize
  4322. @node Index, Key Index, History and Acknowledgments, Top
  4323. @unnumbered Index
  4324. @printindex cp
  4325. @node Key Index, , Index, Top
  4326. @chapter Key Index
  4327. @printindex ky
  4328. @bye
  4329. @ignore
  4330. arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac
  4331. @end ignore