org.texi 138 KB

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