org.texi 173 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603
  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.34
  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 AUTHOR Carsten Dominik
  15. @set MAINTAINER Carsten Dominik
  16. @set MAINTAINEREMAIL @email{dominik@@science.uva.nl}
  17. @set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer}
  18. @c %**end of header
  19. @finalout
  20. @c Macro definitions
  21. @c Subheadings inside a table.
  22. @macro tsubheading{text}
  23. @ifinfo
  24. @subsubheading \text\
  25. @end ifinfo
  26. @ifnotinfo
  27. @item @b{\text\}
  28. @end ifnotinfo
  29. @end macro
  30. @copying
  31. This manual is for Org-mode (version @value{VERSION}).
  32. Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation
  33. @quotation
  34. Permission is granted to copy, distribute and/or modify this document
  35. under the terms of the GNU Free Documentation License, Version 1.1 or
  36. any later version published by the Free Software Foundation; with no
  37. Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
  38. and with the Back-Cover Texts as in (a) below. A copy of the
  39. license is included in the section entitled ``GNU Free Documentation
  40. License.''
  41. (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
  42. this GNU Manual, like GNU software. Copies published by the Free
  43. Software Foundation raise funds for GNU development.''
  44. @end quotation
  45. @end copying
  46. @titlepage
  47. @title Org Mode Manual
  48. @subtitle Release @value{VERSION}
  49. @author by Carsten Dominik
  50. @c The following two commands start the copyright page.
  51. @page
  52. @vskip 0pt plus 1filll
  53. @insertcopying
  54. @end titlepage
  55. @c Output the table of contents at the beginning.
  56. @contents
  57. @ifnottex
  58. @node Top, Introduction, (dir), (dir)
  59. @top Org Mode Manual
  60. @insertcopying
  61. @end ifnottex
  62. @menu
  63. * Introduction:: Getting started
  64. * Document structure:: A tree works like your brain
  65. * Tables:: Pure magic for quick formatting
  66. * Hyperlinks:: Notes in context
  67. * TODO items:: Every tree branch can be a TODO item
  68. * Timestamps:: Assign date and time to items
  69. * Tags:: Tagging headlines and matching sets of tags
  70. * Agenda views:: Collecting information into views
  71. * Exporting:: Sharing and publishing of notes
  72. * Publishing:: Create a web site of linked Org-mode files
  73. * Miscellaneous:: All the rest which did not fit elsewhere
  74. * Index:: The fast road to specific information
  75. * Key Index:: Key bindings and where they are described
  76. @detailmenu
  77. --- The Detailed Node Listing ---
  78. Introduction
  79. * Summary:: Brief summary of what Org-mode does
  80. * Installation and activation:: How to install Org-mode
  81. * Feedback:: Bug reports, ideas, patches etc.
  82. Document Structure
  83. * Outlines:: Org-mode is based on outline-mode
  84. * Headlines:: How to typeset org-tree headlines
  85. * Visibility cycling:: Show and hide, much simplified
  86. * Motion:: Jumping to other headlines
  87. * Structure editing:: Changing sequence and level of headlines
  88. * Archiving:: Move done task trees to a different place
  89. * Sparse trees:: Matches embedded in context
  90. * Plain lists:: Editing hand-formatted lists
  91. Tables
  92. * Built-in table editor:: Simple tables
  93. * Narrow columns:: Stop wasting space in tables
  94. * Table calculations:: Compute a field from other fields
  95. * orgtbl-mode:: The table editor as minor mode
  96. * table.el:: Complex tables
  97. Calculations in tables
  98. * Formula syntax:: How to write a formula
  99. * Lisp formulas:: An alternative way to write formulas
  100. * Column formulas:: Formulas valid for all fields in a column
  101. * Advanced features:: Field names, parameters and automatic recalc
  102. * Named-field formulas:: Formulas valid in single fields
  103. * Editing/debugging formulas:: Changing a stored formula
  104. * Appetizer:: Taste the power of calc
  105. Hyperlinks
  106. * Link format:: How links in Org-mode are formatted
  107. * Internal links:: Links to other places in the current file
  108. * External links:: URL-like links to the world
  109. * Handling links:: Creating, inserting and following
  110. * Search options:: Linking to a specific location
  111. * Custom searches:: When the default search is not enough
  112. * Remember:: Org-trees store quick notes
  113. Internal links
  114. * Radio targets:: Make targets trigger links in plain text.
  115. * CamelCase links:: Activating CamelCase words as links
  116. TODO items
  117. * TODO basics:: Marking and displaying TODO entries
  118. * Progress logging:: Document your productivity
  119. * TODO extensions:: Workflow and assignments
  120. * Priorities:: Some things are more important than others
  121. Extended use of TODO keywords
  122. * Workflow states:: From TODO to DONE in steps
  123. * TODO types:: I do this, Fred the rest
  124. * Per file keywords:: Different files, different requirements
  125. Timestamps
  126. * Time stamps:: Assigning a time to a tree entry
  127. * Creating timestamps:: Commands which insert timestamps
  128. Tags
  129. * Tag inheritance:: Tags use the tree structure of the outline
  130. * Setting tags:: How to assign tags to a headline
  131. * Tag searches:: Searching for combinations of tags
  132. Agenda Views
  133. * Agenda files:: Files being searched for agenda information
  134. * Agenda dispatcher:: Keyboard access to agenda views
  135. * Weekly/Daily agenda:: The calendar page with current tasks
  136. * Global TODO list:: All unfinished action items
  137. * Matching headline tags:: Structured information with fine-tuned search
  138. * Timeline:: Time-sorted view for single file
  139. * Agenda commands:: Remote editing of org trees
  140. The weekly/daily agenda
  141. * Categories:: Not all tasks are equal
  142. * Time-of-day specifications:: How the agenda knows the time
  143. * Calendar/Diary integration:: Integrating Anniversaries and more
  144. * Sorting of agenda items:: The order of things
  145. Exporting
  146. * ASCII export:: Exporting to plain ASCII
  147. * HTML export:: Exporting to HTML
  148. * XOXO export:: Exporting to XOXO
  149. * iCalendar export:: Exporting in iCalendar format
  150. * Text interpretation:: How the exporter looks at the file
  151. Text interpretation by the exporter
  152. * Comment lines:: Some lines will not be exported
  153. * Enhancing text:: Subscripts, symbols and more
  154. * Export options:: How to influence the export settings
  155. Publishing
  156. * Configuration:: Defining projects
  157. * Sample configuration:: Example projects
  158. * Triggering publication:: Publication commands
  159. Configuration
  160. * Project alist:: The central configuration variable
  161. * File sources and destinations:: From here to there
  162. * Selecting files:: What files are part of the project?
  163. * Publishing action:: Setting the function doing the publishing
  164. * Publishing options:: Tweaking HTML export
  165. * Publishing links:: Which links keep working after publishing?
  166. * Project page index:: Publishing a list of project files
  167. Sample configuration
  168. * Simple example:: One-component publishing
  169. * Complex example:: A multi-component publishing example
  170. Miscellaneous
  171. * Completion:: M-TAB knows what you need
  172. * Customization:: Adapting Org-mode to your taste
  173. * Summary of in-buffer settings:: Using special lines to set options
  174. * The very busy C-c C-c key:: When in doubt, press C-c C-c
  175. * Clean view:: Getting rid of leading stars in the outline
  176. * TTY keys:: Using Org-mode on a tty
  177. * FAQ:: Frequently asked questions
  178. * Interaction:: Other Emacs packages
  179. * Bugs:: Things which do not work perfectly
  180. * Acknowledgments:: These people provided feedback and more
  181. Interaction with other packages
  182. * Extensions:: Third-party extensions for Org-mode
  183. * Cooperation:: Packages Org-mode cooperates with
  184. * Conflicts:: Packages that lead to conflicts
  185. @end detailmenu
  186. @end menu
  187. @node Introduction, Document structure, Top, Top
  188. @chapter Introduction
  189. @cindex introduction
  190. @menu
  191. * Summary:: Brief summary of what Org-mode does
  192. * Installation and activation:: How to install Org-mode
  193. * Feedback:: Bug reports, ideas, patches etc.
  194. @end menu
  195. @node Summary, Installation and activation, Introduction, Introduction
  196. @section Summary
  197. @cindex summary
  198. Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
  199. project planning with a fast and effective plain-text system.
  200. Org-mode develops organizational tasks around NOTES files that contain
  201. information about projects as plain text. Org-mode is implemented on
  202. top of outline-mode, which makes it possible to keep the content of
  203. large files well structured. Visibility cycling and structure editing
  204. help to work with the tree. Tables are easily created with a built-in
  205. table editor. Org-mode supports ToDo items, deadlines, time stamps,
  206. and scheduling. It dynamically compiles entries into an agenda that
  207. utilizes and smoothly integrates much of the Emacs calendar and diary.
  208. Plain text URL-like links connect to websites, emails, Usenet
  209. messages, BBDB entries, and any files related to the projects. For
  210. printing and sharing of notes, an Org-mode file can be exported as a
  211. structured ASCII file, as HTML, or (todo and agenda items only) as an
  212. iCalendar file. It can also serve as a publishing tool for a set of
  213. linked webpages.
  214. Org-mode keeps simple things simple. When first fired up, it should
  215. feel like a straightforward, easy to use outliner. Complexity is not
  216. imposed, but a large amount of functionality is available when you need
  217. it. Org-mode can be used on different levels and in different ways, for
  218. example:
  219. @example
  220. @r{@bullet{} as an outline extension with visibility cycling and structure editing}
  221. @r{@bullet{} as an ASCII system and table editor for taking structured notes}
  222. @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
  223. @r{@bullet{} as a TODO list editor}
  224. @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
  225. @r{@bullet{} as a simple hypertext system, with HTML export}
  226. @r{@bullet{} as a publishing tool to create a set of interlinked webpages}
  227. @end example
  228. The Org-mode table editor can be integrated into any major mode by
  229. activating the minor Orgtbl-mode.
  230. There is a website for Org-mode which provides links to the newest
  231. version of Org-mode, as well as additional information, screen shots
  232. and example files. This page is located at
  233. @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
  234. @page
  235. @node Installation and activation, Feedback, Summary, Introduction
  236. @section Installation and Activation
  237. @cindex installation
  238. @cindex autoload
  239. @cindex global keybindings
  240. @cindex keybindings, global
  241. If Org-mode is part of the Emacs distribution or an XEmacs package,
  242. you only need to copy the following lines to your @file{.emacs} file.
  243. The last two lines define @emph{global} keys for the commands
  244. @command{org-store-link} and @command{org-agenda} - please
  245. choose suitable keys yourself.
  246. @lisp
  247. ;; The following lines are always needed. Choose your own keys.
  248. (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
  249. (define-key global-map "\C-cl" 'org-store-link)
  250. (define-key global-map "\C-ca" 'org-agenda)
  251. @end lisp
  252. Furthermore, you must activate @code{font-lock-mode} in org-mode
  253. buffers, because significant functionality depends on font-locking being
  254. active. You can do this with either one of the following two lines:
  255. @lisp
  256. (global-font-lock-mode 1) ; for all buffers
  257. (add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only
  258. @end lisp
  259. If you have downloaded Org-mode from the Web, you must take additional
  260. action: Byte-compile @file{org.el} and @file{org-publish.el} and put
  261. them together with @file{org-install.el} on your load path. Then add to
  262. @file{.emacs}:
  263. @lisp
  264. ;; This line only if org-mode is not part of the X/Emacs distribution.
  265. (require 'org-install)
  266. @end lisp
  267. @cindex org-mode, turning on
  268. With this setup, all files with extension @samp{.org} will be put into
  269. Org-mode. As an alternative, make the first line of a file look like
  270. this:
  271. @example
  272. MY PROJECTS -*- mode: org; -*-
  273. @end example
  274. @noindent which will select Org-mode for this buffer no matter what
  275. the file's name is. See also the variable
  276. @code{org-insert-mode-line-in-empty-file}.
  277. @node Feedback, , Installation and activation, Introduction
  278. @section Feedback
  279. @cindex feedback
  280. @cindex bug reports
  281. @cindex maintainer
  282. @cindex author
  283. If you find problems with Org-mode, or if you have questions, remarks,
  284. or ideas about it, please contact the maintainer @value{MAINTAINER} at
  285. @value{MAINTAINEREMAIL}.
  286. For bug reports, please provide as much information as possible,
  287. including the version information of Emacs (@kbd{C-h v emacs-version
  288. @key{RET}}) and Org-mode (@kbd{C-h v org-version @key{RET}}), as well as
  289. the Org-mode related setup in @file{.emacs}. If an error occurs, a
  290. traceback can be very useful. Often a small example file helps, along
  291. with clear information about:
  292. @enumerate
  293. @item What exactly did you do?
  294. @item What did you expect to happen?
  295. @item What happened instead?
  296. @end enumerate
  297. @noindent Thank you for helping to improve this mode.
  298. @node Document structure, Tables, Introduction, Top
  299. @chapter Document Structure
  300. @cindex document structure
  301. @cindex structure of document
  302. Org-mode is based on outline mode and provides flexible commands to
  303. edit the structure of the document.
  304. @menu
  305. * Outlines:: Org-mode is based on outline-mode
  306. * Headlines:: How to typeset org-tree headlines
  307. * Visibility cycling:: Show and hide, much simplified
  308. * Motion:: Jumping to other headlines
  309. * Structure editing:: Changing sequence and level of headlines
  310. * Archiving:: Move done task trees to a different place
  311. * Sparse trees:: Matches embedded in context
  312. * Plain lists:: Editing hand-formatted lists
  313. @end menu
  314. @node Outlines, Headlines, Document structure, Document structure
  315. @section Outlines
  316. @cindex outlines
  317. @cindex outline-mode
  318. Org-mode is implemented on top of outline-mode. Outlines allow to
  319. organize a document in a hierarchical structure, which (at least for
  320. me) is the best representation of notes and thoughts. Overview over
  321. this structure is achieved by folding (hiding) large parts of the
  322. document to show only the general document structure and the parts
  323. currently being worked on. Org-mode greatly simplifies the use of
  324. outlines by compressing the entire show/hide functionality into a
  325. single command @command{org-cycle}, which is bound to the @key{TAB}
  326. key.
  327. @node Headlines, Visibility cycling, Outlines, Document structure
  328. @section Headlines
  329. @cindex headlines
  330. @cindex outline tree
  331. Headlines define the structure of an outline tree. The headlines in
  332. Org-mode start with one or more stars, on the left margin. For
  333. example:
  334. @example
  335. * Top level headline
  336. ** Second level
  337. *** 3rd level
  338. some text
  339. *** 3rd level
  340. more text
  341. * Another top level headline
  342. @end example
  343. @noindent Some people find the many stars too noisy and would prefer an
  344. outline that has whitespace followed by a single star as headline
  345. starters. @ref{Clean view} describes a setup to realize this.
  346. @node Visibility cycling, Motion, Headlines, Document structure
  347. @section Visibility cycling
  348. @cindex cycling, visibility
  349. @cindex visibility cycling
  350. @cindex trees, visibility
  351. @cindex show hidden text
  352. @cindex hide text
  353. Outlines make it possible to hide parts of the text in the buffer.
  354. Org-mode uses just two commands, bound to @key{TAB} and
  355. @kbd{S-@key{TAB}} to change the visibility in the buffer.
  356. @cindex subtree visibility states
  357. @cindex subtree cycling
  358. @cindex folded, subtree visibility state
  359. @cindex children, subtree visibility state
  360. @cindex subtree, subtree visibility state
  361. @table @kbd
  362. @kindex @key{TAB}
  363. @item @key{TAB}
  364. @emph{Subtree cycling}: Rotate current subtree between the states
  365. @example
  366. ,-> FOLDED -> CHILDREN -> SUBTREE --.
  367. '-----------------------------------'
  368. @end example
  369. The cursor must be on a headline for this to work@footnote{see, however,
  370. the option @code{org-cycle-emulate-tab}.}. When the cursor is at the
  371. beginning of the buffer and the first line is not a headline, then
  372. @key{TAB} actually runs global cycling (see below)@footnote{see the
  373. option @code{org-cycle-global-at-bob}.}. Also when called with a prefix
  374. argument (@kbd{C-u @key{TAB}}), global cycling is invoked.
  375. @cindex global visibility states
  376. @cindex global cycling
  377. @cindex overview, global visibility state
  378. @cindex contents, global visibility state
  379. @cindex show all, global visibility state
  380. @kindex S-@key{TAB}
  381. @item S-@key{TAB}
  382. @itemx C-u @key{TAB}
  383. @emph{Global cycling}: Rotate the entire buffer between the states
  384. @example
  385. ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
  386. '--------------------------------------'
  387. @end example
  388. Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
  389. @cindex show all, command
  390. @kindex C-c C-a
  391. @item C-c C-a
  392. Show all.
  393. @end table
  394. When Emacs first visits an Org-mode file, the global state is set to
  395. OVERVIEW, i.e. only the top level headlines are visible. This can be
  396. configured through the variable @code{org-startup-folded}, or on a
  397. per-file basis by adding one of the following lines anywhere in the
  398. buffer:
  399. @example
  400. #+STARTUP: overview
  401. #+STARTUP: content
  402. #+STARTUP: showall
  403. @end example
  404. @node Motion, Structure editing, Visibility cycling, Document structure
  405. @section Motion
  406. @cindex motion, between headlines
  407. @cindex jumping, to headlines
  408. @cindex headline navigation
  409. The following commands jump to other headlines in the buffer.
  410. @table @kbd
  411. @kindex C-c C-n
  412. @item C-c C-n
  413. Next heading.
  414. @kindex C-c C-p
  415. @item C-c C-p
  416. Previous heading.
  417. @kindex C-c C-f
  418. @item C-c C-f
  419. Next heading same level.
  420. @kindex C-c C-b
  421. @item C-c C-b
  422. Previous heading same level.
  423. @kindex C-c C-u
  424. @item C-c C-u
  425. Backward to higher level heading.
  426. @kindex C-c C-j
  427. @item C-c C-j
  428. Jump to a different place without changing the current outline
  429. visibility. Shows the document structure in a temporary buffer, where
  430. you can use visibility cycling (@key{TAB}) to find your destination.
  431. After pressing @key{RET}, the cursor moves to the selected location in
  432. the original buffer, and the headings hierarchy above it is made
  433. visible.
  434. @end table
  435. @node Structure editing, Archiving, Motion, Document structure
  436. @section Structure editing
  437. @cindex structure editing
  438. @cindex headline, promotion and demotion
  439. @cindex promotion, of subtrees
  440. @cindex demotion, of subtrees
  441. @cindex subtree, cut and paste
  442. @cindex pasting, of subtrees
  443. @cindex cutting, of subtrees
  444. @cindex copying, of subtrees
  445. @cindex subtrees, cut and paste
  446. @table @kbd
  447. @kindex M-@key{RET}
  448. @item M-@key{RET}
  449. Insert new heading with same level as current. If the cursor is in a
  450. plain list item, a new item is created (@pxref{Plain lists}). To force
  451. creation of a new headline, use a prefix arg, or first press @key{RET}
  452. to get to the beginning of the next line. When this command is used in
  453. the middle of a line, the line is split and the rest of the line becomes
  454. the new headline. If the command is used at the beginning of a
  455. headline, the new headline is created before the current line. If at
  456. the beginning of any other line, the content of that line is made the
  457. new heading.
  458. @kindex M-S-@key{RET}
  459. @item M-S-@key{RET}
  460. Insert new TODO entry with same level as current heading.
  461. @kindex M-@key{left}
  462. @item M-@key{left}
  463. Promote current heading by one level.
  464. @kindex M-@key{right}
  465. @item M-@key{right}
  466. Demote current heading by one level.
  467. @kindex M-S-@key{left}
  468. @item M-S-@key{left}
  469. Promote the current subtree by one level.
  470. @kindex M-S-@key{right}
  471. @item M-S-@key{right}
  472. Demote the current subtree by one level.
  473. @kindex M-S-@key{up}
  474. @item M-S-@key{up}
  475. Move subtree up (swap with previous subtree of same
  476. level).
  477. @kindex M-S-@key{down}
  478. @item M-S-@key{down}
  479. Move subtree down (swap with next subtree of same level).
  480. @kindex C-c C-x C-w
  481. @kindex C-c C-x C-k
  482. @item C-c C-x C-w
  483. @itemx C-c C-x C-k
  484. Kill subtree, i.e. remove it from buffer but save in kill ring.
  485. @kindex C-c C-x M-w
  486. @item C-c C-x M-w
  487. Copy subtree to kill ring.
  488. @kindex C-c C-x C-y
  489. @item C-c C-x C-y
  490. Yank subtree from kill ring. This does modify the level of the subtree to
  491. make sure the tree fits in nicely at the yank position. The yank
  492. level can also be specified with a prefix arg, or by yanking after a
  493. headline marker like @samp{****}.
  494. @end table
  495. @cindex region, active
  496. @cindex active region
  497. @cindex transient-mark-mode
  498. When there is an active region (transient-mark-mode), promotion and
  499. demotion work on all headlines in the region. To select a region of
  500. headlines, it is best to place both point and mark at the beginning of a
  501. line, mark at the beginning of the first headline, and point at the line
  502. just after the last headline to change. Note that when the cursor is
  503. inside a table (@pxref{Tables}), the Meta-Cursor keys have different
  504. functionality.
  505. @node Archiving, Sparse trees, Structure editing, Document structure
  506. @section Archiving
  507. @cindex archiving
  508. @cindex filing subtrees
  509. When a project represented by a (sub)tree is finished, you may want
  510. to move the tree to an archive place, either in the same file under a
  511. special top-level heading, or even to a different file.
  512. @table @kbd
  513. @kindex C-c $
  514. @item @kbd{C-c $}
  515. Archive the subtree starting at the cursor position to the location
  516. given by @code{org-archive-location}.
  517. @end table
  518. @cindex archive locations
  519. The default archive is a file in the same directory as the current
  520. file, with the name derived by appending @file{_archive} to the
  521. current file name. For information and examples on how to change
  522. this, see the documentation string of the variable
  523. @code{org-archive-location}. If you are also using the Org-mode
  524. agenda, archiving to a different file is a good way to keep archived
  525. trees from contributing agenda items.
  526. @node Sparse trees, Plain lists, Archiving, Document structure
  527. @section Sparse trees
  528. @cindex sparse trees
  529. @cindex trees, sparse
  530. @cindex folding, sparse trees
  531. @cindex occur, command
  532. An important feature of Org-mode is the ability to construct
  533. @emph{sparse trees} for selected information in an outline tree. A
  534. sparse tree means that the entire document is folded as much as
  535. possible, but the selected information is made visible along with the
  536. headline structure above it@footnote{See also the variables
  537. @code{org-show-hierarchy-above} and
  538. @code{org-show-following-heading}.}. Just try it out and you will see
  539. immediately how it works.
  540. Org-mode contains several commands creating such trees. The most
  541. basic one is @command{org-occur}:
  542. @table @kbd
  543. @kindex C-c /
  544. @item C-c /
  545. Occur. Prompts for a regexp and shows a sparse tree with all matches.
  546. If the match is in a headline, the headline is made visible. If the
  547. match is in the body of an entry, headline and body are made visible.
  548. In order to provide minimal context, also the full hierarchy of
  549. headlines above the match is shown, as well as the headline following
  550. the match. Each match is also highlighted; the highlights disappear
  551. when the buffer is changed with an editing command.
  552. @end table
  553. @noindent
  554. For frequently used sparse trees of specific search strings, you can
  555. use the variable @code{org-agenda-custom-commands} to define fast
  556. keyboard access to specific sparse trees. These commands will then be
  557. accessible through the agenda dispatcher (@pxref{Agenda dispatcher}).
  558. For example:
  559. @lisp
  560. (setq org-agenda-custom-commands
  561. '(("f" occur-tree "FIXME")))
  562. @end lisp
  563. @noindent will define the key @kbd{C-c a f} as a shortcut for creating
  564. a sparse tree matching the string @samp{FIXME}.
  565. Other commands use sparse trees as well. For example @kbd{C-c
  566. C-v} creates a sparse TODO tree (@pxref{TODO basics}).
  567. @kindex C-c C-x v
  568. @cindex printing sparse trees
  569. @cindex visible text, printing
  570. To print a sparse tree, you can use the Emacs command
  571. @code{ps-print-buffer-with-faces} which does not print invisible parts
  572. of the document @footnote{This does not work under XEmacs, because
  573. XEmacs uses selective display for outlining, not text properties.}.
  574. Or you can use the command @kbd{C-c C-x v} to export only the visible
  575. part of the document and print the resulting file.
  576. @node Plain lists, , Sparse trees, Document structure
  577. @section Plain lists
  578. @cindex plain lists
  579. @cindex lists, plain
  580. @cindex lists, ordered
  581. @cindex ordered lists
  582. Headlines define both the structure of the Org-mode file, and also lists
  583. (for example, TODO items (@pxref{TODO items}) should be created using
  584. headline levels). When taking notes, however, the plain text is
  585. sometimes easier to read with hand-formatted lists. Org-mode supports
  586. editing such lists, and the HTML exporter (@pxref{Exporting}) does
  587. parse and format them.
  588. Org-mode knows ordered and unordered lists. Unordered list items start
  589. with @samp{-}, @samp{+}, or @samp{*}@footnote{When using @samp{*} as a
  590. bullet, lines must be indented or they will be seen as top-level
  591. headlines. Also, when you are hiding leading stars to get a clean
  592. outline view, plain list items starting with a star are visually
  593. indistinguishable from true headlines. In short: even though @samp{*}
  594. is supported, it may be better not to use it for plain list items} as
  595. bullets. Ordered list items start with @samp{1.} or @samp{1)}. Items
  596. belonging to the same list must have the same indentation on the first
  597. line. In particular, if an ordered list reaches number @samp{10.}, then
  598. the 2--digit numbers must be written left-aligned with the other numbers
  599. in the list. Indentation also determines the end of a list item. It
  600. ends before the next line that is indented like the bullet/number, or
  601. less. For example:
  602. @example
  603. @group
  604. ** Lord of the Rings
  605. My favorite scenes are (in this order)
  606. 1. Eowyns fight with the witch king
  607. + this was already my favorite scene in the book
  608. + I really like Miranda Otto.
  609. 2. The attack of the Rohirrim
  610. 3. Peter Jackson being shot by Legolas
  611. - on DVD only
  612. He makes a really funny face when it happens.
  613. But in the end, not individual scenes matter but the film as a whole.
  614. @end group
  615. @end example
  616. Org-mode supports these lists by tuning filling and wrapping commands
  617. to deal with them correctly.
  618. @cindex checkboxes
  619. Every item in a plain list can be made a checkbox by starting it with
  620. the string @samp{[ ]}. The checkbox status can conveniently be toggled
  621. with @kbd{C-c C-c}.
  622. @example
  623. * Stupid mistakes when distributing a new version
  624. - [ ] update also Emacs CVS
  625. - [X] forget to update index.html on the website
  626. - [X] leaving a `(debug)' form in the code
  627. @end example
  628. The following commands act on items when the cursor is in the first line
  629. of an item (the line with the bullet or number).
  630. @table @kbd
  631. @kindex @key{TAB}
  632. @item @key{TAB}
  633. Items can be folded just like headline levels if you set the variable
  634. @code{org-cycle-include-plain-lists}. The level of an item is then
  635. given by the indentation of the bullet/number. Items are always
  636. subordinate to real headlines, however; the hierarchies remain
  637. completely separated.
  638. @kindex M-@key{RET}
  639. @item M-@key{RET}
  640. Insert new item at current level. With prefix arg, force a new heading
  641. (@pxref{Structure editing}). If this command is used in the middle of a
  642. line, the line is @emph{split} and the rest of the line becomes the new
  643. item. If this command is executed in the @emph{whitespace before a bullet or
  644. number}, the new item is created @emph{before} the current item. If the
  645. command is executed in the white space before the text that is part of
  646. an item but does not contain the bullet, a bullet is added to the
  647. current line.
  648. @kindex M-S-@key{RET}
  649. @item M-S-@key{RET}
  650. Insert a new item with a checkbox.
  651. @kindex S-@key{up}
  652. @kindex S-@key{down}
  653. @item S-@key{up}
  654. @itemx S-@key{down}
  655. Jump to the previous/next item in the current list.
  656. @kindex M-S-@key{up}
  657. @kindex M-S-@key{down}
  658. @item M-S-@key{up}
  659. @itemx M-S-@key{down}
  660. Move the item including subitems up/down (swap with previous/next item
  661. of same indentation). If the list is ordered, renumbering is
  662. automatic.
  663. @kindex M-S-@key{left}
  664. @kindex M-S-@key{right}
  665. @item M-S-@key{left}
  666. @itemx M-S-@key{right}
  667. Decrease/increase the indentation of the item, including subitems.
  668. Initially, the item tree is selected based on current indentation.
  669. When these commands are executed several times in direct succession,
  670. the initially selected region is used, even if the new indentation
  671. would imply a different hierarchy. To use the new hierarchy, break
  672. the command chain with a cursor motion or so.
  673. @kindex C-c C-c
  674. @item C-c C-c
  675. If there is a checkbox in the item line, toggle the state of the
  676. checkbox. Otherwise, if this is an ordered list, renumber the ordered
  677. list at the cursor.
  678. @end table
  679. @node Tables, Hyperlinks, Document structure, Top
  680. @chapter Tables
  681. @cindex tables
  682. @cindex editing tables
  683. Org-mode has a very fast and intuitive table editor built-in.
  684. Spreadsheet-like calculations are supported in connection with the
  685. Emacs @file{calc} package.
  686. @menu
  687. * Built-in table editor:: Simple tables
  688. * Narrow columns:: Stop wasting space in tables
  689. * Table calculations:: Compute a field from other fields
  690. * orgtbl-mode:: The table editor as minor mode
  691. * table.el:: Complex tables
  692. @end menu
  693. @node Built-in table editor, Narrow columns, Tables, Tables
  694. @section The built-in table editor
  695. @cindex table editor, builtin
  696. Org-mode makes it easy to format tables in plain ASCII. Any line with
  697. @samp{|} as the first non-white character is considered part of a
  698. table. @samp{|} is also the column separator. A table might look
  699. like this:
  700. @example
  701. | Name | Phone | Age |
  702. |-------+-------+-----|
  703. | Peter | 1234 | 17 |
  704. | Anna | 4321 | 25 |
  705. @end example
  706. A table is re-aligned automatically each time you press @key{TAB} or
  707. @key{RET} or @kbd{C-c C-c} inside the table. @key{TAB} also moves to
  708. the next field (@key{RET} to the next row) and creates new table rows
  709. at the end of the table or before horizontal lines. The indentation
  710. of the table is set by the first line. Any line starting with
  711. @samp{|-} is considered as a horizontal separator line and will be
  712. expanded on the next re-align to span the whole table width. So, to
  713. create the above table, you would only type
  714. @example
  715. |Name|Phone|Age
  716. |-
  717. @end example
  718. @noindent and then press @key{TAB} to align the table and start filling in
  719. fields.
  720. When typing text into a field, Org-mode treats @key{DEL},
  721. @key{Backspace}, and all character keys in a special way, so that
  722. inserting and deleting avoids shifting other fields. Also, when
  723. typing @emph{immediately after the cursor was moved into a new field
  724. with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
  725. field is automatically made blank. If this behavior is too
  726. unpredictable for you, configure the variables
  727. @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
  728. @table @kbd
  729. @tsubheading{Creation and conversion}
  730. @kindex C-c |
  731. @item C-c |
  732. Convert the active region to table. If every line contains at least one
  733. TAB character, the function assumes that the material is tab separated.
  734. If not, lines are split at whitespace into fields. You can use a prefix
  735. argument to indicate the minimum number of consecutive spaces required
  736. to identify a field separator (default: just one).@*
  737. If there is no active region, this command creates an empty Org-mode
  738. table. But it's easier just to start typing, like
  739. @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
  740. @tsubheading{Re-aligning and field motion}
  741. @kindex C-c C-c
  742. @item C-c C-c
  743. Re-align the table without moving the cursor.
  744. @kindex @key{TAB}
  745. @item @key{TAB}
  746. Re-align the table, move to the next field. Creates a new row if
  747. necessary.
  748. @kindex S-@key{TAB}
  749. @item S-@key{TAB}
  750. Re-align, move to previous field.
  751. @kindex @key{RET}
  752. @item @key{RET}
  753. Re-align the table and move down to next row. Creates a new row if
  754. necessary. At the beginning or end of a line, @key{RET} still does
  755. NEWLINE, so it can be used to split a table.
  756. @tsubheading{Column and row editing}
  757. @kindex M-@key{left}
  758. @kindex M-@key{right}
  759. @item M-@key{left}
  760. @itemx M-@key{right}
  761. Move the current column left/right.
  762. @kindex M-S-@key{left}
  763. @item M-S-@key{left}
  764. Kill the current column.
  765. @kindex M-S-@key{right}
  766. @item M-S-@key{right}
  767. Insert a new column to the left of the cursor position.
  768. @kindex M-@key{up}
  769. @kindex M-@key{down}
  770. @item M-@key{up}
  771. @itemx M-@key{down}
  772. Move the current row up/down.
  773. @kindex M-S-@key{up}
  774. @item M-S-@key{up}
  775. Kill the current row or horizontal line.
  776. @kindex M-S-@key{down}
  777. @item M-S-@key{down}
  778. Insert a new row above (with arg: below) the current row.
  779. @kindex C-c -
  780. @item C-c -
  781. Insert a horizontal line below current row. With prefix arg, the line
  782. is created above the current line.
  783. @kindex C-c ^
  784. @item C-c ^
  785. Sort the table lines in the region. Point and mark must be in the first
  786. and last line to be included, and must be in the column that should be
  787. used for sorting. The command prompts for numerical versus
  788. alphanumerical sorting.
  789. @tsubheading{Regions}
  790. @kindex C-c C-x M-w
  791. @item C-c C-x M-w
  792. Copy a rectangular region from a table to a special clipboard. Point
  793. and mark determine edge fields of the rectangle. The process ignores
  794. horizontal separator lines.
  795. @kindex C-c C-x C-w
  796. @item C-c C-x C-w
  797. Copy a rectangular region from a table to a special clipboard, and
  798. blank all fields in the rectangle. So this is the ``cut'' operation.
  799. @kindex C-c C-x C-y
  800. @item C-c C-x C-y
  801. Paste a rectangular region into a table.
  802. The upper right corner ends up in the current field. All involved fields
  803. will be overwritten. If the rectangle does not fit into the present table,
  804. the table is enlarged as needed. The process ignores horizontal separator
  805. lines.
  806. @kindex C-c C-q
  807. @item C-c C-q
  808. Wrap several fields in a column like a paragraph. If there is an active
  809. region, and both point and mark are in the same column, the text in the
  810. column is wrapped to minimum width for the given number of lines. A
  811. prefix ARG may be used to change the number of desired lines. If there
  812. is no region, the current field is split at the cursor position and the
  813. text fragment to the right of the cursor is prepended to the field one
  814. line down. If there is no region, but you specify a prefix ARG, the
  815. current field is made blank, and the content is appended to the field
  816. above.
  817. @tsubheading{Calculations}
  818. @cindex formula, in tables
  819. @cindex calculations, in tables
  820. @kindex C-c =
  821. @item C-c =
  822. Install a new formula for the current column and replace current field
  823. with the result of the formula.
  824. @kindex C-u C-c =
  825. @item C-u C-c =
  826. Install a new formula for the current field, which must be a named
  827. field. Evaluate the formula and replace the field content with the
  828. result.
  829. @kindex C-c '
  830. @item C-c '
  831. Edit all formulas associated with the current table in a separate
  832. buffer.
  833. @kindex C-c *
  834. @item C-c *
  835. Recalculate the current row by applying the stored formulas from left
  836. to right. When called with a @kbd{C-u} prefix, recalculate the
  837. entire table, starting with the first non-header line (i.e. below the
  838. first horizontal separator line). For details, see @ref{Table calculations}.
  839. @kindex C-#
  840. @item C-#
  841. Rotate the calculation mark in first column through the states
  842. @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}. For the meaning of
  843. these marks see @ref{Advanced features}. When there is an active
  844. region, change all marks in the region.
  845. @kindex C-c ?
  846. @item C-c ?
  847. Which table column is the cursor in? Displays number >0 in echo
  848. area.
  849. @cindex region, active
  850. @cindex active region
  851. @cindex transient-mark-mode
  852. @kindex C-c +
  853. @item C-c +
  854. Sum the numbers in the current column, or in the rectangle defined by
  855. the active region. The result is shown in the echo area and can
  856. be inserted with @kbd{C-y}.
  857. @kindex S-@key{RET}
  858. @item S-@key{RET}
  859. When current field is empty, copy from first non-empty field above.
  860. When not empty, copy current field down to next row and move cursor
  861. along with it. Depending on the variable
  862. @code{org-table-copy-increment}, integer field values will be
  863. incremented during copy. This key is also used by CUA-mode
  864. (@pxref{Cooperation}).
  865. @tsubheading{Miscellaneous}
  866. @kindex C-c `
  867. @item C-c `
  868. Edit the current field in a separate window. This is useful for fields
  869. that are not fully visible (@pxref{Narrow columns}). When called with a
  870. @kbd{C-u} prefix, just make the full field visible, so that it can be
  871. edited in place.
  872. @kindex C-c @key{TAB}
  873. @item C-c @key{TAB}
  874. This is an alias for @kbd{C-u C-c `} to make the current field fully
  875. visible.
  876. @item M-x org-table-import
  877. Import a file as a table. The table should be TAB- or whitespace
  878. separated. Useful, for example, to import an Excel table or data from a
  879. database, because these programs generally can write TAB-separated text
  880. files. This command works by inserting the file into the buffer and
  881. then converting the region to a table. Any prefix argument is passed on
  882. to the converter, which uses it to determine the separator.
  883. @item M-x org-table-export
  884. Export the table as a TAB-separated file. Useful for data exchange with,
  885. for example, Excel or database programs.
  886. @end table
  887. If you don't like the automatic table editor because it gets in your
  888. way on lines which you would like to start with @samp{|}, you can turn
  889. it off with
  890. @lisp
  891. (setq org-enable-table-editor nil)
  892. @end lisp
  893. @noindent Then the only table command that still works is
  894. @kbd{C-c C-c} to do a manual re-align.
  895. @node Narrow columns, Table calculations, Built-in table editor, Tables
  896. @section Narrow columns
  897. @cindex narrow columns in tables
  898. The width of columns is automatically determined by the table editor.
  899. Sometimes a single field or a few fields need to carry more text,
  900. leading to inconveniently wide columns. To limit@footnote{This feature
  901. does not work on XEmacs.} the width of a column, one field anywhere in
  902. the column may contain just the string @samp{<N>} where @samp{N} is an
  903. integer specifying the width of the column in characters. The next
  904. re-align will then set the width of this column to no more than this
  905. value.
  906. @example
  907. |---+------------------------------| |---+--------|
  908. | | | | | <6> |
  909. | 1 | one | | 1 | one |
  910. | 2 | two | ----\ | 2 | two |
  911. | 3 | This is a long chunk of text | ----/ | 3 | This=> |
  912. | 4 | four | | 4 | four |
  913. |---+------------------------------| |---+--------|
  914. @end example
  915. @noindent
  916. Fields that are wider become clipped and end in the string @samp{=>}.
  917. Note that the full text is still in the buffer, it is only invisible.
  918. To see the full text, hold the mouse over the field - a tooltip window
  919. will show the full content. To edit such a field, use the command
  920. @kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will
  921. open a new window with the full field. Edit it and finish with @kbd{C-c
  922. C-c}.
  923. When visiting a file containing a table with narrowed columns, the
  924. necessary character hiding has not yet happened, and the table needs to
  925. be aligned before it looks nice. Setting the option
  926. @code{org-startup-align-all-tables} will realign all tables in a file
  927. upon visiting, but also slow down startup. You can also set this option
  928. on a per-file basis with:
  929. @example
  930. #+STARTUP: align
  931. #+STARTUP: noalign
  932. @end example
  933. @node Table calculations, orgtbl-mode, Narrow columns, Tables
  934. @section Calculations in tables
  935. @cindex calculations, in tables
  936. @cindex spreadsheet capabilities
  937. @cindex @file{calc} package
  938. The table editor makes use of the Emacs @file{calc} package to implement
  939. spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to
  940. derive fields from other fields. Org-mode has two levels of complexity
  941. for table calculations. On the basic level, tables do only horizontal
  942. computations, so a field can be computed from other fields @emph{in the
  943. same row}, and Org-mode assumes that there is only one formula for each
  944. column. This is very efficient to work with and enough for many tasks.
  945. On the complex level, columns and individual fields can be named for
  946. easier referencing in formulas, individual named fields can have their
  947. own formula associated with them, and recalculation can be automated.
  948. @menu
  949. * Formula syntax:: How to write a formula
  950. * Lisp formulas:: An alternative way to write formulas
  951. * Column formulas:: Formulas valid for all fields in a column
  952. * Advanced features:: Field names, parameters and automatic recalc
  953. * Named-field formulas:: Formulas valid in single fields
  954. * Editing/debugging formulas:: Changing a stored formula
  955. * Appetizer:: Taste the power of calc
  956. @end menu
  957. @node Formula syntax, Lisp formulas, Table calculations, Table calculations
  958. @subsection Formula syntax
  959. @cindex formula syntax
  960. @cindex syntax, of formulas
  961. A formula can be any algebraic expression understood by the Emacs
  962. @file{calc} package. Note that @file{calc} has the slightly
  963. non-standard convention that @samp{/} has lower precedence than
  964. @samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before
  965. evaluation by @code{calc-eval} (@pxref{Calling Calc from Your
  966. Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs
  967. Calc Manual}), variable substitution takes place:
  968. @example
  969. $ @r{refers to the current field}
  970. $3 @r{refers to the field in column 3 of the current row}
  971. $3..$7 @r{a vector of the fields in columns 3-7 of current row}
  972. $P1..$P3 @r{vector of column range, using column names}
  973. &2 @r{second data field above the current, in same column}
  974. &5-2 @r{vector from fifth to second field above current}
  975. &III-II @r{vector of fields between 2nd and 3rd hline above}
  976. &III @r{vector of fields between third hline above and current field}
  977. $name @r{a named field, parameter or constant}
  978. @end example
  979. @cindex vectors, in table calculations
  980. The range vectors can be directly fed into the calc vector functions
  981. like @samp{vmean} and @samp{vsum}.
  982. @cindex name, of column or field
  983. @cindex constants, in calculations
  984. @samp{$name} is interpreted as the name of a column, parameter or
  985. constant. Constants are defined globally through the variable
  986. @code{org-table-formula-constants}. If you have the
  987. @file{constants.el} package, it will also be used to resolve
  988. constants, including natural constants like @samp{$h} for Planck's
  989. constant, and units like @samp{$km} for kilometers. Column names and
  990. parameters can be specified in special table lines. These are
  991. described below, see @ref{Advanced features}.
  992. @cindex format specifier
  993. @cindex mode, for @file{calc}
  994. A formula can contain an optional mode string after a semicolon. This
  995. string consists of flags to influence calc's modes@footnote{By
  996. default, Org-mode uses the standard calc modes (precision 12, angular
  997. units degrees, fraction and symbolic modes off). The display format,
  998. however, has been changed to @code{(float 5)} to keep tables compact.
  999. The default settings can be configured using the variable
  1000. @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to
  1001. switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
  1002. @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
  1003. or fixed display format, respectively, and @samp{D}, @samp{R}, @samp{F},
  1004. and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
  1005. respectively. In addition, you may provide a @code{printf} format
  1006. specifier to reformat the final result. A few examples:
  1007. @example
  1008. $1+$2 @r{Sum of first and second field}
  1009. $1+$2;%.2f @r{Same, format result to two decimals}
  1010. exp($2)+exp($1) @r{Math functions can be used}
  1011. $;%.1f @r{Reformat current cell to 1 decimal}
  1012. ($3-32)*5/9 @r{Degrees F -> C conversion}
  1013. $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}}
  1014. tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1}
  1015. sin($1);Dp3%.1e @r{Same, but use printf specifier for display}
  1016. vmean($2..$7) @r{Compute column range mean, using vector function}
  1017. vsum(&III) @r{Sum numbers from 3rd hline above, up to here}
  1018. taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree}
  1019. @end example
  1020. @node Lisp formulas, Column formulas, Formula syntax, Table calculations
  1021. @subsection Emacs Lisp forms as formulas
  1022. @cindex Lisp forms, as table formulas
  1023. It is also possible to write a formula in Emacs lisp; this can be useful
  1024. for string manipulation and control structures. If a formula starts
  1025. with a single quote followed by an opening parenthesis, then it is
  1026. evaluated as a lisp form. The evaluation should return either a string
  1027. or a number. Just as with @file{calc} formulas, you can provide a
  1028. format specifier after a semicolon. A few examples:
  1029. @example
  1030. @r{swap the first two characters of the content of column 1}
  1031. '(concat (substring "$1" 1 2) (substring "$1" 0 1) (substring "$1" 2))
  1032. @r{Add columns 1 and 2, equivalent to the calc's @code{$1+$2}}
  1033. '(+ $1 $2)
  1034. @end example
  1035. @node Column formulas, Advanced features, Lisp formulas, Table calculations
  1036. @subsection Column formulas
  1037. @cindex column formula
  1038. @cindex formula, for table column
  1039. To apply a formula to a field, type it directly into the field,
  1040. preceded by an equal sign, like @samp{=$1+$2}. When you press
  1041. @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
  1042. field, the formula will be stored as the formula for the current
  1043. column, evaluated and the current field replaced with the result. If
  1044. the field contains only @samp{=}, the previously stored formula for
  1045. this column is used.
  1046. For each column, Org-mode will remember the most recently used
  1047. formula. The information is stored in a special line starting with
  1048. @samp{#+TBLFM} directly below the table. When adding/deleting/moving
  1049. columns with the appropriate commands, the stored equations will be
  1050. modified accordingly. When a column used in a calculation is removed,
  1051. references to this column become invalid and will cause an error upon
  1052. applying the equation.
  1053. Instead of typing an equation into the field, you may also use the
  1054. command @kbd{C-c =}. It prompts for a formula (with default taken
  1055. from the @samp{#+TBLFM:} line) and applies it to the current field. A
  1056. numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
  1057. subsequent fields in the current column.
  1058. @cindex recomputing table fields
  1059. To recompute all the fields in a line, use the command @kbd{C-c *}.
  1060. It re-applies all stored equations to the current row, from left to
  1061. right. With a @kbd{C-u} prefix, this will be done to every line in
  1062. the table, so use this command it you want to make sure the entire
  1063. table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
  1064. entire table. Global updating does not touch the line(s) above the
  1065. first horizontal separator line, assuming that this is the table
  1066. header.
  1067. @node Advanced features, Named-field formulas, Column formulas, Table calculations
  1068. @subsection Advanced features
  1069. If you want the recalculation of fields to happen automatically,
  1070. or if you want to be able to assign a formula to an individual field
  1071. (instead of an entire column) you need to reserve the first column of
  1072. the table for special marking characters. Here is an example of a
  1073. table that collects exam results of students and makes use of these
  1074. features:
  1075. @example
  1076. @group
  1077. |---+---------+--------+--------+--------+-------+------|
  1078. | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
  1079. |---+---------+--------+--------+--------+-------+------|
  1080. | ! | | P1 | P2 | P3 | Tot | |
  1081. | # | Maximum | 10 | 15 | 25 | 50 | 10.0 |
  1082. | ^ | | m1 | m2 | m3 | mt | |
  1083. |---+---------+--------+--------+--------+-------+------|
  1084. | # | Peter | 10 | 8 | 23 | 41 | 8.2 |
  1085. | # | Sara | 6 | 14 | 19 | 39 | 7.8 |
  1086. | # | Sam | 2 | 4 | 3 | 9 | 1.8 |
  1087. |---+---------+--------+--------+--------+-------+------|
  1088. | | Average | | | | 29.7 | |
  1089. | ^ | | | | | at | |
  1090. | $ | max=50 | | | | | |
  1091. |---+---------+--------+--------+--------+-------+------|
  1092. #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
  1093. @end group
  1094. @end example
  1095. @noindent @b{Important}: Please note that for these special tables,
  1096. recalculating the table with @kbd{C-u C-c *} will only affect rows
  1097. that are marked @samp{#} or @samp{*}, and named fields. The column
  1098. formulas are not applied in rows with empty first field.
  1099. @cindex marking characters, tables
  1100. The marking characters have the following meaning:
  1101. @table @samp
  1102. @item !
  1103. The fields in this line define names for the columns, so that you may
  1104. refer to a column as @samp{$Tot} instead of @samp{$6}.
  1105. @item ^
  1106. This row defines names for the fields @emph{above} the row. With such
  1107. a definition, any formula in the table may use @samp{$m1} to refer to
  1108. the value @samp{10}. Also, named fields can have their own formula
  1109. associated with them.
  1110. @item _
  1111. Similar to @samp{^}, but defines names for the fields in the row
  1112. @emph{below}.
  1113. @item $
  1114. Fields in this row can define @emph{parameters} for formulas. For
  1115. example, if a field in a @samp{$} row contains @samp{max=50}, then
  1116. formulas in this table can refer to the value 50 using @samp{$max}.
  1117. Parameters work exactly like constants, only that they can be defined on
  1118. a per-table basis. Changing a parameter and then recalculating the
  1119. table can be useful.
  1120. @item #
  1121. Fields in this row are automatically recalculated when pressing
  1122. @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row
  1123. is selected for a global recalculation with @kbd{C-u C-c *}. Unmarked
  1124. lines will be left alone by this command.
  1125. @item *
  1126. Selects this line for global recalculation with @kbd{C-u C-c *}, but
  1127. not for automatic recalculation. Use this when automatic
  1128. recalculation slows down editing too much.
  1129. @item
  1130. Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}.
  1131. All lines that should be recalculated should be marked with @samp{#}
  1132. or @samp{*}.
  1133. @end table
  1134. @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
  1135. @subsection Named-field formulas
  1136. @cindex named field formula
  1137. @cindex formula, for named table field
  1138. A named field can have its own formula associated with it. In the
  1139. example above, this is used for the @samp{at} field that contains
  1140. the average result of the students. To enter a formula for a named
  1141. field, just type it into the buffer, preceded by @samp{:=}. Or use
  1142. @kbd{C-u C-c =}. This equation will be stored below the table like
  1143. @samp{$name=...}. Any recalculation in the table (even if only
  1144. requested for the current line) will also update all named field
  1145. formulas.
  1146. @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
  1147. @subsection Editing and debugging formulas
  1148. @cindex formula editing
  1149. @cindex editing, of table formulas
  1150. To edit a column or field formula, use the commands @kbd{C-c
  1151. =} and @kbd{C-u C-c =}, respectively. The currently active expression
  1152. is then presented as default in the minibuffer, where it may be edited.
  1153. Note that making a table field blank does not remove the formula
  1154. associated with the field - during the next recalculation the field
  1155. will be filled again. To remove a formula from a field, you have to
  1156. give an empty reply when prompted for the formula, or to edit the
  1157. @samp{#+TBLFM} line.
  1158. @kindex C-c C-c
  1159. You may edit the @samp{#+TBLFM} directly and re-apply
  1160. the changed equations with @kbd{C-c C-c} in that line, or with the
  1161. normal recalculation commands in the table.
  1162. @kindex C-c '
  1163. @kindex C-c C-c
  1164. @kindex C-c C-q
  1165. @kindex C-c ?
  1166. In particular for large tables with many formulas, it is convenient to
  1167. use the command @kbd{C-c '} to edit the formulas of the current table
  1168. in a separate buffer. That buffer will show the formulas one per
  1169. line, and you are free to edit, add and remove formulas. Press
  1170. @kbd{C-c ?} on a @samp{$...} expression to get information about its
  1171. interpretation. Exiting the buffer with @kbd{C-c C-c} only stores the
  1172. modified formulas below the table. Exiting with @kbd{C-u C-c C-c}
  1173. also applies them to the entire table. @kbd{C-c C-q} exits without
  1174. installing the changes.
  1175. When the evaluation of a formula leads to an error, the field content
  1176. becomes the string @samp{#ERROR}. If you would like see what is going
  1177. on during variable substitution and calculation in order to find a
  1178. bug, turn on formula debugging in the menu and repeat the calculation,
  1179. for example by pressing @kbd{C-c = @key{RET}} in a field.
  1180. Detailed information will be displayed.
  1181. @node Appetizer, , Editing/debugging formulas, Table calculations
  1182. @subsection Appetizer
  1183. Finally, just to whet your appetite on what can be done with the fantastic
  1184. @file{calc} package, here is a table that computes the Taylor series
  1185. for a couple of functions (homework: try that with Excel :-)
  1186. @example
  1187. @group
  1188. |---+-------------+---+-----+--------------------------------------|
  1189. | | Func | n | x | Result |
  1190. |---+-------------+---+-----+--------------------------------------|
  1191. | # | exp(x) | 1 | x | 1 + x |
  1192. | # | exp(x) | 2 | x | 1 + x + x^2 / 2 |
  1193. | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 |
  1194. | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
  1195. | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 |
  1196. | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 |
  1197. |---+-------------+---+-----+--------------------------------------|
  1198. #+TBLFM: $5=taylor($2,$4,$3);n3
  1199. @end group
  1200. @end example
  1201. @node orgtbl-mode, table.el, Table calculations, Tables
  1202. @section The Orgtbl minor mode
  1203. @cindex orgtbl-mode
  1204. @cindex minor mode for tables
  1205. If you like the intuitive way the Org-mode table editor works, you
  1206. might also want to use it in other modes like text-mode or mail-mode.
  1207. The minor mode Orgtbl-mode makes this possible. You can always toggle
  1208. the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
  1209. example in mail mode, use
  1210. @lisp
  1211. (add-hook 'mail-mode-hook 'turn-on-orgtbl)
  1212. @end lisp
  1213. @node table.el, , orgtbl-mode, Tables
  1214. @section The @file{table.el} package
  1215. @kindex C-c C-c
  1216. @cindex table editor, @file{table.el}
  1217. @cindex @file{table.el}
  1218. Complex ASCII tables with automatic line wrapping, column- and
  1219. row-spanning, and alignment can be created using the Emacs table
  1220. package by Takaaki Ota (@uref{http://sourceforge.net/projects/table},
  1221. and also part of Emacs 22).
  1222. When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
  1223. will call @command{table-recognize-table} and move the cursor into the
  1224. table. Inside a table, the keymap of Org-mode is inactive. In order
  1225. to execute Org-mode-related commands, leave the table.
  1226. @table @kbd
  1227. @kindex C-c C-c
  1228. @item C-c C-c
  1229. Recognize @file{table.el} table. Works when the cursor is in a
  1230. table.el table.
  1231. @kindex C-c ~
  1232. @item C-c ~
  1233. Insert a table.el table. If there is already a table at point, this
  1234. command converts it between the table.el format and the Org-mode
  1235. format. See the documentation string of the command
  1236. @code{org-convert-table} for the restrictions under which this is
  1237. possible.
  1238. @end table
  1239. @node Hyperlinks, TODO items, Tables, Top
  1240. @chapter Hyperlinks
  1241. @cindex hyperlinks
  1242. Just like HTML, Org-mode provides links inside a file, and external
  1243. links to other files, Usenet articles, emails, and much more.
  1244. @menu
  1245. * Link format:: How links in Org-mode are formatted
  1246. * Internal links:: Links to other places in the current file
  1247. * External links:: URL-like links to the world
  1248. * Handling links:: Creating, inserting and following
  1249. * Search options:: Linking to a specific location
  1250. * Custom searches:: When the default search is not enough
  1251. * Remember:: Org-trees store quick notes
  1252. @end menu
  1253. @node Link format, Internal links, Hyperlinks, Hyperlinks
  1254. @section Link format
  1255. @cindex link format
  1256. @cindex format, of links
  1257. Org-mode will recognize plain URL-like links and activate them as
  1258. clickable links. The general link format, however, looks like this:
  1259. @example
  1260. [[link][description]] @r{or alternatively} [[link]]
  1261. @end example
  1262. Once a link in the buffer is complete (all brackets present), Org-mode
  1263. will change the display so that @samp{description} is displayed instead
  1264. of @samp{[[link][description]]} and @samp{link} is displayed instead of
  1265. @samp{[[link]]}. Links will be highlighted in the face @code{org-link},
  1266. which by default is an underlined face. You can directly edit the
  1267. visible part of a link. Note that this can be either the @samp{link}
  1268. part (if there is not description) or the @samp{description} part. To
  1269. edit also the invisible @samp{link} part, use @kbd{C-c C-l} with the
  1270. cursor on the link.
  1271. If you place the cursor at the beginning or just behind the end of the
  1272. displayed text and press @key{BACKSPACE}, you will remove the
  1273. (invisible) bracket at that location. This makes the link incomplete
  1274. and the internals are again displayed as plain text. Inserting the
  1275. missing bracket hides the link internals again. To show the
  1276. internal structure of all links, use the menu entry
  1277. @code{Org->Hyperlinks->Literal links}.
  1278. @node Internal links, External links, Link format, Hyperlinks
  1279. @section Internal links
  1280. @cindex internal links
  1281. @cindex links, internal
  1282. @cindex CamelCase links
  1283. If the link does not look like a URL, it is considered to be internal in
  1284. the current file. Links such as @samp{[[My Target]]} or @samp{[[My
  1285. Target][Find my target]]} lead to a text search in the current file.
  1286. The link can be followed with @kbd{C-c C-o} when the cursor is on the
  1287. link, or with a mouse click (@pxref{Handling links}). The preferred
  1288. match for such a link is a dedicated target: the same string in double
  1289. angular brackets. Targets may be located anywhere; often it is
  1290. convenient to put them into a comment line. For example
  1291. @example
  1292. # <<My Target>>
  1293. @end example
  1294. @noindent In HTML export (@pxref{HTML export}), such targets will become
  1295. named anchors for direct access through @samp{http} links@footnote{Note
  1296. that text before the first headline will never be exported, so the first
  1297. such target must be after the first headline.}.
  1298. If no dedicated target exists, Org-mode will search for the words in the
  1299. link. In the above example the search would be for @samp{my target}.
  1300. Links starting with a star like @samp{*My Target} restrict the search to
  1301. headlines. When searching, Org-mode will first try an exact match, but
  1302. then move on to more and more lenient searches. For example, the link
  1303. @samp{[[*My Targets]]} will find any of the following:
  1304. @example
  1305. ** My targets
  1306. ** TODO my targets are bright
  1307. ** my 20 targets are
  1308. @end example
  1309. To insert a link targeting a headline, in-buffer completion can be used.
  1310. Just type a star followed by a few optional letters into the buffer and
  1311. press @kbd{M-@key{TAB}}. All headlines in the current buffer will be
  1312. offered as completions. @xref{Handling links}, for more commands
  1313. creating links.
  1314. Following a link pushes a mark onto Org-mode's own mark ring. You can
  1315. return to the previous position with @kbd{C-c &}. Using this command
  1316. several times in direct succession goes back to positions recorded
  1317. earlier.
  1318. @menu
  1319. * Radio targets:: Make targets trigger links in plain text.
  1320. * CamelCase links:: Activating CamelCase words as links
  1321. @end menu
  1322. @node Radio targets, CamelCase links, Internal links, Internal links
  1323. @subsection Radio targets
  1324. You can configure Org-mode to link any occurrences of certain target
  1325. names in normal text. So without explicitly creating a link, the text
  1326. connects to the target radioing its position. Radio targets are
  1327. enclosed by triple angular brackets. For example, a target
  1328. @samp{<<<My Target>>>} causes each occurrence of @samp{my target} in
  1329. normal text to become activated as a link. The Org-mode file is
  1330. scanned automatically for radio targets only when the file is first
  1331. loaded into Emacs. To update the target list during editing, press
  1332. @kbd{C-c C-c} with the cursor on or at a target.
  1333. @node CamelCase links, , Radio targets, Internal links
  1334. @subsection CamelCase words as links
  1335. @cindex completion, of CamelCase links
  1336. @cindex CamelCase links, completion of
  1337. Org-mode also supports CamelCase words as links. This feature is not
  1338. turned on by default because of the inconsistencies this system suffers
  1339. from. To activate CamelCase words as links, you need to customize
  1340. the option @code{org-activate-links}. A CamelCase word then leads to a
  1341. text search such that @samp{CamelCaseLink} is equivalent to
  1342. @samp{[[camel case link]]}.
  1343. @node External links, Handling links, Internal links, Hyperlinks
  1344. @section External links
  1345. @cindex links, external
  1346. @cindex external links
  1347. @cindex links, external
  1348. @cindex GNUS links
  1349. @cindex BBDB links
  1350. @cindex URL links
  1351. @cindex file links
  1352. @cindex VM links
  1353. @cindex RMAIL links
  1354. @cindex WANDERLUST links
  1355. @cindex MH-E links
  1356. @cindex USENET links
  1357. @cindex SHELL links
  1358. @cindex Info links
  1359. @cindex elisp links
  1360. Org-mode supports links to files, websites, Usenet and email messages,
  1361. and BBDB database entries. External links are URL-like locators. They
  1362. start with a short identifying string followed by a colon. There can be
  1363. no space after the colon. The following list shows examples for each
  1364. link type.
  1365. @example
  1366. http://www.astro.uva.nl/~dominik @r{on the web}
  1367. file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
  1368. file:papers/last.pdf @r{file, relative path}
  1369. news:comp.emacs @r{Usenet link}
  1370. mailto:adent@@galaxy.net @r{Mail link}
  1371. vm:folder @r{VM folder link}
  1372. vm:folder#id @r{VM message link}
  1373. vm://myself@@some.where.org/folder#id @r{VM on remote machine}
  1374. wl:folder @r{WANDERLUST folder link}
  1375. wl:folder#id @r{WANDERLUST message link}
  1376. mhe:folder @r{MH-E folder link}
  1377. mhe:folder#id @r{MH-E message link}
  1378. rmail:folder @r{RMAIL folder link}
  1379. rmail:folder#id @r{RMAIL message link}
  1380. gnus:group @r{GNUS group link}
  1381. gnus:group#id @r{GNUS article link}
  1382. bbdb:Richard Stallman @r{BBDB link}
  1383. shell:ls *.org @r{A shell command}
  1384. elisp:(find-file-other-frame "Elisp.org") @r{An elisp form to evaluate}
  1385. @end example
  1386. A link should be enclosed in double brackets and may contain a
  1387. descriptive text to be displayed instead of the url (@pxref{Link
  1388. format}), for example:
  1389. @example
  1390. [[http://www.gnu.org/software/emacs/][GNU Emacs]]
  1391. @end example
  1392. @cindex angular brackets, around links
  1393. @cindex plain text external links
  1394. Org-mode also finds external links in the normal text and activates them
  1395. as links. If spaces must be part of the link (for example in
  1396. @samp{bbdb:Richard Stallman}), or you need to remove ambiguities about the end of
  1397. the link, enclose them in angular brackets.
  1398. @node Handling links, Search options, External links, Hyperlinks
  1399. @section Handling links
  1400. Org-mode provides methods to create a link in the correct syntax, to
  1401. insert it into an org-mode file, and to follow the link.
  1402. @table @kbd
  1403. @kindex C-c l
  1404. @cindex storing links
  1405. @item C-c l
  1406. Store a link to the current location. This is a @emph{global} command
  1407. which can be used in any buffer to create a link. The link will be
  1408. stored for later insertion into an Org-mode buffer (see below). For
  1409. Org-mode files, if there is a @samp{<<target>>} at the cursor, the link
  1410. points to the target. Otherwise it points to the current headline. For
  1411. VM, RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will
  1412. indicate the current article/entry. For W3 and W3M buffers, the link
  1413. goes to the current URL. For any other files, the link will point to
  1414. the file, with a search string (@pxref{Search options}) pointing to the
  1415. contents of the current line. If there is an active region, the
  1416. selected words will form the basis of the search string. If the
  1417. automatically created link is not working correctly or accurately
  1418. enough, you can write custom functions to select the search string and
  1419. to do the search for particular file types - see @ref{Custom searches}.
  1420. The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation
  1421. and activation}.
  1422. @kindex C-c C-l
  1423. @cindex link completion
  1424. @cindex completion, of links
  1425. @cindex inserting links
  1426. @item C-c C-l
  1427. Insert a link. This prompts for a link to be inserted into the buffer.
  1428. You can just type a link, using text for an internal link, or one of the
  1429. link type prefixes mentioned in the examples above. Through completion,
  1430. all links stored during the current session can be accessed. The link
  1431. will be inserted into the buffer, along with a descriptive text. Note
  1432. that you don't have to use this command to insert a link. Links in
  1433. Org-mode are plain text, and you can type or paste them straight into
  1434. the buffer. By using this command, the links are automatically enclosed
  1435. in double brackets, and you will be asked for the optional descriptive
  1436. text. If the link is a @samp{file:} link and the linked file is located
  1437. in the same directory as the current file or a subdirectory of it, the
  1438. path of the file will be inserted relative to the current directory.
  1439. @kindex C-u C-c C-l
  1440. @cindex file name completion
  1441. @cindex completion, of file names
  1442. @item C-u C-c C-l
  1443. When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to
  1444. a file will be inserted and you may use file name completion to select
  1445. the name of the file. The path to the file is inserted relative to the
  1446. directory of the current org file, if the linked file is in the current
  1447. directory or in a subdirectory of it, or if the path is written relative
  1448. to the current directory using @samp{../}. Otherwise an absolute path
  1449. is used, if possible with @samp{~/} for your home directory. You can
  1450. force an absolute path with two @kbd{C-u} prefixes.
  1451. @item C-c C-l @r{with cursor on existing link}
  1452. When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the
  1453. link and description parts of the link.
  1454. @cindex following links
  1455. @kindex C-c C-o
  1456. @item C-c C-o
  1457. Open link at point. This will launch a web browser for URLs (using
  1458. @command{browse-url-at-point}), run vm/mh-e/wanderlust/rmail/gnus/bbdb
  1459. for the corresponding links, and execute the command in a shell link.
  1460. When the cursor is on an internal link, this commands runs the
  1461. corresponding search. When the cursor is on a TAG list in a headline,
  1462. it creates the corresponding TAGS view. If the cursor is on a time
  1463. stamp, it compiles the agenda for that date. Furthermore, it will visit
  1464. text files in @samp{file:} links with Emacs and select a suitable
  1465. application for non-text files. Classification of files is based on
  1466. file extension only. See option @code{org-file-apps}. If you want to
  1467. override the default application and visit the file with Emacs, use a
  1468. @kbd{C-u} prefix.
  1469. @kindex mouse-2
  1470. @kindex mouse-1
  1471. @item mouse-2
  1472. @itemx mouse-1
  1473. On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o}
  1474. would. Under Emacs 22, also @kbd{mouse-1} will follow a link.
  1475. @kindex mouse-3
  1476. @item mouse-3
  1477. Like @kbd{mouse-2}, but force file links to be opened with Emacs.
  1478. @cindex mark ring
  1479. @kindex C-c %
  1480. @item C-c %
  1481. Push the current position onto the mark ring, to be able to return
  1482. easily. Commands following an internal link do this automatically.
  1483. @cindex links, returning to
  1484. @kindex C-c &
  1485. @item C-c &
  1486. Jump back to a recorded position. A position is recorded by the
  1487. commands following internal links, and by @kbd{C-c %}. Using this
  1488. command several times in direct succession moves through a ring of
  1489. previously recorded positions.
  1490. @end table
  1491. @node Search options, Custom searches, Handling links, Hyperlinks
  1492. @section Search options in file links
  1493. @cindex search option in file links
  1494. @cindex file links, searching
  1495. File links can contain additional information to make Emacs jump to a
  1496. particular location in the file when following a link. This can be a
  1497. line number or a search option after a double@footnote{For backward
  1498. compatibility, line numbers can also follow a single colon.} colon. For
  1499. example, when the command @kbd{C-c l} creates a link (@pxref{Handling
  1500. links}) to a file, it encodes the words in the current line as a search
  1501. string that can be used to find this line back later when following the
  1502. link with @kbd{C-c C-o}.
  1503. Here is the syntax of the different ways to attach a search to a file
  1504. link, together with an explanation:
  1505. @example
  1506. [[file:~/code/main.c::255]]
  1507. [[file:~/xx.org::My Target]]
  1508. [[file:~/xx.org::*My Target]]
  1509. [[file:~/xx.org::/regexp/]]
  1510. @end example
  1511. @table @code
  1512. @item 255
  1513. Jump to line 255.
  1514. @item My Target
  1515. Search for a link target @samp{<<My Target>>}, or do a text search for
  1516. @samp{my target}, similar to the search in internal links, see
  1517. @ref{Internal links}. In HTML export (@pxref{HTML export}), such a file
  1518. link will become an HTML reference to the corresponding named anchor in
  1519. the linked file.
  1520. @item *My Target
  1521. In an Org-mode file, restrict search to headlines.
  1522. @item /regexp/
  1523. Do a regular expression search for @code{regexp}. This uses the Emacs
  1524. command @code{occur} to list all matches in a separate window. If the
  1525. target file is in Org-mode, @code{org-occur} is used to create a
  1526. sparse tree with the matches.
  1527. @c If the target file is a directory,
  1528. @c @code{grep} will be used to search all files in the directory.
  1529. @end table
  1530. As a degenerate case, a file link with an empty file name can be used
  1531. to search the current file. For example, @code{<file:::find me>} does
  1532. a search for @samp{find me} in the current file, just as
  1533. @samp{[[find me]]} would.
  1534. @node Custom searches, Remember, Search options, Hyperlinks
  1535. @section Custom Searches
  1536. @cindex custom search strings
  1537. The default mechanism for creating search strings and for doing the
  1538. actual search related to a file link may not work correctly in all
  1539. cases. For example, BibTeX database files have many entries like
  1540. @samp{year="1993"} which would not result in good search strings,
  1541. because the only unique identification for a BibTeX entry is the
  1542. citation key.
  1543. If you come across such a problem, you can write custom functions to set
  1544. the right search string for a particular file type, and to do the search
  1545. for the string in the file. Using @code{add-hook}, these functions need
  1546. to be added to the hook variables
  1547. @code{org-create-file-search-functions} and
  1548. @code{org-execute-file-search-functions}. See the docstring for these
  1549. variables for more information. Org-mode actually uses this mechanism
  1550. for Bib@TeX{} database files, and you can use the corresponding code as
  1551. an implementation example. Search for @samp{BibTeX links} in the source
  1552. file.
  1553. @node Remember, , Custom searches, Hyperlinks
  1554. @section Remember
  1555. @cindex @file{remember.el}
  1556. Another way to create org entries with links to other files is through
  1557. the @emph{Remember} package by John Wiegley. @emph{Remember} lets you
  1558. store quick notes with little interruption of your work flow. See
  1559. @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
  1560. information. The notes produced by @emph{Remember} can be stored in
  1561. different ways, and Org-mode files are a good target. Org-mode allows
  1562. you to file away notes either to a default file, or directly to the correct
  1563. location in your Org-mode outline tree. The following customization
  1564. will tell @emph{Remember} to use org files as target, and to create
  1565. annotations compatible with Org-mode links.
  1566. @example
  1567. (setq org-directory "~/path/to/my/orgfiles/")
  1568. (setq org-default-notes-file "~/.notes")
  1569. (setq remember-annotation-functions '(org-remember-annotation))
  1570. (setq remember-handler-functions '(org-remember-handler))
  1571. (add-hook 'remember-mode-hook 'org-remember-apply-template)
  1572. @end example
  1573. @cindex templates, for remember
  1574. In combination with Org-mode, you can use templates to generate
  1575. different types of remember notes. For example, if you would like to
  1576. use one template to create general TODO entries, and another one for
  1577. journal entries, you could use:
  1578. @example
  1579. (setq org-remember-templates
  1580. '((?t "* TODO %?\n %i\n %a" "~/org/TODO.org")
  1581. (?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org")))
  1582. @end example
  1583. @noindent In these entries, the character specifies how to select the
  1584. template, the first string specifies the template, and the (optional)
  1585. second string specifies a default file (overruling
  1586. @code{org-default-notes-file}) as a target for this note.
  1587. When you call @kbd{M-x remember} to remember something, org will prompt
  1588. for a key to select the template and then prepare the buffer like
  1589. @example
  1590. * TODO
  1591. <file:link to where you called remember>
  1592. @end example
  1593. @noindent or
  1594. @example
  1595. * [2006-03-21 Tue 15:37]
  1596. <file:link to where you called remember>
  1597. @end example
  1598. @noindent See the variable @code{org-remember-templates} for more details.
  1599. When you are finished composing a note with remember, you have to press
  1600. @kbd{C-c C-c} to file the note away. The handler first prompts for a
  1601. target file - if you press @key{RET}, the value of
  1602. @code{org-default-notes-file} is used. Then the command offers the
  1603. headings tree of the selected file. You can either immediately press
  1604. @key{RET} to get the note appended to the file. Or you can use vertical
  1605. cursor motion (@key{up} and @key{down}) and visibility cycling
  1606. (@key{TAB}) to find a better place. Pressing @key{RET} or @key{left} or
  1607. @key{right} leads to the following result.
  1608. @multitable @columnfractions 0.2 0.1 0.7
  1609. @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
  1610. @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
  1611. @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
  1612. @item @tab @key{left} @tab as same level, before current heading
  1613. @item @tab @key{right} @tab as same level, after current heading
  1614. @item not on headline @tab @key{RET}
  1615. @tab at cursor position, level taken from context.
  1616. Or use prefix arg to specify level manually.
  1617. @end multitable
  1618. So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
  1619. @key{RET}} to append it to the default file. Even shorter would be
  1620. @kbd{C-u C-c C-c}, which does the same without even showing the tree.
  1621. But with little extra effort, you can push it directly to the correct
  1622. location.
  1623. Before inserting the text into a tree, the function ensures that the
  1624. text has a headline, i.e. a first line that starts with a @samp{*}.
  1625. If not, a headline is constructed from the current date and some
  1626. additional data. If the variable @code{org-adapt-indentation} is
  1627. non-nil, the entire text is also indented so that it starts in the
  1628. same column as the headline (after the asterisks).
  1629. @node TODO items, Timestamps, Hyperlinks, Top
  1630. @chapter TODO items
  1631. @cindex TODO items
  1632. Org-mode does not maintain TODO lists as a separate document. TODO
  1633. items are an integral part of the notes file, because TODO items
  1634. usually come up while taking notes! With Org-mode, you simply mark
  1635. any entry in a tree as being a TODO item. In this way, the
  1636. information is not duplicated, and the entire context from which the
  1637. item emerged is always present when you check.
  1638. Of course, this technique causes TODO items to be scattered throughout
  1639. your file. Org-mode provides methods to give you an overview over all
  1640. things you have to do.
  1641. @menu
  1642. * TODO basics:: Marking and displaying TODO entries
  1643. * Progress logging:: Document your productivity
  1644. * TODO extensions:: Workflow and assignments
  1645. * Priorities:: Some things are more important than others
  1646. @end menu
  1647. @node TODO basics, Progress logging, TODO items, TODO items
  1648. @section Basic TODO functionality
  1649. Any headline can become a TODO item by starting it with the word TODO,
  1650. for example:
  1651. @example
  1652. *** TODO Write letter to Sam Fortune
  1653. @end example
  1654. @noindent
  1655. The most important commands to work with TODO entries are:
  1656. @table @kbd
  1657. @kindex C-c C-t
  1658. @cindex cycling, of TODO states
  1659. @item C-c C-t
  1660. Rotate the TODO state of the current item between
  1661. @example
  1662. ,-> (unmarked) -> TODO -> DONE --.
  1663. '--------------------------------'
  1664. @end example
  1665. The same rotation can also be done ``remotely'' from the timeline and
  1666. agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
  1667. @kindex S-@key{right}
  1668. @kindex S-@key{left}
  1669. @item S-@key{right}
  1670. @itemx S-@key{left}
  1671. Select the following/preceding TODO state, similar to cycling. Mostly
  1672. useful if more than two TODO states are possible (@pxref{TODO extensions}).
  1673. @kindex C-c C-v
  1674. @cindex sparse tree, for TODO
  1675. @item C-c C-v
  1676. View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
  1677. the entire buffer, but shows all TODO items and the headings hierarchy
  1678. above them. With prefix arg, show also the DONE entries. With
  1679. numerical prefix N, show the tree for the Nth keyword in the variable
  1680. @code{org-todo-keywords}.
  1681. @kindex C-c a t
  1682. @item C-c a t
  1683. Show the global TODO list. This collects the TODO items from all
  1684. agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
  1685. @code{agenda-mode}, so there are commands to examine and manipulate
  1686. the TODO entries directly from that buffer (@pxref{Agenda commands}).
  1687. @xref{Global TODO list}, for more information.
  1688. @c @item @code{org-agenda-include-all-todo}
  1689. @c If you would like to have all your TODO items listed as part of your
  1690. @c agenda, customize the variable @code{org-agenda-include-all-todo}.
  1691. @end table
  1692. @node Progress logging, TODO extensions, TODO basics, TODO items
  1693. @section Progress Logging
  1694. @cindex progress logging
  1695. @cindex logging, of progress
  1696. If you want to keep track of @emph{when} a certain TODO item was
  1697. finished, turn on logging with
  1698. @lisp
  1699. (setq org-log-done t)
  1700. @end lisp
  1701. @noindent
  1702. Then each time you turn a TODO entry into DONE using either @kbd{C-c
  1703. C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
  1704. @samp{CLOSED: [timestamp]} will be inserted just after the headline.
  1705. If you turn the entry back into a TODO item again through further
  1706. state cycling, that line will be removed again. In the timeline
  1707. (@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily agenda}),
  1708. you can then use the @kbd{L} key to display the TODO items closed on
  1709. each day, giving you an overview of what has been done on a day.
  1710. @node TODO extensions, Priorities, Progress logging, TODO items
  1711. @section Extended use of TODO keywords
  1712. @cindex extended TODO keywords
  1713. The default implementation of TODO entries is just two states: TODO and
  1714. DONE. You can, however, use the TODO feature for more complicated
  1715. things by configuring the variables @code{org-todo-keywords} and
  1716. @code{org-todo-interpretation}. Using special setup, you can even use
  1717. TODO keywords in different ways in different org files.
  1718. Note that @i{tags} are another way to classify headlines in general and
  1719. TODO items in particular (@pxref{Tags}).
  1720. @menu
  1721. * Workflow states:: From TODO to DONE in steps
  1722. * TODO types:: I do this, Fred the rest
  1723. * Per file keywords:: Different files, different requirements
  1724. @end menu
  1725. @node Workflow states, TODO types, TODO extensions, TODO extensions
  1726. @subsection TODO keywords as workflow states
  1727. @cindex TODO workflow
  1728. @cindex workflow states as TODO keywords
  1729. You can use TODO keywords to indicate different states in the process
  1730. of working on an item, for example:
  1731. @lisp
  1732. (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
  1733. org-todo-interpretation 'sequence)
  1734. @end lisp
  1735. @cindex completion, of TODO keywords
  1736. Changing these variables only becomes effective in a new Emacs session.
  1737. With this setup, the command @kbd{C-c C-t} will cycle an entry from
  1738. TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
  1739. use a prefix argument to quickly select a specific state. For example
  1740. @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
  1741. If you define many keywords, you can use in-buffer completion (see
  1742. @ref{Completion}) to insert these words into the buffer.
  1743. @node TODO types, Per file keywords, Workflow states, TODO extensions
  1744. @subsection TODO keywords as types
  1745. @cindex TODO types
  1746. @cindex names as TODO keywords
  1747. @cindex types as TODO keywords
  1748. The second possibility is to use TODO keywords to indicate different
  1749. types of action items. For example, you might want to indicate that
  1750. items are for ``work'' or ``home''. If you are into David Allen's
  1751. @emph{Getting Things DONE}, you might want to use todo types
  1752. @samp{NEXTACTION}, @samp{WAITING}, @samp{MAYBE}. Or, when you work
  1753. with several people on a single project, you might want to assign
  1754. action items directly to persons, by using their names as TODO
  1755. keywords. This would be set up like this:
  1756. @lisp
  1757. (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
  1758. org-todo-interpretation 'type)
  1759. @end lisp
  1760. In this case, different keywords do not indicate a sequence, but
  1761. rather different types. So it is normally not useful to change from
  1762. one type to another. Therefore, in this case the behavior of the
  1763. command @kbd{C-c C-t} is changed slightly@footnote{This is also true
  1764. for the @kbd{t} command in the timeline and agenda buffers.}. When
  1765. used several times in succession, it will still cycle through all
  1766. names. But when you return to the item after some time and execute
  1767. @kbd{C-c C-t} again, it will switch from each name directly to DONE.
  1768. Use prefix arguments or completion to quickly select a specific name.
  1769. You can also review the items of a specific TODO type in a sparse tree
  1770. by using a numeric prefix to @kbd{C-c C-v}. For example, to see all
  1771. things Lucy has to do, you would use @kbd{C-3 C-c C-v}. To collect
  1772. Lucy's items from all agenda files into a single buffer, you
  1773. would use the prefix arg as well when creating the global todo list:
  1774. @kbd{C-3 C-c t}.
  1775. @node Per file keywords, , TODO types, TODO extensions
  1776. @subsection Setting up TODO keywords for individual files
  1777. @cindex keyword options
  1778. @cindex per file keywords
  1779. It can be very useful to use different aspects of the TODO mechanism
  1780. in different files, which is not possible with the global settings
  1781. described above. For file-local settings, you need to add special
  1782. lines to the file which set the keywords and interpretation for that
  1783. file only. For example, to set one of the two examples discussed
  1784. above, you need one of the following lines, starting in column zero
  1785. anywhere in the file:
  1786. @example
  1787. #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
  1788. #+TYP_TODO: Fred Sara Lucy Mike DONE
  1789. @end example
  1790. @cindex Completion, of option keywords
  1791. @kindex M-@key{TAB}
  1792. @noindent To make sure you are using the correct keyword, type
  1793. @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
  1794. @cindex DONE, final TODO keyword
  1795. Remember that the last keyword must always mean that the item is DONE
  1796. (although you may use a different word). Also note that in each file,
  1797. only one of the two aspects of TODO keywords can be used. After
  1798. changing one of these lines, use @kbd{C-c C-c} with the cursor still
  1799. in the line to make the changes known to Org-mode@footnote{Org-mode
  1800. parses these lines only when Org-mode is activated after visiting a
  1801. file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
  1802. is simply restarting Org-mode, making sure that these changes will be
  1803. respected.}.
  1804. If you want to use very many keywords, for example when working with a
  1805. large group of people, you may split the names over several lines:
  1806. @example
  1807. #+TYP_TODO: Fred Sara Lucy Mike
  1808. #+TYP_TODO: Luis George Jules Jessica
  1809. #+TYP_TODO: Kim Arnold Peter
  1810. #+TYP_TODO: DONE
  1811. @end example
  1812. @node Priorities, , TODO extensions, TODO items
  1813. @section Priorities
  1814. @cindex priorities
  1815. If you use Org-mode extensively to organize your work, you may end up
  1816. with a number of TODO entries so large that you'd like to prioritize
  1817. them. This can be done by placing a @emph{priority cookie} into the
  1818. headline, like this
  1819. @example
  1820. *** TODO [#A] Write letter to Sam Fortune
  1821. @end example
  1822. @noindent
  1823. With its standard setup, Org-mode supports priorities @samp{A},
  1824. @samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
  1825. without a cookie is treated as priority @samp{B}. Priorities make a
  1826. difference only in the agenda (@pxref{Weekly/Daily agenda}).
  1827. @table @kbd
  1828. @kindex @kbd{C-c ,}
  1829. @item @kbd{C-c ,}
  1830. Set the priority of the current headline. The command prompts for a
  1831. priority character @samp{A}, @samp{B} or @samp{C}. When you press
  1832. @key{SPC} instead, the priority cookie is removed from the headline.
  1833. The priorities can also be changed ``remotely'' from the timeline and
  1834. agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
  1835. @kindex S-@key{up}
  1836. @kindex S-@key{down}
  1837. @item S-@key{up}
  1838. @itemx S-@key{down}
  1839. Increase/decrease priority of current headline. Note that these keys
  1840. are also used to modify time stamps (@pxref{Creating timestamps}).
  1841. Furthermore, these keys are also used by CUA-mode (@pxref{Conflicts}).
  1842. @end table
  1843. @node Timestamps, Tags, TODO items, Top
  1844. @chapter Timestamps
  1845. Items can be labeled with timestamps to make them useful for project
  1846. planning.
  1847. @menu
  1848. * Time stamps:: Assigning a time to a tree entry
  1849. * Creating timestamps:: Commands which insert timestamps
  1850. @end menu
  1851. @node Time stamps, Creating timestamps, Timestamps, Timestamps
  1852. @section Time stamps, deadlines and scheduling
  1853. @cindex time stamps
  1854. @cindex ranges, time
  1855. @cindex date stamps
  1856. @cindex deadlines
  1857. @cindex scheduling
  1858. A time stamp is a specification of a date (possibly with time) in a
  1859. special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
  1860. Tue 09:39>}. A time stamp can appear anywhere in the headline or body
  1861. of an org-tree entry. Its presence allows entries to be shown on specific
  1862. dates in the agenda (@pxref{Weekly/Daily agenda}). We distinguish:
  1863. @table @var
  1864. @item Plain time stamp
  1865. @cindex timestamp
  1866. A simple time stamp just assigns a date/time to an item. This is just
  1867. like writing down an appointment in a paper agenda, or like writing down
  1868. an event in a diary, when you want to take not of when something
  1869. happened. In the timeline and agenda displays, the headline of an entry
  1870. associated with a plain time stamp will be shown exactly on that date.
  1871. @item Time stamp range
  1872. @cindex timerange
  1873. Two time stamps connected by @samp{--} denote a time range. The
  1874. headline will be shown on the first and last day of the range, and on
  1875. any dates that are displayed and fall in the range. Here is an
  1876. example:
  1877. @example
  1878. ** Meeting in Amsterdam
  1879. <2004-08-23 Mon>--<2004-08-26 Thu>
  1880. @end example
  1881. @item Time stamp with SCHEDULED keyword
  1882. @cindex SCHEDULED keyword
  1883. If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you
  1884. are planning to start working on that task on the given date. So this is
  1885. not about recording an event, but about planning your work. The
  1886. headline will be listed under the given date. In addition, a reminder
  1887. that the scheduled date has passed will be present in the compilation
  1888. for @emph{today}, until the entry is marked DONE. I.e., the task will
  1889. automatically be forwarded until completed.
  1890. @example
  1891. *** TODO Call Trillian for a date on New Years Eve.
  1892. SCHEDULED: <2004-12-25 Sat>
  1893. @end example
  1894. @item Time stamp with DEADLINE keyword
  1895. @cindex DEADLINE keyword
  1896. If a time stamp is preceded by the word @samp{DEADLINE:}, the task
  1897. (most likely a TODO item) is supposed to be finished on that date, and
  1898. it will be listed then. In addition, the compilation for @emph{today}
  1899. will carry a warning about the approaching or missed deadline,
  1900. starting @code{org-deadline-warning-days} before the due date, and
  1901. continuing until the entry is marked DONE. An example:
  1902. @example
  1903. *** TODO write article about the Earth for the Guide
  1904. The editor in charge is <bbdb:Ford Prefect>
  1905. DEADLINE: <2004-02-29 Sun>
  1906. @end example
  1907. @item Time stamp with CLOSED keyword
  1908. @cindex CLOSED keyword
  1909. When @code{org-log-done} is non-nil, Org-mode will automatically insert
  1910. a special time stamp each time a TODO entry is marked done
  1911. (@pxref{Progress logging}). This time stamp is enclosed in square
  1912. brackets instead of angular brackets.
  1913. @end table
  1914. @node Creating timestamps, , Time stamps, Timestamps
  1915. @section Creating timestamps
  1916. @cindex creating timestamps
  1917. @cindex timestamps, creating
  1918. For Org-mode to recognize time stamps, they need to be in the specific
  1919. format. All commands listed below produce time stamps in the correct
  1920. format.
  1921. @table @kbd
  1922. @kindex C-c .
  1923. @item C-c .
  1924. Prompt for a date and insert a corresponding time stamp. When the
  1925. cursor is at a previously used time stamp, it is updated to NOW. When
  1926. this command is used twice in succession, a time range is inserted.
  1927. @kindex C-u C-c .
  1928. @item C-u C-c .
  1929. Like @kbd{C-c .}, but use the alternative format which contains date
  1930. and time. The default time can be rounded to multiples of 5 minutes,
  1931. see the option @code{org-time-stamp-rounding-minutes}.
  1932. @kindex C-c !
  1933. @item C-c !
  1934. Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
  1935. agenda.
  1936. @kindex C-c <
  1937. @item C-c <
  1938. Insert a time stamp corresponding to the cursor date in the Calendar.
  1939. @kindex C-c >
  1940. @item C-c >
  1941. Access the Emacs calendar for the current date. If there is a
  1942. timestamp in the current line, goto the corresponding date
  1943. instead.
  1944. @kindex C-c C-o
  1945. @item C-c C-o
  1946. Access the agenda for the date given by the time stamp at point
  1947. (@pxref{Weekly/Daily agenda}).
  1948. @kindex C-c C-d
  1949. @item C-c C-d
  1950. Insert @samp{DEADLINE} keyword along with a stamp. The insertion will
  1951. happen in the line directly following the headline.
  1952. @c FIXME Any CLOSED timestamp will be removed.????????
  1953. @kindex C-c C-w
  1954. @cindex sparse tree, for deadlines
  1955. @item C-c C-w
  1956. Create a sparse tree with all deadlines that are either past-due, or
  1957. which will become due within @code{org-deadline-warning-days}.
  1958. With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
  1959. prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
  1960. all deadlines due tomorrow.
  1961. @kindex C-c C-s
  1962. @item C-c C-s
  1963. Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
  1964. happen in the line directly following the headline. Any CLOSED
  1965. timestamp will be removed.
  1966. @kindex S-@key{left}
  1967. @kindex S-@key{right}
  1968. @item S-@key{left}
  1969. @itemx S-@key{right}
  1970. Change date at cursor by one day. These key bindings conflict with
  1971. CUA-mode (@pxref{Conflicts}).
  1972. @kindex S-@key{up}
  1973. @kindex S-@key{down}
  1974. @item S-@key{up}
  1975. @itemx S-@key{down}
  1976. Change the item under the cursor in a timestamp. The cursor can be on
  1977. a year, month, day, hour or minute. Note that if the cursor is not at
  1978. a time stamp, these same keys modify the priority of an item.
  1979. (@pxref{Priorities}). The key bindings also conflict with CUA-mode
  1980. (@pxref{Conflicts}).
  1981. @kindex C-c C-y
  1982. @cindex evaluate time range
  1983. @item C-c C-y
  1984. Evaluate a time range by computing the difference between start and
  1985. end. With prefix arg, insert result after the time range (in a table:
  1986. into the following column).
  1987. @end table
  1988. @cindex date, reading in minibuffer
  1989. @cindex time, reading in minibuffer
  1990. @cindex calendar, for selecting date
  1991. When Org-mode prompts for a date/time, the function reading your input
  1992. will replace anything you choose not to specify with the current date
  1993. and time. For details, see the documentation string of
  1994. @command{org-read-date}. Also, a calender will pop up to allow
  1995. selecting a date. The calendar can be fully controlled from the
  1996. minibuffer, and a date can be selected with the following commands:
  1997. @table @kbd
  1998. @kindex <
  1999. @item <
  2000. Scroll calendar backwards by one month.
  2001. @kindex >
  2002. @item >
  2003. Scroll calendar forwards by one month.
  2004. @kindex mouse-1
  2005. @item mouse-1
  2006. Select date by clicking on it.
  2007. @kindex S-@key{right}
  2008. @item S-@key{right}
  2009. One day forward.
  2010. @kindex S-@key{left}
  2011. @item S-@key{left}
  2012. One day back.
  2013. @kindex S-@key{down}
  2014. @item S-@key{down}
  2015. One week forward.
  2016. @kindex S-@key{up}
  2017. @item S-@key{up}
  2018. One week back.
  2019. @kindex M-S-@key{right}
  2020. @item M-S-@key{right}
  2021. One month forward.
  2022. @kindex M-S-@key{left}
  2023. @item M-S-@key{left}
  2024. One month back.
  2025. @kindex @key{RET}
  2026. @item @key{RET}
  2027. Choose date in calendar (only if nothing typed into minibuffer).
  2028. @end table
  2029. @node Tags, Agenda views, Timestamps, Top
  2030. @chapter Tags
  2031. @cindex tags
  2032. @cindex headline tagging
  2033. @cindex matching, tags
  2034. @cindex sparse tree, tag based
  2035. If you wish to implement a system of labels and contexts for
  2036. cross-correlating information, an excellent way is to assign @i{tags} to
  2037. headlines. Org-mode has extensive support for using tags.
  2038. Every headline can contain a list of tags, at the end of the headline.
  2039. Tags are normal words containing letters, numbers, @samp{_}, and
  2040. @samp{@@}. Tags must be preceded and followed by a single colon; like
  2041. @samp{:WORK:}. Several tags can be specified like @samp{:WORK:URGENT:}.
  2042. @menu
  2043. * Tag inheritance:: Tags use the tree structure of the outline
  2044. * Setting tags:: How to assign tags to a headline
  2045. * Tag searches:: Searching for combinations of tags
  2046. @end menu
  2047. @node Tag inheritance, Setting tags, Tags, Tags
  2048. @section Tag inheritance
  2049. @cindex inheritance, of tags
  2050. @i{Tags} make use of the hierarchical structure of outline trees. If a
  2051. heading has a certain tag, all subheadings will inherit the tag as
  2052. well. For example, in the list
  2053. @example
  2054. * Meeting with the French group :WORK:
  2055. ** Summary by Frank :BOSS:NOTES:
  2056. *** TODO Prepare slides for him :ACTION:
  2057. @end example
  2058. @noindent
  2059. the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
  2060. @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and
  2061. Org-mode finds that a certain headline matches the search criterion, it
  2062. will not check any sublevel headline, assuming that these likely also
  2063. match, and that the list of matches can become very long. This may
  2064. not be what you want, however, and you can influence inheritance and
  2065. searching using the variables @code{org-use-tag-inheritance} and
  2066. @code{org-tags-match-list-sublevels}.
  2067. @node Setting tags, Tag searches, Tag inheritance, Tags
  2068. @section Setting tags
  2069. @cindex setting tags
  2070. @kindex M-@key{TAB}
  2071. Tags can simply be typed into the buffer at the end of a headline.
  2072. After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is
  2073. also a special command for inserting tags:
  2074. @table @kbd
  2075. @kindex C-c C-c
  2076. @item C-c C-c
  2077. @cindex completion, of tags
  2078. Enter new tags for the current headline. Org-mode will either offer
  2079. completion or a special single-key interface for setting tags, see
  2080. below. After pressing @key{RET}, the tags will be inserted and aligned
  2081. to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all
  2082. tags in the current buffer will be aligned to that column, just to make
  2083. things look nice. TAGS are automatically realigned after promotion,
  2084. demotion, and TODO state changes (@pxref{TODO basics}).
  2085. @end table
  2086. Org will support tag insertion based on a @emph{list of tags}. By
  2087. default this list is constructed dynamically, containing all tags
  2088. currently used in the buffer. You may also globally specify a hard list
  2089. of tags with the variable @code{org-tag-alist}. Finally you can set
  2090. the allowed tags for a given file with lines like
  2091. @example
  2092. #+TAGS: @@WORK @@HOME @@TENNISCLUB
  2093. #+TAGS: Laptop Car PC Sailboat
  2094. @end example
  2095. The default method Org-mode uses to support setting tags is completion.
  2096. However, it also implements a much better method: @emph{fast tag
  2097. selection}. This method allows to select and deselect tags with a
  2098. single key per tag. To function efficiently, you need to assign unique
  2099. keys to all tags. This can be done globally with
  2100. @lisp
  2101. (setq org-tag-alist '(("@@WORK" . ?w) ("@@HOME" . ?h) ("Laptop" . ?l)))
  2102. @end lisp
  2103. @noindent or on a per-file basis with
  2104. @example
  2105. #+TAGS: @@WORK(w) @@HOME(h) @@TENNISCLUB(t)
  2106. #+TAGS: Laptop(l) Car(c) PC(p) Sailboat(s)
  2107. @end example
  2108. @noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of
  2109. these lines to activate any changes.
  2110. If selection keys have been configured, pressing @kbd{C-c C-c} will
  2111. automatically present you with a special interface, listing inherited
  2112. tags, the tags of the current headline, and a list of all legal tags
  2113. with corresponding keys. Pressing keys for the tags will add or remove
  2114. them from the list of tags in the current line. @key{SPC} clears all
  2115. tags for this line, @kbd{RET} accepts the modified set, and @kbd{C-g}
  2116. aborts without installing changes. This method lets you assing tags to
  2117. a headline with very few keys. With the above setup, you could clear
  2118. the current tags and set @samp{@@HOME}, @samp{Laptop} and @samp{PC} tags
  2119. with just the following keys: @kbd{C-c C-c @key{SPC} h l p @key{RET}}.
  2120. What if you have globally defined your preferred set of tags using the
  2121. variable @code{org-tag-alist}, but would like to use a dynamic tag list
  2122. in a specific file? Just add and empty TAGS option line to that file:
  2123. @example
  2124. #+TAGS:
  2125. @end example
  2126. @node Tag searches, , Setting tags, Tags
  2127. @section Tag searches
  2128. @cindex tag searches
  2129. Once a tags system has been set up, it can be used to collect related
  2130. information into special lists.
  2131. @table @kbd
  2132. @kindex C-c \
  2133. @item C-c \
  2134. Create a sparse tree with all headlines matching a tags search.
  2135. @kindex C-c a m
  2136. @item C-c a m
  2137. Create a global list of tag matches from all agenda files.
  2138. @xref{Matching headline tags}.
  2139. @kindex C-c a M
  2140. @item C-c a M
  2141. Create a global list of tag matches from all agenda files, but check
  2142. only TODO items and force checking subitems (see variable
  2143. @code{org-tags-match-list-sublevels}).
  2144. @end table
  2145. A @i{tags} search string can use Boolean operators @samp{&} for AND and
  2146. @samp{|} for OR. @samp{&} binds more strongly than @samp{|}.
  2147. Parenthesis are currently not implemented. A tag may also be preceded
  2148. by @samp{-}, to select against it, and @samp{+} is syntactic sugar for
  2149. positive selection. The AND operator @samp{&} is optional when @samp{+}
  2150. or @samp{-} is present. For example, @samp{+WORK-BOSS} would select all
  2151. headlines that are tagged @samp{:WORK:}, but discard those also tagged
  2152. @samp{:BOSS:}. The search string @samp{WORK|LAPTOP} selects all lines
  2153. tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
  2154. @samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
  2155. also tagged @samp{NIGHT}.
  2156. @node Agenda views, Exporting, Tags, Top
  2157. @chapter Agenda Views
  2158. @cindex agenda views
  2159. Due to the way Org-mode works, TODO items, time-stamped items, and
  2160. tagged headlines can be scattered throughout a file or even a number of
  2161. files. To get an overview over open action items, or over events that
  2162. are important for a particular date, this information must be collected,
  2163. sorted and displayed in an organized way.
  2164. Org-mode can select items based on various criteria, and display them
  2165. in a separate buffer. Three different views are provided:
  2166. @itemize @bullet
  2167. @item
  2168. an @emph{agenda} that is like a calendar and shows information
  2169. for specific dates
  2170. @item
  2171. a @emph{TODO list} that covers all unfinished
  2172. action items, and
  2173. @item
  2174. a @emph{tags view} that shows information based on
  2175. the tags associated with headlines in the outline tree.
  2176. @end itemize
  2177. @noindent
  2178. The extracted information is displayed in a special @emph{agenda
  2179. buffer}. This buffer is read-only, but provides commands to visit the
  2180. corresponding locations in the original Org-mode files, and even to
  2181. edit these files remotely.
  2182. @menu
  2183. * Agenda files:: Files being searched for agenda information
  2184. * Agenda dispatcher:: Keyboard access to agenda views
  2185. * Weekly/Daily agenda:: The calendar page with current tasks
  2186. * Global TODO list:: All unfinished action items
  2187. * Matching headline tags:: Structured information with fine-tuned search
  2188. * Timeline:: Time-sorted view for single file
  2189. * Agenda commands:: Remote editing of org trees
  2190. @end menu
  2191. @node Agenda files, Agenda dispatcher, Agenda views, Agenda views
  2192. @section Agenda files
  2193. The information to be shown is collected from all @emph{agenda files},
  2194. the files listed in the variable @code{org-agenda-files}@footnote{If the
  2195. value of that variable is not a list, but a single file name, then the
  2196. list of agenda files will be maintained in that external file.}. Thus even
  2197. if you only work with a single Org-mode file, this file should be put
  2198. into that list@footnote{When using the dispatcher pressing @kbd{1}
  2199. before selecting a command will actually limit the command to the
  2200. current file, and ignore @code{org-agenda-files} until the next
  2201. dispatcher command.}. You can customize @code{org-agenda-files}, but
  2202. the easiest way to maintain it is through the following commands
  2203. @cindex files, adding to agenda list
  2204. @table @kbd
  2205. @kindex C-c [
  2206. @item C-c [
  2207. Add current file to the list of agenda files. The file is added to
  2208. the front of the list. If it was already in the list, it is moved to
  2209. the front. With prefix arg, file is added/moved to the end.
  2210. @kindex C-c ]
  2211. @item C-c ]
  2212. Remove current file from the list of agenda files.
  2213. @kindex C-,
  2214. @item C-,
  2215. Cycle through agenda file list, visiting one file after the other.
  2216. @end table
  2217. @noindent
  2218. The Org menu contains the current list of files and can be used
  2219. to visit any of them.
  2220. @node Agenda dispatcher, Weekly/Daily agenda, Agenda files, Agenda views
  2221. @section The agenda dispatcher
  2222. @cindex agenda dispatcher
  2223. @cindex dispatching agenda commands
  2224. @cindex custom agenda commands
  2225. @cindex agenda commands, custom
  2226. The views are created through a dispatcher that should be bound to a
  2227. global key, for example @kbd{C-c a} (@pxref{Installation and
  2228. activation}). In the following we will assume that @kbd{C-c a} is
  2229. indeed how the dispatcher is accessed and list keyboard access to
  2230. commands accordingly. After pressing @kbd{C-c a}, an additional
  2231. letter is required to execute a command. The dispatcher offers the
  2232. following default commands:
  2233. @table @kbd
  2234. @item a
  2235. Create the calendar-like agenda (@pxref{Weekly/Daily agenda}).
  2236. @item t / T
  2237. Create a list of all TODO items (@pxref{Global TODO list}).
  2238. @item m / M
  2239. Create a list of headlines matching a TAGS expression (@pxref{Matching
  2240. headline tags}).
  2241. @end table
  2242. You can also define custom commands that will be accessible through
  2243. the dispatcher, just like the default commands. Custom commands are
  2244. global searches for tags and specific TODO keywords, or a variety of
  2245. sparse tree creating commands (@pxref{Sparse trees}). As sparse trees
  2246. are only defined for a single org-mode file, these latter commands act
  2247. on the current buffer instead of the list of agenda files.
  2248. @kindex C-c a C
  2249. Custom commands are configured in the variable
  2250. @code{org-agenda-custom-commands}. You can customize this variable,
  2251. for example by pressing @kbd{C-c a C}. You can also directly set it
  2252. with Emacs Lisp in @file{.emacs}. For example:
  2253. @lisp
  2254. (setq org-agenda-custom-commands
  2255. '(("w" todo "WAITING")
  2256. ("u" tags "+BOSS-URGENT")
  2257. ("U" tags-tree "+BOSS-URGENT")
  2258. ("f" occur-tree "\\<FIXME\\>")))
  2259. @end lisp
  2260. @noindent will define @kbd{C-c a w} as a global search for
  2261. TODO entries with @samp{WAITING} as the TODO keyword, @kbd{C-c a u} as a
  2262. global tags search for headlines marked @samp{:BOSS:} but not
  2263. @samp{:URGENT:}, @kbd{C-c a U} to do the same search but only in the
  2264. current buffer and display the result as a sparse tree, and @kbd{C-c a
  2265. f} to create a sparse tree with all entries containing the word
  2266. @samp{FIXME}. For more information, look at the documentation string
  2267. of the variable @code{org-agenda-custom-commands}.
  2268. @node Weekly/Daily agenda, Global TODO list, Agenda dispatcher, Agenda views
  2269. @section The weekly/daily agenda
  2270. @cindex agenda
  2271. The purpose of the weekly/daily @emph{agenda} is to act like a page of
  2272. a paper agenda, showing all the tasks for the current week or day.
  2273. @table @kbd
  2274. @cindex org-agenda, command
  2275. @kindex C-c a a
  2276. @item C-c a a
  2277. Compile an agenda for the current week from a list of org files. The
  2278. agenda shows the entries for each day. With a @kbd{C-u} prefix (or
  2279. when the variable @code{org-agenda-include-all-todo} is @code{t}), all
  2280. unfinished TODO items (including those without a date) are also listed at
  2281. the beginning of the buffer, before the first date.@*
  2282. @end table
  2283. Remote editing from the agenda buffer means, for example, that you can
  2284. change the dates of deadlines and appointments from the agenda buffer.
  2285. The commands available in the Agenda buffer are listed in @ref{Agenda
  2286. commands}.
  2287. @menu
  2288. * Categories:: Not all tasks are equal
  2289. * Time-of-day specifications:: How the agenda knows the time
  2290. * Calendar/Diary integration:: Integrating Anniversaries and more
  2291. * Sorting of agenda items:: The order of things
  2292. @end menu
  2293. @node Categories, Time-of-day specifications, Weekly/Daily agenda, Weekly/Daily agenda
  2294. @subsection Categories
  2295. @cindex category
  2296. In the agenda buffer, each entry is preceded by a @emph{category},
  2297. which is derived from the file name. The category can also be set
  2298. with a special line anywhere in the buffer, looking like this:
  2299. @example
  2300. #+CATEGORY: Thesis
  2301. @end example
  2302. If there are several such lines in a file, each specifies the category
  2303. for the text below it (but the first category also applies to any text
  2304. before the first CATEGORY line). The display in the agenda buffer looks
  2305. best if the category is not longer than 10 characters.
  2306. @node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily agenda
  2307. @subsection Time-of-Day Specifications
  2308. Org-mode checks each agenda item for a time-of-day specification. The
  2309. time can be part of the time stamp that triggered inclusion into the
  2310. agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
  2311. ranges can be specified with two time stamps, like
  2312. @c
  2313. @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
  2314. In the headline of the entry itself, a time(range) may also appear as
  2315. plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda
  2316. integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
  2317. specifications in diary entries are recognized as well.
  2318. For agenda display, Org-mode extracts the time and displays it in a
  2319. standard 24 hour format as part of the prefix. The example times in
  2320. the previous paragraphs would end up in the agenda like this:
  2321. @example
  2322. 8:30-13:00 Arthur Dent lies in front of the bulldozer
  2323. 12:45...... Ford Prefect arrives and takes Arthur to the pub
  2324. 19:00...... The Vogon reads his poem
  2325. 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
  2326. @end example
  2327. If the agenda is in single-day mode, or for the display of today, the
  2328. timed entries are embedded in a time grid, like
  2329. @example
  2330. 8:00...... ------------------
  2331. 8:30-13:00 Arthur Dent lies in front of the bulldozer
  2332. 10:00...... ------------------
  2333. 12:00...... ------------------
  2334. 12:45...... Ford Prefect arrives and takes Arthur to the pub
  2335. 14:00...... ------------------
  2336. 16:00...... ------------------
  2337. 18:00...... ------------------
  2338. 19:00...... The Vogon reads his poem
  2339. 20:00...... ------------------
  2340. 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
  2341. @end example
  2342. The time grid can be turned on and off with the variable
  2343. @code{org-agenda-use-time-grid}, and can be configured with
  2344. @code{org-agenda-time-grid}.
  2345. @node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily agenda
  2346. @subsection Calendar/Diary integration
  2347. @cindex calendar integration
  2348. @cindex diary integration
  2349. Emacs contains the calendar and diary by Edward M. Reingold. The
  2350. calendar displays a three-month calendar with holidays from different
  2351. countries and cultures. The diary allows you to keep track of
  2352. anniversaries, lunar phases, sunrise/set, recurrent appointments
  2353. (weekly, monthly) and more. In this way, it is quite complementary to
  2354. Org-mode. It can be very useful to combine output from Org-mode with
  2355. the diary.
  2356. In order to include entries from the Emacs diary into Org-mode's
  2357. agenda, you only need to customize the variable
  2358. @lisp
  2359. (setq org-agenda-include-diary t)
  2360. @end lisp
  2361. @noindent After that, everything will happen automatically. All diary
  2362. entries including holidays, anniversaries etc will be included in the
  2363. agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and
  2364. @key{RET} can be used from the agenda buffer to jump to the diary
  2365. file in order to edit existing diary entries. The @kbd{i} command to
  2366. insert new entries for the current date works in the agenda buffer, as
  2367. well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
  2368. Sunrise/Sunset times, show lunar phases and to convert to other
  2369. calendars, respectively. @kbd{c} can be used to switch back and forth
  2370. between calendar and agenda.
  2371. @node Sorting of agenda items, , Calendar/Diary integration, Weekly/Daily agenda
  2372. @subsection Sorting of agenda items
  2373. @cindex sorting, of agenda items
  2374. @cindex priorities, of agenda items
  2375. The entries for each day are sorted. The default order is to first
  2376. collect all items containing an explicit time-of-day specification.
  2377. These entries will be shown at the beginning of the list, as a
  2378. @emph{schedule} for the day. After that, items remain grouped in
  2379. categories, in the sequence given by @code{org-agenda-files}. Within
  2380. each category, items are sorted by priority (@pxref{Priorities}).
  2381. The priority is a numerical quantity composed of the base priority
  2382. (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
  2383. plus additional increments for overdue scheduled or deadline items.
  2384. Sorting can be customized using the variable
  2385. @code{org-agenda-sorting-strategy}.
  2386. @node Global TODO list, Matching headline tags, Weekly/Daily agenda, Agenda views
  2387. @section The global TODO list
  2388. @cindex global TODO list
  2389. @cindex TODO list, global
  2390. The global TODO list contains all unfinished TODO items, formatted and
  2391. collected into a single place.
  2392. @table @kbd
  2393. @kindex C-c a t
  2394. @item C-c a t
  2395. Show the global TODO list. This collects the TODO items from all
  2396. agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
  2397. @code{agenda-mode}, so there are commands to examine and manipulate
  2398. the TODO entries directly from that buffer (@pxref{Agenda commands}).
  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}
  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. setting words can 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 set 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 created by @value{AUTHOR}, 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. @i{Thomas Baumann} contributed the code for links to the MH-E email
  3835. system.
  3836. @item
  3837. @i{Alex Bochannek} provided a patch for rounding time stamps.
  3838. @item
  3839. @i{Charles Cave}'s suggestion sparked the implementation of templates
  3840. for Remember.
  3841. @item
  3842. @i{Pavel Chalmoviansky} influenced the agenda treatment of items with
  3843. specified time.
  3844. @item
  3845. @i{Gregory Chenov} patched support for lisp forms into table
  3846. calculations and improved XEmacs compatibility.
  3847. @item
  3848. @i{Sacha Chua} suggested to copy some linking code from Planner.
  3849. @item
  3850. @i{Kees Dullemond} inspired the use of narrowed tabled columns.
  3851. @item
  3852. @i{Christian Egli} converted the documentation into TeXInfo format,
  3853. patched CSS formatting into the HTML exporter, and inspired the agenda.
  3854. @item
  3855. @i{Nic Ferrier} contributed mailcap and XOXO support.
  3856. @item
  3857. @i{Kai Grossjohann} pointed out key-binding conflicts caused by
  3858. Org-mode.
  3859. @item
  3860. @i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler
  3861. happy.
  3862. @item
  3863. @i{Todd Neal} provided patches for links to Info files and elisp forms.
  3864. @item
  3865. @i{Tim O'Callaghan} suggested in-file links, search options for general
  3866. file links, and TAGS.
  3867. @item
  3868. @i{Oliver Oppitz} suggested multi-state TODO items.
  3869. @item
  3870. @i{Scott Otterson} sparked the introduction of descriptive text for
  3871. links, among other things.
  3872. @item
  3873. @i{Pete Phillips} helped the development of the TAGS feature.
  3874. @item
  3875. @i{T.V. Raman} reported bugs and suggested improvements.
  3876. @item
  3877. @i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality
  3878. control.
  3879. @item
  3880. @i{Kevin Rogers} contributed code to access VM files on remote hosts.
  3881. @item
  3882. @i{Frank Ruell} solved the mystery of the @code{keymapp nil} bug, a
  3883. conflict with @file{allout.el}.
  3884. @item
  3885. @i{Philip Rooke} created the Org-mode reference card and provided lots
  3886. of feedback.
  3887. @item
  3888. @i{Christian Schlauer} proposed angular brackets around links, among
  3889. other things.
  3890. @item
  3891. Linking to VM/BBDB/GNUS was inspired by @i{Tom Shannon}'s
  3892. @file{organizer-mode.el}.
  3893. @item
  3894. @i{David O'Toole} wrote @file{org-publish.el} and came up with lots is
  3895. ideas for small changes.
  3896. @item
  3897. @i{J@"urgen Vollmer} contributed code generating the table of contents
  3898. in HTML output.
  3899. @item
  3900. @i{Chris Wallace} provided a patch implementing the @samp{QUOTE}
  3901. keyword.
  3902. @item
  3903. @i{David Wainberg} suggested archiving, and improvements to the linking
  3904. system.
  3905. @item
  3906. @i{John Wiegley} wrote @file{emacs-wiki.el} and @file{planner.el}. The
  3907. development of Org-mode was fully independent, and both systems are
  3908. really different beasts in their basic ideas and implementation details.
  3909. I later looked at John's code, however, and learned from his
  3910. implementation of (i) links where the link itself is hidden and only a
  3911. description is shown, and (ii) popping up a calendar to select a date.
  3912. @item
  3913. @i{Carsten Wimmer} suggested some changes and helped fix a bug in
  3914. linking to GNUS.
  3915. @item
  3916. @i{Roland Winkler} requested additional keybindings to make Org-mode
  3917. work on a tty.
  3918. @item
  3919. @i{Piotr Zielinski} wrote @file{org-mouse.el} and showed how to follow
  3920. links with mouse-1.
  3921. @end itemize
  3922. @node Index, Key Index, Miscellaneous, Top
  3923. @chapter Index
  3924. @printindex cp
  3925. @node Key Index, , Index, Top
  3926. @chapter Key Index
  3927. @printindex ky
  3928. @bye
  3929. @ignore
  3930. arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac
  3931. @end ignore