org.texi 172 KB

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