org.texi 144 KB

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