org.texi 150 KB

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