1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283 |
- \input texinfo
- c %**start of header
- settitle The Org Manual
- include org-version.inc
- set MAINTAINERSITE
- set AUTHOR Carsten Dominik
- set MAINTAINEREMAIL
- set MAINTAINERCONTACT
- c %**end of header
- c -----------------------------------------------------------------------------
- c =======================================
- c When set, commands names are shown. When clear, they are not shown.
- c Below we define the following macros for Org key tables:
- c orgcmd{key,cmd} Key with command name
- itemx
- c orgcmdtkc{text,key,cmd} Like orgcmd,special text instead of key
- c orgcmdkxkc{key1,key2,cmd} Two keys with one command name, but
- itemx
- c xorgcmdkskc{key1,key2,cmd} Same as previous, but use
- c orgcmdkkcc{key1,key2,cmd1,cmd2} Two keys and two commands
- c Inserts:
- macro orgkey{key}
- item
- end macro
- kindex \key\
- kbd{\key\}
- c one key with a command
- item KEY COMMAND
- ifset cmdnames
- findex \command\
- item hskip 0pt plus 1filll
- end iftex
- item tie{}tie{}code{\command\})
- end ifset
- kindex \key\
- kbd{\key\}
- end macro
- itemx
- itemx KEY COMMAND
- ifset cmdnames
- findex \command\
- itemx hskip 0pt plus 1filll
- end iftex
- itemx tie{}tie{}code{\command\})
- end ifset
- kindex \key\
- kbd{\key\}
- end macro
- c Inserts:
- macro orgcmdnki{key,command}
- findex \command\
- item hskip 0pt plus 1filll
- end iftex
- item tie{}tie{}code{\command\})
- end ifset
- item
- end ifclear
- c one key with a command, and special text to replace key in item
- item TEXT COMMAND
- ifset cmdnames
- findex \command\
- item hskip 0pt plus 1filll
- end iftex
- item tie{}tie{}code{\command\})
- end ifset
- kindex \key\
- kbd{\text\}
- end macro
- c Inserts:
- macro orgcmdkkc{key1,key2,command}
- kindex \key1\
- findex \command\
- item hskip 0pt plus 1filll
- end iftex
- item tie{}tie{}code{\command\})
- end ifset
- kindex \key1\
- item
- end ifclear
- c Two keys with one command name, but different functions, so format as
- itemx
- item KEY1
- itemx KEY2 COMMAND
- ifset cmdnames
- kindex \key2\
- iftex
- kbd{\key1\}
- kbd{\key2\} code{\command\}
- ifnottex
- kbd{\key1\}
- kbd{\key2\} tie{}tie{}(
- end ifnottex
- ifclear cmdnames
- kindex \key2\
- kbd{\key1\}
- kbd{\key2\}
- end macro
- c Inserts:
- macro orgcmdkskc{key1,key2,command}
- kindex \key1\
- findex \command\
- item hskip 0pt plus 1filll
- end iftex
- item tie{}tie{}code{\command\})
- end ifset
- kindex \key1\
- item
- end ifclear
- c Same as previous, but use
- c Inserts:
- macro xorgcmdkskc{key1,key2,command}
- kindex \key1\
- findex \command\
- itemx hskip 0pt plus 1filll
- end iftex
- itemx tie{}tie{}code{\command\})
- end ifset
- kindex \key1\
- itemx
- end ifclear
- c two keys with two commands
- item KEY1 COMMAND1
- itemx KEY2 COMMAND2
- ifset cmdnames
- kindex \key2\
- findex \command2\
- item hskip 0pt plus 1filll
- itemx hskip 0pt plus 1filll
- end iftex
- item tie{}tie{}code{\command1\})
- kbd{\key2\} tie{}tie{}(
- end ifnottex
- ifclear cmdnames
- kindex \key2\
- kbd{\key1\}
- kbd{\key2\}
- end macro
- iftex
- hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed}
- c Subheadings inside a table.
- ifinfo
- end ifinfo
- item
- end ifnotinfo
- copying
- This manual is for Org version
- copyright{} 2004--2016 Free Software Foundation, Inc.
- end quotation
- dircategory Emacs editing modes
- end direntry
- title The Org Manual
- value{VERSION}
- c The following two commands start the copyright page.
- vskip 0pt plus 1filll
- end titlepage
- shortcontents
- contents
- node Top, Introduction, (dir), (dir)
- insertcopying
- menu
- * Introduction:: Getting started
- * Document structure:: A tree works like your brain
- * Tables:: Pure magic for quick formatting
- * Hyperlinks:: Notes in context
- * TODO items:: Every tree branch can be a TODO item
- * Tags:: Tagging headlines and matching sets of tags
- * Properties and columns:: Storing information about an entry
- * Dates and times:: Making items useful for planning
- * Capture - Refile - Archive:: The ins and outs for projects
- * Agenda views:: Collecting information into views
- * Markup:: Prepare text for rich export
- * Exporting:: Sharing and publishing notes
- * Publishing:: Create a web site of linked Org files
- * Working with source code:: Export, evaluate, and tangle code blocks
- * Miscellaneous:: All the rest which did not fit elsewhere
- * Hacking:: How to hack your way around
- * MobileOrg:: Viewing and capture on a mobile device
- * History and acknowledgments:: How Org came into being
- * GNU Free Documentation License:: The license for this documentation.
- * Main Index:: An index of Org's concepts and features
- * Key Index:: Key bindings and where they are described
- * Command and Function Index:: Command names and some internal functions
- * Variable Index:: Variables mentioned in the manual
- LaTeX{}:: LaTeX can be freely used inside Org documents
- Embedded
- LaTeX{} fragments:: Complex formulas made easy
- * Previewing
- LaTeX{} export:: Exporting to
- LaTeX{} export
- * LaTeX{} and PDF
- * LaTeX{}
- *
- LaTeX{} code:: Incorporating literal
- LaTeX{} export:: Specific attributes for tables
- * Images in
- LaTeX{} export:: Specific attributes for plain lists
- * Source blocks in
- LaTeX{} export:: Specific attributes for example blocks
- * Special blocks in
- LaTeX{} export:: Specific attributes for horizontal rules
- OpenDocument Text export
- * Pre-requisites for ODT export:: What packages ODT exporter relies on
- * ODT export commands:: How to invoke ODT export
- * ODT specific export settings:: Export settings for ODT
- * Extending ODT export:: How to produce samp{pdf} files
- * Applying custom styles:: How to apply custom styles to the output
- * Links in ODT export:: How links will be interpreted and formatted
- * Tables in ODT export:: How Tables are exported
- * Images in ODT export:: How to insert images
- * Math formatting in ODT export:: How
- LaTeX{} math snippets:: How to embed
- samp{Top} node:: Installing a manual in Info Top node
- * Headings and sectioning structure:: Building document structure
- * Indices:: Creating indices
- * Quoting Texinfo code:: Incorporating literal Texinfo code
- * Plain lists in Texinfo export:: Specific attributes for plain lists
- * Tables in Texinfo export:: Specific attributes for tables
- * Images in Texinfo export:: Specific attributes for images
- * Special blocks in Texinfo export:: Specific attributes for special blocks
- * A Texinfo example:: Illustrating Org to Texinfo process
- Publishing
- * Configuration:: Defining projects
- * Uploading files:: How to get files up on the server
- * Sample configuration:: Example projects
- * Triggering publication:: Publication commands
- Configuration
- * Project alist:: The central configuration variable
- * Sources and destinations:: From here to there
- * Selecting files:: What files are part of the project?
- * Publishing action:: Setting the function doing the publishing
- * Publishing options:: Tweaking HTML/
- samp{src} code blocks
- * results:: Specify results type; how to collect
- * file:: Specify a path for output file
- * file-desc:: Specify a description for file results
- * file-ext:: Specify an extension for file output
- * output-dir:: Specify a directory for output file
- * dir:: Specify the default directory for code block execution
- * exports:: Specify exporting code, results, both, none
- * tangle:: Toggle tangling; or specify file name
- * mkdirp:: Toggle for parent directory creation for target files during tangling
- * comments:: Toggle insertion of comments in tangled code files
- * padline:: Control insertion of padding lines in tangled code files
- * no-expand:: Turn off variable assignment and noweb expansion during tangling
- * session:: Preserve the state of code evaluation
- * noweb:: Toggle expansion of noweb references
- * noweb-ref:: Specify block's noweb reference resolution target
- * noweb-sep:: String to separate noweb references
- * cache:: Avoid re-evaluating unchanged code blocks
- * sep:: Delimiter for writing tabular results outside Org
- * hlines:: Handle horizontal lines in tables
- * colnames:: Handle column names in tables
- * rownames:: Handle row names in tables
- * shebang:: Make tangled files executable
- * tangle-mode:: Set permission of tangled files
- * eval:: Limit evaluation of specific code blocks
- * wrap:: Mark source block evaluation results
- * post:: Post processing of results of code block evaluation
- * prologue:: Text to prepend to body of code block
- * epilogue:: Text to append to body of code block
- Miscellaneous
- * Completion:: M-TAB guesses completions
- * Easy templates:: Quick insertion of structural elements
- * Speed keys:: Electric commands at the beginning of a headline
- * Code evaluation security:: Org mode files evaluate inline code
- * Customization:: Adapting Org to changing tastes
- * In-buffer settings:: Overview of the #+KEYWORDS
- * The very busy C-c C-c key:: When in doubt, press C-c C-c
- * Clean view:: Getting rid of leading stars in the outline
- * TTY keys:: Using Org on a tty
- * Interaction:: With other Emacs packages
- * org-crypt:: Encrypting Org files
- Interaction with other packages
- * Cooperation:: Packages Org cooperates with
- * Conflicts:: Packages that lead to conflicts
- Hacking
- * Hooks:: How to reach into Org's internals
- * Add-on packages:: Available extensions
- * Adding hyperlink types:: New custom link types
- * Adding export back-ends:: How to write new export back-ends
- * Context-sensitive commands:: How to add functionality to such commands
- * Tables in arbitrary syntax:: Orgtbl for
- LaTeX{} example:: Step by step, almost a tutorial
- * Translator functions:: Copy and modify
- * Radio lists:: Sending and receiving lists
- MobileOrg
- * Setting up the staging area:: For the mobile device
- * Pushing to MobileOrg:: Uploading Org files and agendas
- * Pulling from MobileOrg:: Integrating captured and flagged items
- end menu
- chapter Introduction
- menu
- * Summary:: Brief summary of what Org does
- * Installation:: Installing Org
- * Activation:: How to activate Org for certain buffers
- * Feedback:: Bug reports, ideas, patches etc.
- * Conventions:: Typesetting conventions in the manual
- node Summary
- cindex summary
- Org is a mode for keeping notes, maintaining TODO lists, and project planning
- with a fast and effective plain-text system. It also is an authoring system
- with unique support for literate programming and reproducible research.
- Org is implemented on top of Outline mode, which makes it possible to keep
- the content of large files well structured. Visibility cycling and structure
- editing help to work with the tree. Tables are easily created with a
- built-in table editor. Plain text URL-like links connect to websites,
- emails, Usenet messages, BBDB entries, and any files related to the projects.
- Org develops organizational tasks around notes files that contain lists or
- information about projects as plain text. Project planning and task
- management makes use of metadata which is part of an outline node. Based on
- this data, specific entries can be extracted in queries and create dynamic
- LaTeX{}, Open Document, and Markdown. New
- export backends can be derived from existing ones, or defined from scratch.
- Org files can include source code blocks, which makes Org uniquely suited for
- authoring technical documents with code examples. Org source code blocks are
- fully functional; they can be evaluated in place and their results can be
- captured in the file. This makes it possible to create a single file
- reproducible research compendium.
- Org keeps simple things simple. When first fired up, it should feel like a
- straightforward, easy to use outliner. Complexity is not imposed, but a
- large amount of functionality is available when needed. Org is a toolbox.
- Many users actually run only a (very personal) fraction of Org's capabilities, and
- know that there is more whenever they need it.
- All of this is achieved with strictly plain text files, the most portable and
- future-proof file format. Org runs in Emacs. Emacs is one of the most
- widely ported programs, so that Org mode is available on every major
- platform.
- uref{http://orgmode.org}.
- uref{http://www.network-theory.co.uk/org/manual/, paperback book from
- Network Theory Ltd.}
- node Installation
- cindex installation
- Org is part of recent distributions of GNU Emacs, so you normally don't need
- to install it. If, for one reason or another, you want to install Org on top
- of this pre-packaged version, there are three ways to do it:
- bullet
- item By downloading Org as an archive.
- end itemize
- We
- subsubheading Using Emacs packaging system
- Recent Emacs distributions include a packaging system which lets you install
- Elisp libraries. You can install Org with
- noindent code{.org} file has
- been visited, i.e., where no Org built-in function have been loaded.
- Otherwise autoload Org functions will mess up the installation.
- Then, to make sure your Org configuration is taken into account, initialize
- the package system with
- uref{http://orgmode.org/elpa.html, Org ELPA page}.
- uref{http://orgmode.org/, Org's
- website}. In this case, make sure you set the load-path correctly in your
- Emacs init file:
- end lisp
- The downloaded archive contains contributed libraries that are not included
- in Emacs. If you want to use them, add the
- lisp
- (add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t)
- code{make help} to list compilation and installation options.
- example
- $ cd ~/src/
- $ git clone git://orgmode.org/org-mode.git
- $ make autoloads
- code{make autoloads} is mandatory: it defines Org's
- version in
- file{org-loaddefs.el}.
- Remember to add the correct load-path as described in the method above.
- You can also compile with
- code{make doc}, create a local configuration with
- code{make install}. Please run
- uref{http://orgmode.org/worg/dev/org-build-system.html,
- Worg}.
- section Activation
- cindex autoload
- cindex global key bindings
- findex org-agenda
- findex org-store-link
- footnote{If you don't use font-lock globally, turn it on in Org buffer
- with
- pxref{Conflicts}).
- The four Org commands command{org-capture},
- command{org-iswitchb} should be accessible through
- global keys (i.e., anywhere in Emacs, not just in Org buffers). Here are
- suggested bindings for these keys, please modify the keys to your own
- liking.
- end lisp
- file{.org} extension use Org mode by default. To turn on Org
- mode in a file that does not have the extension
- example
- MY PROJECTS -*- mode: org; -*-
- vindex org-insert-mode-line-in-empty-file
- code{org-insert-mode-line-in-empty-file}.
- Many commands in Org work on the region if the region is
- code{transient-mark-mode} turned on, which is
- the default. If you do not like
- kbd{C-
- node Feedback
- cindex feedback
- cindex maintainer
- email{emacs-orgmodegnu.org}.
- You can subscribe to the list
- footnote{Please consider subscribing
- to the mailing list, in order to minimize the work the mailing list
- moderators have to do.}.
- For bug reports, please first try to reproduce the bug with the latest
- version of Org available---if you are running an outdated version, it is
- quite possible that the bug has been fixed already. If the bug persists,
- prepare a report and provide as much information as possible, including the
- version information of Emacs (key{RET}}) and Org
- (
- example
- end example
- example
- $ emacs -Q -l /path/to/minimal-org.el
- code{emacs -Q}. The
- lisp
- ;;; Minimal setup to load latest 'org-mode'
- ;; activate debugging
- (setq debug-on-error t
- debug-on-signal nil
- debug-on-quit nil)
- ;; add latest org-mode to load path
- (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp"))
- (add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t))
- enumerate
- item What did you expect to happen?
- end enumerate
- subsubheading How to create a useful backtrace
- emph{backtrace}.
- This is information from the built-in debugger about where and how the
- error occurred. Here is how to produce a useful backtrace:
- item
- Reload uncompiled versions of all Org mode Lisp files. The backtrace
- contains much more information if it is produced with uncompiled code.
- To do this, use
- kbd{C-u M-x org-reload RET}
- noindent
- or select
- item
- Go to the code{Enter Debugger on Error}.
- item
- When you hit the error, a
- kbd{C-x C-w}) and
- attach it to your bug report.
- node Conventions
- subsubheading TODO keywords, tags, properties, etc.
- Org mainly uses three types of keywords: TODO keywords, tags and property
- names. In this manual we use the following conventions:
- code
- itemx WAITING
- TODO keywords are written with all capitals, even if they are
- user-defined.
- itemx ARCHIVE
- User-defined tags are written in lowercase; built-in tags with special
- meaning are written with all capitals.
- itemx PRIORITY
- User-defined properties are capitalized; built-in properties with
- special meaning are written with all capitals.
- i{option keywords} (like
- i{environment keywords} (like
- code{HTML} environment). They are written in uppercase in the manual to
- enhance its readability, but you can use lowercase in your Org file.
- kindex C-c a
- kindex C-c c
- kbd{C-c a} for
- kbd{C-c c} for
- code{org-metaright}. In the manual we will, wherever
- possible, give the function that is internally called by the generic command.
- For example, in the chapter on document structure, key{right}} will
- be listed to call
- code{org-table-move-column-right}. If you prefer,
- you can compile the manual without the command names by unsetting the flag
- file{org.texi}.
- chapter Document structure
- cindex structure of document
- Org is based on Outline mode and provides flexible commands to
- edit the structure of the document.
- end menu
- section Outlines
- cindex Outline mode
- Org is implemented on top of Outline mode. Outlines allow a
- document to be organized in a hierarchical structure, which (at least
- for me) is the best representation of notes and thoughts. An overview
- of this structure is achieved by folding (hiding) large parts of the
- document to show only the general document structure and the parts
- currently being worked on. Org greatly simplifies the use of
- outlines by compressing the entire show/hide functionality into a single
- command, key{TAB} key.
- section Headlines
- cindex outline tree
- vindex org-special-ctrl-k
- footnote{See the variables
- code{org-special-ctrl-k}, and
- kbd{C-a},
- kbd{C-k} in headlines.}
- example
- * Top level headline
- ** Second level
- *** 3rd level
- some text
- *** 3rd level
- more text
- * Another top level headline
- vindex org-footnote-section
- code{org-footnote-section},
- which defaults to
- ref{Clean view}, describes a setup to realize this.
- code{org-cycle-separator-lines} to modify this behavior.
- section Visibility cycling
- cindex visibility cycling
- cindex show hidden text
- menu
- * Global and local cycling:: Cycling through various visibility states
- * Initial visibility:: Setting the initial visibility state
- * Catching invisible edits:: Preventing mistakes when editing invisible parts
- node Global and local cycling
- key{TAB} and
- key{TAB}} to change the visibility in the buffer.
- cindex subtree cycling
- cindex children, subtree visibility state
- table
- orgcmd{
- emph{Subtree cycling}: Rotate current subtree among the states
- end example
- vindex org-cycle-global-at-bob
- The cursor must be on a headline for this to work
- code{org-cycle-emulate-tab}.}. When the cursor is at the
- beginning of the buffer and the first line is not a headline, then
- footnote{see the
- option
- kbd{C-u
- cindex global visibility states
- cindex overview, global visibility state
- cindex show all, global visibility state
- key{TAB},org-global-cycle}
- key{TAB}
- example
- ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
- '--------------------------------------'
- kbd{S-
- kbd{S-
- cindex set startup visibility, command
- key{TAB},org-set-startup-visibility}
- Switch back to the startup visibility of the buffer (
- cindex show all, command
- key{TAB},outline-show-all}
- Show all, including drawers.
- orgcmd{C-c C-r,org-reveal}
- Reveal context around point, showing the current entry, the following heading
- and the hierarchy above. Useful for working near a location that has been
- exposed by a sparse tree command (
- pxref{Agenda commands}). With a prefix argument show, on each
- level, all sibling headings. With a double prefix argument, also show the
- entire subtree of the parent.
- orgcmd{C-c C-k,outline-show-branches}
- Expose all the headings of the subtree, CONTENT view for just one subtree.
- orgcmd{C-c
- .
- footnote{The indirect buffer
- (
- kbd{C-u} prefix, do not remove the previously used indirect buffer.
- i{visible} text in the region into the kill ring.
- node Initial visibility
- cindex visibility, initialize
- vindex org-agenda-inhibit-startup
- code{overview}, STARTUP keyword
- code{content}, STARTUP keyword
- code{showall}, STARTUP keyword
- code{showeverything}, STARTUP keyword
- When Emacs first visits an Org file, the global state is set to OVERVIEW,
- i.e., only the top level headlines are visible
- code{org-agenda-inhibit-startup} is non-
- pxref{Speeding up
- your agendas}).}. This can be configured through the variable
- example
- #+STARTUP: overview
- #+STARTUP: content
- #+STARTUP: showall
- #+STARTUP: showeverything
- cindex property, VISIBILITY
- samp{VISIBILITY} property (
- code{folded}, code{content}, and
- table
- orgcmd{C-u C-u
- samp{VISIBILITY} properties in individual
- entries.
- node Catching invisible edits
- vindex org-catch-invisible-edits
- code{org-catch-invisible-edits} to non-
- node Motion
- cindex motion, between headlines
- cindex headline navigation
- The following commands jump to other headlines in the buffer.
- asis
- orgcmd{C-c C-p,org-previous-visible-heading}
- Previous heading.
- orgcmd{C-c C-b,org-backward-same-level}
- Previous heading same level.
- orgcmd{C-c C-j,org-goto}
- Jump to a different place without changing the current outline
- visibility. Shows the document structure in a temporary buffer, where
- you can use the following keys to find your destination:
- example
- r{Cycle visibility.}
- key{up}
- key{RET}
- kbd{/}
- r{The following keys work if you turn off
- r{Next/previous visible headline.}
- f / b
- r{One level up.}
- 0-9
- r{Quit}
- vindex org-goto-interface
- code{org-goto-interface}.
- node Structure editing
- cindex structure editing
- cindex promotion, of subtrees
- cindex subtree, cut and paste
- cindex cutting, of subtrees
- cindex sorting, of subtrees
- table
- orgcmd{M-
- vindex org-M-RET-may-split-line
- Insert a new heading, item or row.
- If the command is used at the
- pxref{Plain lists}) at point, the new
- heading/item is created
- code{org-M-RET-may-split-line}.
- Calling the command with a
- kbd{C-u C-u} prefix, the new heading is created at the end of
- the parent subtree instead.
- key{RET},org-insert-heading-respect-content}
- Insert a new heading at the end of the current subtree.
- key{RET},org-insert-todo-heading}
- code{org-treat-insert-todo-heading-as-state-change}.
- key{RET},org-insert-todo-heading-respect-content}
- Insert new TODO entry with same level as current heading. Like
- key{RET}}, the new headline will be inserted after the current
- subtree.
- key{TAB},org-cycle}
- In a new entry with no text yet, the first
- key{TAB} makes it a parent,
- and so on, all the way to top level. Yet another
- orgcmd{M-
- orgcmd{M-
- orgcmd{M-S-
- orgcmd{M-S-
- orgcmd{M-S-
- orgcmd{M-S-
- orgcmd{M-h,org-mark-element}
- Mark the element at point. Hitting repeatedly will mark subsequent elements
- of the one just marked. E.g., hitting
- key{M-h} immediately again will mark the next one.
- orgcmd{C-c C-x C-w,org-cut-subtree}
- Kill subtree, i.e., remove it from buffer but save in kill ring.
- With a numeric prefix argument N, kill N sequential subtrees.
- orgcmd{C-c C-x C-y,org-paste-subtree}
- Yank subtree from kill ring. This does modify the level of the subtree to
- make sure the tree fits in nicely at the yank position. The yank level can
- also be specified with a numeric prefix argument, or by yanking after a
- headline marker like
- orgcmd{C-y,org-yank}
- vindex org-yank-folded-subtrees
- Depending on the options
- code{org-yank-folded-subtrees}, Org's internal
- kbd{C-c
- C-x C-y}. With the default settings, no level adjustment will take place,
- but the yanked tree will be folded unless doing so would swallow text
- previously visible. Any prefix argument to this command will force a normal
- kbd{C-u C-y}. If you use
- orgcmd{C-c C-x c,org-clone-subtree-with-time-shift}
- Clone a subtree by making a number of sibling copies of it. You will be
- prompted for the number of copies to make, and you can also specify if any
- timestamps in the entry should be shifted. This can be useful, for example,
- to create a number of tasks related to a series of lectures to prepare. For
- more details, see the docstring of the command
- orgcmd{C-c C-w,org-refile}
- Refile entry or region to a different location.
- orgcmd{C-c ^,org-sort}
- Sort same-level entries. When there is an active region, all entries in the
- region will be sorted. Otherwise the children of the current headline are
- sorted. The command prompts for the sorting method, which can be
- alphabetically, numerically, by time (first timestamp with active preferred,
- creation time, scheduled time, deadline time), by priority, by TODO keyword
- (in the sequence the keywords have been defined in the setup) or by the value
- of a property. Reverse sorting is possible as well. You can also supply
- your own function to extract the sorting key. With a
- orgcmd{C-x n s,org-narrow-to-subtree}
- Narrow buffer to current subtree.
- orgcmd{C-x n w,widen}
- Widen buffer to remove narrowing.
- end table
- cindex active region
- pxref{Tables}), the Meta-Cursor keys have different
- functionality.
- section Sparse trees
- cindex trees, sparse
- cindex occur, command
- emph{sparse
- trees} for selected information in an outline tree, so that the entire
- document is folded as much as possible, but the selected information is made
- visible along with the headline structure above it
- code{org-show-context-detail} to decide how much context is shown
- around each match.}. Just try it out and you will see immediately how it
- works.
- Org mode contains several commands for creating such trees, all these
- commands can be accessed through a dispatcher:
- asis
- orgcmdkkc{C-c / r,C-c / /,org-occur}
- footnote{This depends on the option
- kbd{C-c C-c}.
- When called with a
- orgcmdkkc{M-g n,M-g M-n,next-error}
- Jump to the next sparse tree match in this buffer.
- end table
- vindex org-agenda-custom-commands
- For frequently used sparse trees of specific search strings, you can
- use the option
- pxref{Agenda dispatcher}).
- For example:
- end lisp
- kbd{C-c a f} as a shortcut for creating
- a sparse tree matching the string
- kindex C-c C-e C-v
- cindex visible text, printing
- To print a sparse tree, you can use the Emacs command
- kbd{C-c C-e C-v} to export only the visible part
- of the document and print the resulting file.
- section Plain lists
- cindex lists, plain
- cindex ordered lists
- Within an entry of the outline tree, hand-formatted lists can provide
- additional structure. They also provide a way to create lists of checkboxes
- (
- pxref{Exporting}) can parse and format them.
- Org knows ordered lists, unordered lists, and description lists.
- bullet
- emph{Unordered} list items start with samp{+}, or
- footnote{When using
- samp{*}
- is supported, it may be better to not use it for plain list items.} as
- bullets.
- vindex org-plain-list-ordered-item-terminator
- emph{Ordered} list items start with a numeral followed by either a period or
- a right parenthesis
- code{org-plain-list-ordered-item-terminator}.}, such as
- samp{1)}samp{a.}, samp{a)} and
- code{org-list-allow-alphabetical}. To minimize
- confusion with normal text, those are limited to one character only. Beyond
- that limit, bullets will automatically fallback to numbers.}. If you want a
- list to start with a different value (e.g., 20), start the text of the item
- with footnote{If there's a checkbox in the item, the cookie
- must be put
- code{[b]}.}. Those constructs can
- be used in any item of the list in order to enforce a particular numbering.
- emph{Description} list items are unordered list items, and contain the
- separator emph{term} from the
- description.
- samp{10.}, then the
- 2--digit numbers must be written left-aligned with the other numbers in the
- list. An item ends before the next line that is less or equally indented
- than its bullet/number.
- footnote{See also
- example
- b{Elijah Wood} :: He plays Frodo
- -
- i{The Goonies}.
- end example
- Org supports these lists by tuning filling and wrapping commands to deal with
- them correctly, and by exporting them properly (
- code{#+BEGIN_...} blocks can be indented to signal that they
- belong to a particular item.
- vindex org-list-indent-offset
- If you find that using a different bullet for a sub-list (than that used for
- the current list-level) improves readability, customize the variable
- code{org-list-indent-offset}.
- code{org-list-automatic-rules}
- to disable them individually.
- asis
- key{TAB},org-cycle}
- vindex org-cycle-include-plain-lists
- Items can be folded just like headline levels. Normally this works only if
- the cursor is on a plain list item. For more details, see the variable
- code{integrate}, plain list items will be treated like low-level
- headlines. The level of an item is then given by the indentation of the
- bullet/number. Items are always subordinate to real headlines, however; the
- hierarchies remain completely separated. In a new item with no text yet, the
- first
- key{TAB}s move the item to meaningful levels in the list
- and eventually get it back to its initial position.
- key{RET},org-insert-heading}
- vindex org-list-automatic-rules
- Insert new item at current level. With a prefix argument, force a new
- heading (
- emph{split} in two, and the second part becomes the
- new item
- code{org-M-RET-may-split-line}.}. If this command is executed
- emph{before} the current
- one.
- table
- kindex M-S-
- item M-S-
- pxref{Checkboxes}).
- key{down}
- itemx S-down
- vindex org-support-shift-select
- footnote{If you want to
- cycle around items that way, you may customize
- code{org-support-shift-select} is off. If not, you can still use paragraph
- jumping commands like key{up}} and key{down}} to quite
- similar effect.
- key{up}
- key{down}
- itemx M-down
- Move the item including subitems up/down
- code{org-list-use-circular-motion} for a cyclic behavior.} (swap with
- previous/next item of same indentation). If the list is ordered, renumbering
- is automatic.
- key{left}
- key{right}
- itemx M-right
- Decrease/increase the indentation of an item, leaving children alone.
- key{left}
- key{right}
- key{left}
- key{right}
- Decrease/increase the indentation of the item, including subitems.
- Initially, the item tree is selected based on current indentation. When
- these commands are executed several times in direct succession, the initially
- selected region is used, even if the new indentation would imply a different
- hierarchy. To use the new hierarchy, break the command chain with a cursor
- motion or so.
- As a special case, using this command on the very first item of a list will
- move the whole list. This behavior can be disabled by configuring
- emph{after} the list.
- item C-c C-c
- If there is a checkbox (
- kindex C-c -
- item C-c -
- Cycle the entire list level through the different itemize/enumerate bullets
- (samp{+}, samp{1.},
- code{org-plain-list-ordered-item-terminator}, the type of list,
- and its indentation. With a numeric prefix argument N, select the Nth bullet
- from this list. If there is an active region when calling this, all selected
- lines are converted to list items. With a prefix argument, selected text is
- changed into a single item. If the first line already was a list item, any
- item marker will be removed from the list. Finally, even without an active
- region, a normal line will be converted into a list item.
- item C-c *
- Turn a plain list item into a headline (so that it becomes a subheading at
- its location).
- kindex C-c C-*
- pxref{Checkboxes}) will become TODO (resp. DONE) keywords when unchecked
- (resp. checked).
- key{left}
- key{right}
- vindex org-support-shift-select
- This command also cycles bullet styles when the cursor in on the bullet or
- anywhere in an item line, details depending on
- kindex C-c ^
- item C-c ^
- Sort the plain list. You will be prompted for the sorting method:
- numerically, alphabetically, by time, by checked status for check lists,
- or by a custom function.
- node Drawers
- cindex drawers
- cindex org-insert-drawer
- emph{drawers}. They
- can contain anything but a headline and another drawer. Drawers look like
- this:
- end example
- You can interactively insert drawers at point by calling
- key{C-c C-x d}. With an active
- region, this command will put the region inside the drawer. With a prefix
- argument, this command calls
- key{M-TAB}.
- Visibility cycling (
- key{TAB} there. Org mode uses the
- pxref{Properties and columns}), and you can also arrange
- for state change notes (
- pxref{Clocking work time}) to be stored in a drawer
- table
- kindex C-c C-z
- end table
- vindex org-export-with-properties
- You can select the name of the drawers which should be exported with
- code{org-export-with-properties} instead.
- section Blocks
- cindex blocks, folding
- Org mode uses begin...end blocks for various purposes from including source
- code examples (
- pxref{Clocking work time}). These blocks can be folded and
- unfolded by pressing TAB in the begin line. You can also get all blocks
- folded at startup by configuring the option
- cindex
- cindex
- example
- #+STARTUP: hideblocks
- #+STARTUP: nohideblocks
- node Footnotes
- cindex footnotes
- Org mode supports the creation of footnotes.
- A footnote is started by a footnote marker in square brackets in column 0, no
- indentation allowed. It ends at the next footnote definition, headline, or
- after two consecutive empty lines. The footnote reference is simply the
- marker in square brackets, inside text. Markers always start with
- example
- The Org homepage[fn:1] now looks a lot better than it used to.
- ...
- [fn:1] The link is: http://orgmode.org
- emph{named} footnotes and
- optional inline definition. Here are the valid references:
- code
- code{name} is a unique label word, or, for
- simplicity of automatic creation, a number.
- LaTeX{}-like anonymous footnote where the definition is given directly at the
- reference point.
- code{[fn:name]} to create additional references.
- vindex org-footnote-auto-label
- Footnote labels can be created automatically, or you can create names yourself.
- This is handled by the variable
- code{#+STARTUP} keywords. See the docstring of that variable
- for details.
- table
- kindex C-c C-x f
- vindex org-footnote-define-inline
- vindex org-footnote-auto-adjust
- Otherwise, create a new footnote. Depending on the option
- footnote{The corresponding in-buffer
- setting is: code{#+STARTUP: nofninline}}, the
- definition will be placed right into the text as part of the reference, or
- separately into the location determined by the option
- example
- s
- r{Org makes no effort to sort footnote definitions into a particular}
-
- r{also move entries according to
- r{sorting after each insertion/deletion can be configured using the}
- code{org-footnote-auto-adjust}.}
- r code{fn:N} footnotes. Automatic renumbering}
-
- r{
- r{Short for first code{s} action.}
- n
- r{inline definitions) into a special section, and then numbering them}
-
- r{Delete the footnote at point, and all definitions of and references}
-
- end example
- Depending on the variable footnote{the
- corresponding in-buffer options are code{nofnadjust}.},
- renumbering and sorting footnotes can be automatic after each insertion or
- deletion.
- item C-c C-c
- If the cursor is on a footnote reference, jump to the definition. If it is a
- the definition, jump back to the reference. When called at a footnote
- location with a prefix argument, offer the same menu as
- kindex C-c C-o
- kindex mouse-2
- r{or} mouse-1/2
- Footnote labels are also links to the corresponding definition/reference, and
- you can use the usual commands to follow these links.
- kindex C-c '
- item C-c '
- Edit the footnote definition corresponding to the reference at point in
- a seperate window. The window can be closed by pressing
- end table
- section The Orgstruct minor mode
- cindex minor mode for structure editing
- If you like the intuitive way the Org mode structure editing and list
- formatting works, you might want to use these commands in other modes like
- Text mode or Mail mode as well. The minor mode
- kbd{M-x orgstruct-mode RET}, or
- turn it on by default, for example in Message mode, with one of:
- end lisp
- When this mode is active and the cursor is on a line that looks to Org like a
- headline or the first line of a list item, most structure editing commands
- will work, even if the same keys normally have different functionality in the
- major mode you are using. If the cursor is not in one of those special
- lines, Orgstruct mode lurks silently in the shadows.
- When you use
- vindex orgstruct-heading-prefix-regexp
- You can also use Org structure editing to fold and unfold headlines in
- code{orgstruct-heading-prefix-regexp}:
- the regular expression must match the local prefix to use before Org's
- headlines. For example, if you set this variable to
- code{org-demote} are disabled when the
- prefix is set, but folding/unfolding will work correctly.
- section Org syntax
- uref{http://orgmode.org/worg/dev/org-syntax.html, a draft on
- Worg}, written and maintained by Nicolas Goaziou. It defines Org's core
- internal concepts such as code{sections},
- code{(greater) elements} and
- lisp
- M-: (org-element-parse-buffer) RET
- cindex syntax checker
- code{org-lint} command.
- chapter Tables
- cindex editing tables
- Org comes with a fast and intuitive table editor. Spreadsheet-like
- calculations are supported using the Emacs
- pxref{Top, Calc, , calc, Gnu Emacs Calculator Manual}).
- end menu
- section The built-in table editor
- . Any line with
- samp{|}
- is also the column separator
- code{\vert} or, inside a word {
- example
- | Name | Phone | Age |
- |-------+-------+-----|
- | Peter | 1234 | 17 |
- | Anna | 4321 | 25 |
- key{TAB} or
- kbd{C-c C-c} inside the table.
- key{RET} to the next row) and creates new table rows
- at the end of the table or before horizontal lines. The indentation
- of the table is set by the first line. Any line starting with
- example
- |Name|Phone|Age|
- |-
- noindent and then press
- code{|Name|Phone|Age} followed by
- key{RET}}.
- vindex org-table-auto-blank-field
- When typing text into a field, Org treats
- key{Backspace}, and all character keys in a special way, so that
- inserting and deleting avoids shifting other fields. Also, when
- typing
- kbd{kbd{S-kbd{
- code{org-enable-table-editor} and
- table
- tsubheading{Creation and conversion}
- kbd{C-u} forces CSV,
- kbd{C-u C-u C-u} will prompt for a regular expression to
- match the separator, and a numeric argument N indicates that at least N
- consecutive spaces, or alternatively a TAB will be the separator.
- kbd{|Name|Phone|Age key{TAB}}.
- orgcmd{C-c C-c,org-table-align}
- Re-align the table and don't move to another field.
- orgcmd{C-c SPC,org-table-blank-field}
- Blank the field at point.
- orgcmd{<TAB>,org-table-next-field}
- Re-align the table, move to the next field. Creates a new row if
- necessary.
- orgcmd{S-
- c
- key{RET},org-table-next-row}
- Re-align the table and move down to next row. Creates a new row if
- necessary. At the beginning or end of a line,
- c
- orgcmd{M-e,org-table-end-of-field}
- Move to end of the current table field, or on to the next field.
- orgcmdkkcc{M-key{right},org-table-move-column-left,org-table-move-column-right}
- Move the current column left/right.
- orgcmd{M-S-
- c
- key{right},org-table-insert-column}
- Insert a new column to the left of the cursor position.
- orgcmdkkcc{M-key{down},org-table-move-row-up,org-table-move-row-down}
- Move the current row up/down.
- orgcmd{M-S-
- c
- key{down},org-table-insert-row}
- Insert a new row above the current row. With a prefix argument, the line is
- created below the current one.
- orgcmd{C-c -,org-table-insert-hline}
- Insert a horizontal line below current row. With a prefix argument, the line
- is created above the current line.
- orgcmd{C-c
- c
- tsubheading{Regions}
- c
- c
- c
- key{RET},org-table-wrap-region}
- Split the current field at the cursor position and move the rest to the line
- below. If there is an active region, and both point and mark are in the same
- column, the text in the column is wrapped to minimum width for the given
- number of lines. A numeric prefix argument may be used to change the number
- of desired lines. If there is no region, but you specify a prefix argument,
- the current field is made blank, and the content is appended to the field
- above.
- cindex formula, in tables
- cindex region, active
- cindex transient mark mode
- kbd{C-y}.
- orgcmd{S-
- vindex org-table-copy-increment
- When current field is empty, copy from first non-empty field above. When not
- empty, copy current field down to next row and move cursor along with it.
- Depending on the option
- code{0} prefix argument temporarily disables the
- increment. This key is also used by shift-selection and related modes
- (
- tsubheading{Miscellaneous}
- pxref{Column width and alignment}). When called with
- a
- kbd{C-u} prefixes, make the editor
- window follow the cursor through the table and always show the current
- field. The follow mode exits automatically when the cursor leaves the table,
- or when you repeat this command with
- c
- orgcmd{C-c |,org-table-create-or-convert-from-region}
- Tables can also be imported by pasting tabular text into the Org
- buffer, selecting the pasted text with
- kbd{C-c |} command (see above under
- c
- findex org-table-export
- code{org-table-export-default-format}. You may also use properties
- code{TABLE_EXPORT_FORMAT} to specify the file
- name and the format for table export in a subtree. Org supports quite
- general formats for exported tables. The exporter format is the same as the
- format used by Orgtbl radio tables, see
- end table
- If you don't like the automatic table editor because it gets in your
- way on lines which you would like to start with
- lisp
- (setq org-enable-table-editor nil)
- noindent Then the only table command that still works is
- node Column width and alignment
- cindex narrow columns in tables
- samp{<N>} where
- example
- end group
- noindent
- Fields that are wider become clipped and end in the string
- kbd{C-c `} (that is
- kbd{C-c
- C-c}.
- code{org-startup-align-all-tables} will realign all tables in a file
- upon visiting, but also slow down startup. You can also set this option
- on a per-file basis with:
- end example
- If you would like to overrule the automatic alignment of number-rich columns
- to the right and of string-rich columns to the left, you can use
- samp{<c>}
- samp{<l>} in a similar fashion. You may
- also combine alignment and field width like this:
- node Column groups
- cindex grouping columns in tables
- When Org exports tables, it does so by default without vertical lines because
- that is visually more satisfying in general. Occasionally however, vertical
- lines can be useful to structure a table into groups of columns, much like
- horizontal lines can do for groups of rows. In order to specify column
- groups, you can use a special row where the first field contains only
- samp{<} to indicate that
- this column should start a group,
- samp{<>} (no space between samp{>}) to make a column a group
- of its own. Boundaries between column groups will upon export be marked with
- vertical lines. Here is an example:
- end example
- It is also sufficient to just insert the column group starters after
- every vertical line you would like to have:
- end example
- section The Orgtbl minor mode
- cindex minor mode for tables
- If you like the intuitive way the Org table editor works, you
- might also want to use it in other modes like Text mode or Mail mode.
- The minor mode Orgtbl mode makes this possible. You can always toggle
- the mode with
- lisp
- (add-hook 'message-mode-hook 'turn-on-orgtbl)
- LaTeX{} tables with the underlying ease and power of
- Orgtbl mode, including spreadsheet capabilities. For details, see
- node The spreadsheet
- cindex calculations, in tables
- cindex
- file{calc} package to implement
- spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to
- derive fields from other fields. While fully featured, Org's implementation
- is not identical to other spreadsheets. For example, Org knows the concept
- of a
- menu
- * References:: How to refer to another field or range
- * Formula syntax for Calc:: Using Calc to compute stuff
- * Formula syntax for Lisp:: Writing formulas in Emacs Lisp
- * Durations and time values:: How to compute durations and time values
- * Field and range formulas:: Formula for specific (ranges of) fields
- * Column formulas:: Formulas valid for an entire column
- * Lookup functions:: Lookup functions for searching tables
- * Editing and debugging formulas:: Fixing formulas
- * Updating the table:: Recomputing all dependent fields
- * Advanced features:: Field and column names, parameters and automatic recalc
- node References
- cindex references
- To compute fields in the table from other fields, formulas must
- reference other fields or ranges. In Org, fields can be referenced
- by name, by absolute coordinates, and by relative coordinates. To find
- out what the coordinates of a field are, press
- kbd{C-c
- subsubheading Field references
- cindex references, to fields
- Formulas can reference the value of another field in two ways. Like in
- any other spreadsheet, you may reference fields with a letter/number
- combination like
- vindex org-table-use-standard-references
- However, Org prefers
- samp{B4}, but it will not use this syntax when offering a formula
- for editing. You can customize this behavior using the option
- example
- var{column}
- code{$1},
- code{$
- code{$+1} or
- code{$<} and
- code{$>>>} to indicate the third
- column from the right.
- The row specification only counts data lines and ignores horizontal separator
- lines (hlines). Like with columns, you can use absolute row numbers
- code{2},...var{N}}, and row numbers relative to the
- current row like code{-1}. code{>} are
- immutable references the first and last
- code{$LR5} and
- code{>$} instead.} row in the table, respectively. You may also
- specify the row relative to one of the hlines:
- code{II} to the second, etc.
- code{+I} to the first such line below the
- current line. You can also write
- code{0} and
- emph{unsigned} numbers are fixed references
- in the sense that if you use the same reference in the formula for two
- different fields, the same field will be referenced each time.
- Org's references with
- example
- 2$3 code{C2})}
- $5 code{E&})}
- 2
- r{the field one row up, three columns to the left}
- -I$2
- r{field in the last row, in column 5}
- subsubheading Range references
- cindex references, to ranges
- You may reference a rectangular range of fields by specifying two field
- references connected by two dots
- samp{$2..$7}, but if at least one field
- is in a different row, you need to use the general
- samp{} in order to be interpreted correctly). Examples:
- r{first three fields in the current row}
- $P..$Q
- r{start in third column, continue to the last but one}
- 2$1..4$3 code{A2..C4})}
- -1$-2..-1
- r{between first and second hline, short for
- end example
- samp{E}, pxref{Formula syntax
- for Calc}.
- cindex field coordinates
- cindex row, of field coordinates
- code{#} and
- code{org-table-current-dline} and
- table
- item if(# % 2, $#, string(""))
- Insert column number on odd rows, set field to empty on even rows.
- code{FOO}
- into column 2 of the current table.
- code{FOO} into row 3 of the current table.
- noindent For the second/third example, the table named
- footnote{The computation time scales as O(N^2) because the table
- named
- subsubheading Named references
- cindex references, named
- cindex constants, in calculations
- vindex org-table-formula-constants
- code{org-table-formula-constants}, and locally (for the file) through a
- line like
- end example
- vindex constants-unit-system
- pxref{Properties and columns}) can be used as
- constants in table formulas: for a property
- samp{$PROP_Xyz}, and the property will be searched in the current
- outline entry and in the hierarchy above it. If you have the
- samp{$h} for Planck's constant, and
- units like footnote{
- code{SI}
- and
- code{constants-unit-system}. You can use the
- code{constSI} and
- ref{Advanced features}. All
- names must start with a letter, and further consist of letters and
- numbers.
- cindex remote references
- cindex references, to a different table
- cindex constants, in calculations
- example
- remote(NAME-OR-ID,REF)
- noindent
- where NAME can be the name of a table in the current file as set by a
- code{3$3} or
- code{ROW$COLUMN}
- it will be substituted with the name or ID found in this field of the current
- table. For example code{remote(year_2013,
- >$1)}. The format
- node Formula syntax for Calc
- cindex formula syntax, Calc
- file{Calc}
- package. Note that samp{/}
- has lower precedence than samp{a/b*c} is interpreted as
- code{calc-eval} (
- cindex vectors, in table calculations
- The range vectors can be directly fed into the Calc vector functions
- like samp{vsum}.
- cindex mode, for
- vindex org-calc-default-modes
- A formula can contain an optional mode string after a semicolon. This
- string consists of flags to influence Calc and other modes during
- execution. By default, Org uses the standard Calc modes (precision
- 12, angular units degrees, fraction and symbolic modes off). The display
- format, however, has been changed to
- code{org-calc-default-modes}.
- table
- item
- item code{s3}, code{f4}
- Normal, scientific, engineering or fixed format of the result of Calc passed
- back to Org. Calc formatting is unlimited in precision as long as the Calc
- calculation precision is greater.
- code{D},
- item code{S}
- Fraction and symbolic modes of Calc.
- code{T},
- pxref{Durations and time values}.
- code{E}
- If and how to consider empty fields. Without
- samp{E} the empty fields are kept. For empty
- fields in ranges or empty field references the value
- samp{N} to use 0 instead for both formula types. For the
- value of a field the mode samp{E}.
- code{N}
- Interpret all fields as numbers, use 0 for non-numbers. See the next section
- to see how this is essential for computations with Lisp formulas. In Calc
- formulas it is used only occasionally because there number strings are
- already interpreted as numbers without
- item
- end table
- samp{printf} format specifier to reformat the Calc result after it has been
- passed back to Org instead of letting Calc already do the
- formattingsamp{printf} reformatting is limited in precision
- because the value passed to it is converted into an
- samp{double}. The
- samp{double} is limited in precision to 64
- bits overall which leaves approximately 16 significant decimal digits.}. A
- few examples:
- r{Sum of first and second field}
- $1+$2;%.2f
- r{Math functions can be used}
- $0;%.1f
- r{Degrees F -> C conversion}
- $c/$1/$cm file{constants.el}}
- tan($1);Dp3s1
- r{Same, but use printf specifier for display}
- taylor($3,x=7,2)
- end example
- Calc also contains a complete set of logical operations, (
- table
- item if($1 < 20, teen, string(""))
- "teen" if age $1 is less than 20, else the Org table result field is set to
- empty with the empty string.
- samp{E} is required to not
- convert empty fields to 0.
- samp{%.1f} but leaves empty results empty.
- samp{nan} which lets
- samp{nan}. Then samp{nan} from
- item if("$1..$7" == "[]", string(""), vmean($1..$7))
- Mean value of a range with empty fields skipped. Every field in the range
- that is empty is skipped. When all fields in the range are empty the mean
- value is not defined and the Org table result field is set to empty. Use
- this when the sample set can have a variable size.
- end table
- You can add your own Calc functions defined in Emacs Lisp with
- node Formula syntax for Lisp
- cindex Lisp forms, as table formulas
- It is also possible to write a formula in Emacs Lisp. This can be useful
- for string manipulation and control structures, if Calc's functionality is
- not enough.
- If a formula starts with an apostrophe followed by an opening parenthesis,
- then it is evaluated as a Lisp form. The evaluation should return either a
- string or a number. Just as with
- samp{N} mode switch, all referenced elements will be numbers
- (non-number fields will be zero) and interpolated as Lisp numbers, without
- quotes. If you provide the
- code{"$3"}. Ranges are inserted as space-separated
- fields, so you can embed them in list or vector syntax.
- Here are a few examples---note how the
- table
- item '(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2))
- Swap the first two characters of the content of column 1.
- code{$1+$2}.
- code{vsum($1..$4)}.
- node Durations and time values
- cindex Duration, computing
- vindex org-table-duration-custom-format
- If you want to compute time values use the
- example
- end group
- code{HH:MM[:SS]}, where seconds
- are optional. With the
- code{HH:MM:SS} (see the first formula above). With the
- code{org-table-duration-custom-format}, which defaults to
- node Field and range formulas
- cindex field formula
- cindex formula, for individual table field
- samp{:=}, for example
- key{TAB} or kbd{C-c C-c} with the cursor still in the field,
- the formula will be stored as the formula for this field, evaluated, and the
- current field will be replaced with the result.
- samp{#+TBLFM:} directly
- below the table. If you type the equation in the 4th field of the 3rd data
- line in the table, the formula will look like
- i{absolute references} (but not relative ones) in stored formulas are
- modified in order to still reference the same field. To avoid this, in
- particular in range references, anchor ranges at the table borders (using
- code{>}, code{$>}), or at hlines using the
- table
- orgcmd{C-u C-c =,org-table-eval-formula}
- Install a new formula for the current field. The command prompts for a
- formula with default taken from the
- end table
- The left-hand side of a formula can also be a special expression in order to
- assign the formula to a number of different fields. There is no keyboard
- shortcut to enter such range formulas. To add them, use the formula editor
- (code{#+TBLFM:} line
- directly.
- code
- ref{Column formulas}.
- code{>=} means
- the last row.
- item $name=
- Named field, see
- end table
- subsection Column formulas
- cindex formula, for table column
- When you assign a formula to a simple column reference like
- emph{header} and will not be modified by column
- formulas. Therefore a header is mandatory when you use column formulas and
- want to add hlines to group rows, like for example to separate a total row at
- the bottom from the summand rows above. (ii) Fields that already get a value
- from a field/range formula will be left alone by column formulas. These
- conditions make column formulas very easy to use.
- To assign a formula to a column, type it directly into any field in the
- column, preceded by an equal sign, like
- key{TAB} or kbd{C-c C-c} with the cursor still in the field,
- the formula will be stored as the formula for the current column, evaluated
- and the current field replaced with the result. If the field contains only
- samp{#+TBLFM:} line, column formulas will look like
- code{$>}.
- Instead of typing an equation into the field, you may also use the
- following command:
- kbd
- samp{#+TBLFM} line, applies it to the current field and
- stores it. With a numeric prefix argument(e.g.,
- end table
- subsection Lookup functions
- cindex table lookup functions
- Org has three predefined Emacs Lisp functions for lookups in tables.
- code
- findex org-lookup-first
- Searches for the first element code{S-LIST} for which
- end lisp
- is
- code{R-LIST}. The default code{equal}. Note that the
- parameters code{S} are passed to
- code{org-lookup-first}, where code{S-LIST}. If
- code{nil}, the matching element code{S-LIST}
- is returned.
- findex org-lookup-last
- Similar to i{last}
- element for which code{t}.
- findex org-lookup-all
- Similar to i{all} elements for
- which code{t}, and returns
- end table
- If the ranges used in these functions contain empty fields, the
- code{S-LIST} and/or
- code{S-LIST} to the corresponding
- element of
- uref{http://orgmode.org/worg/org-tutorials/org-lookups.html, this
- tutorial on Worg}.
- subsection Editing and debugging formulas
- cindex editing, of table formulas
- code{B3} or
- code{3$2} or
- code{org-table-use-standard-references}.
- kbd
- ref{Column formulas}, and
- orgcmd{C-u C-u C-c =,org-table-eval-formula}
- Re-insert the active formula (either a
- field formula, or a column formula) into the current field, so that you
- can edit it directly in the field. The advantage over editing in the
- minibuffer is that you can use the command
- orgcmd{C-c ?,org-table-field-info}
- While editing a formula in a table field, highlight the field(s)
- referenced by the reference at the cursor position in the formula.
- }
- item C-c
- command{org-table-toggle-coordinate-overlays}). These are updated each
- time the table is aligned; you can force it with
- kindex C-c
- findex org-table-toggle-formula-debugger
- {
- Toggle the formula debugger on and off
- (
- orgcmd{C-c ',org-table-edit-formulas}
- Edit all formulas for the current table in a special buffer, where the
- formulas will be displayed one per line. If the current field has an
- active formula, the cursor in the formula editor will mark it.
- While inside the special buffer, Org will automatically highlight
- any field or range reference at the cursor position. You may edit,
- remove and add formulas, and use the following commands:
- kbd
- kbd{C-u}
- prefix, also apply the new formulas to the entire table.
- orgcmd{C-c C-r,org-table-fedit-toggle-ref-type}
- Toggle all references in the formula editor between standard (like
- code{3$2}).
- key{TAB},org-table-fedit-lisp-indent}
- Pretty-print or indent Lisp formula at point. When in a line containing
- a Lisp formula, format the formula according to Emacs Lisp rules.
- Another
- key{TAB} re-indents just like in Emacs Lisp mode.
- key{TAB},lisp-complete-symbol}
- Complete Lisp symbols, just like in Emacs Lisp mode.
- key{up}
- key{down}
- key{left}
- key{right}
- findex org-table-fedit-ref-down
- findex org-table-fedit-ref-right
- key{up}/key{left}/
- code{B3} and you press key{right}}, it will become
- orgcmdkkcc{M-S-key{down},org-table-fedit-line-up,org-table-fedit-line-down}
- Move the test line for column formulas in the Org buffer up and
- down.
- key{up},M-
- kindex C-c
- findex org-table-toggle-coordinate-overlays
- }
- Turn the coordinate grid in the table on and off.
- end table
- Making a table field blank does not remove the formula associated with
- the field, because that is stored in a different line (the
- samp{#+TBLFM} line.
- samp{#+TBLFM} directly and re-apply the changed
- equations with
- anchor{Using multiple #+TBLFM lines}
- cindex #+TBLFM line, multiple
- cindex #+TBLFM, switching
- samp{#+TBLFM} lines right
- after the table, and then press
- example
- | x | y |
- |---+---|
- | 1 | |
- | 2 | |
- #+TBLFM: $2=$1*1
- #+TBLFM: $2=$1*2
- noindent
- Pressing samp{#+TBLFM: $2=$1*2} yields:
- end example
- kbd{C-u C-c *}, for example), you
- will get the following result of applying only the first
- example
- | x | y |
- |---+---|
- | 1 | 1 |
- | 2 | 2 |
- #+TBLFM: $2=$1*1
- #+TBLFM: $2=$1*2
- subsubheading Debugging formulas
- cindex debugging, of table formulas
- When the evaluation of a formula leads to an error, the field content
- becomes the string
- code{Tbl} menu and repeat the
- calculation, for example by pressing key{RET}} in a
- field. Detailed information will be displayed.
- subsection Updating the table
- cindex updating, table
- Recalculation of a table is normally not automatic, but needs to be
- triggered by a command. See
- table
- orgcmd{C-c *,org-table-recalculate}
- Recalculate the current row by first applying the stored column formulas
- from left to right, and all field/range formulas in the current row.
- kindex C-u C-c *
- kindex C-u C-c C-c
- c
- i{later} in the calculation sequence.
- findex org-table-recalculate-buffer-tables
- Recompute all tables in the current buffer.
- findex org-table-iterate-buffer-tables
- Iterate all tables in the current buffer, in order to converge table-to-table
- dependencies.
- node Advanced features
- i{names}
- table
- orgcmd{C-#,org-table-rotate-recalc-marks}
- Rotate the calculation mark in first column through the states
- samp{#}, samp{!},
- end table
- Here is an example of a table that collects exam results of students and
- makes use of these features:
- group
- |---+---------+--------+--------+--------+-------+------|
- | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
- |---+---------+--------+--------+--------+-------+------|
- | ! | | P1 | P2 | P3 | Tot | |
- | # | Maximum | 10 | 15 | 25 | 50 | 10.0 |
- | ^ | | m1 | m2 | m3 | mt | |
- |---+---------+--------+--------+--------+-------+------|
- | # | Peter | 10 | 8 | 23 | 41 | 8.2 |
- | # | Sam | 2 | 4 | 3 | 9 | 1.8 |
- |---+---------+--------+--------+--------+-------+------|
- | | Average | | | | 25.0 | |
- | ^ | | | | | at | |
- | $ | max=50 | | | | | |
- |---+---------+--------+--------+--------+-------+------|
- #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(-II..-I);%.1f
- end example
- b{Important}: please note that for these special tables,
- recalculating the table with
- samp{#} or
- cindex marking characters, tables
- The marking characters have the following meaning:
- samp
- samp{$Tot} instead of
- item ^
- This row defines names for the fields
- samp{$m1} to refer to
- the value
- samp{$name=...}.
- samp{^}, but defines names for the fields in the row
- item $
- Fields in this row can define
- samp{$} row contains
- samp{$max}.
- Parameters work exactly like constants, only that they can be defined on
- a per-table basis.
- key{TAB} or kbd{S-
- kbd{C-u C-c *}. Unmarked
- lines will be left alone by this command.
- kbd{C-u C-c *}, but
- not for automatic recalculation. Use this when automatic
- recalculation slows down editing too much.
- w{ }
- Unmarked lines are exempt from recalculation with
- samp{#}
- or
- item /
- Do not export this line. Useful for lines that contain the narrowing
- end table
- Finally, just to whet your appetite for what can be done with the
- fantastic
- code{n} at location
- example
- end group
- node Org-Plot
- cindex graph, in tables
- cindex #+PLOT
- Org-Plot can produce graphs of information stored in org tables, either
- graphically or in ASCII-art.
- file{Gnuplot}
- Org-Plot produces 2D and 3D graphs using
- uref{http://www.gnuplot.info/} and
- uref{http://xafs.org/BruceRavel/GnuplotMode}. To see this in action, ensure
- that you have both Gnuplot and Gnuplot mode installed on your system, then
- call kbd{M-x org-plot/gnuplot
- example
- end group
- code{#+PLOT:} lines preceding a table. See below
- for a complete list of Org-plot options. The
- uref{http://orgmode.org/worg/org-tutorials/org-plot.html}.
- table
- item set
- Specify any
- item title
- Specify the title of the plot.
- code{x} axis.
- code{dep:(3 4)} to graph the third and
- fourth columns (defaults to graphing all other columns aside from the
- item type
- Specify whether the plot will be code{3d}, or
- item with
- Specify a
- code{lines}, code{boxes},
- code{lines}.
- code{"@var{path/to/desired/output-file}"}.
- code{deps} (defaults to the column headers
- if they exist).
- item map
- When plotting code{grid} types, set this to
- code{3d} slope.
- samp{%Y-%m-%d-%H:%M:%S}.
- code{$datafile} in the specified script will be replaced with
- the path to the generated data file. Note: even if you set this option, you
- may still want to specify the plot type, as that can impact the content of
- the data file.
- subheading ASCII bar plots
- While the cursor is on a column, typing
- kbd{M-x orgtbl-ascii-plot
- kbd{C-u C-c *}.
- group
- | Sede | Max cites | |
- |---------------+-----------+--------------|
- | Chile | 257.72 | WWWWWWWWWWWW |
- | Leeds | 165.77 | WWWWWWWh |
- | Sao Paolo | 71.00 | WWW; |
- | Stockholm | 134.19 | WWWWWW: |
- | Morelia | 257.56 | WWWWWWWWWWWH |
- | Rochefourchat | 0.00 | |
- #+TBLFM: $3='(orgtbl-ascii-draw $2 0.0 257.72 12)
- end example
- The formula is an elisp call:
- end lisp
- code
- item MIN MAX
- are the minimal and maximal values displayed. Sources values
- outside this range are displayed as
- samp{too large}.
- samp{12}.
- node Hyperlinks
- cindex hyperlinks
- Like HTML, Org provides links inside a file, external links to
- other files, Usenet articles, emails, and much more.
- end menu
- section Link format
- cindex format, of links
- Org will recognize plain URL-like links and activate them as
- clickable links. The general link format, however, looks like this:
- r{or alternatively} [[link]]
- noindent
- Once a link in the buffer is complete (all brackets present), Org
- will change the display so that
- samp{[[link][description]]} and
- samp{[[link]]}. Links will be highlighted in the face
- samp{link}
- part (if there is no description) or the
- samp{link} part, use
- key{BACKSPACE}, you will remove the
- (invisible) bracket at that location. This makes the link incomplete
- and the internals are again displayed as plain text. Inserting the
- missing bracket hides the link internals again. To show the
- internal structure of all links, use the menu entry
- node Internal links
- cindex internal links
- cindex targets, for links
- samp{[[#my-custom-id]]} which will link to the entry with the
- samp{my-custom-id}. You are responsible yourself
- to make sure these custom IDs are unique in a file.
- Links such as samp{[[My Target][Find my target]]}
- lead to a text search in the current file.
- The link can be followed with
- pxref{Handling links}). Links to custom IDs will
- point to the corresponding headline. The preferred match for a text link is
- a
- samp{<<My Target>>}.
- code{#+NAME}
- keyword, which has to be put in the line before the element it refers to, as
- in the following example
- end example
- If none of the above succeeds, Org will search for a headline that is exactly
- the link text but may also include a TODO keyword and tags
- kbd{M-
- footnote{When targeting a
- code{#+CAPTION} keyword is mandatory in order to get proper numbering
- (
- example
- - one item
- - <<target>>another item
- Here we refer to item [[target]].
- noindent
- The last sentence will appear as
- samp{my target}.
- Following a link pushes a mark onto Org's own mark ring. You can
- return to the previous position with
- menu
- * Radio targets:: Make targets trigger links in plain text
- node Radio targets
- cindex radio targets
- cindex links, radio targets
- Org can automatically turn any occurrences of certain target names
- in normal text into a link. So without explicitly creating a link, the
- text connects to the target radioing its position. Radio targets are
- enclosed by triple angular brackets. For example, a target
- samp{my target} in normal text to
- become activated as a link. The Org file is scanned automatically
- for radio targets only when the file is first loaded into Emacs. To
- update the target list during editing, press
- node External links
- cindex links, external
- cindex Gnus links
- cindex IRC links
- cindex file links
- cindex MH-E links
- cindex SHELL links
- cindex Elisp links
- Org supports links to files, websites, Usenet and email messages, BBDB
- database entries and links to both IRC conversations and their logs.
- External links are URL-like locators. They start with a short identifying
- string followed by a colon. There can be no space after the colon. The
- following list shows examples for each link type.
- r{on the web}
- doi:10.1000/182
- r{file, absolute path}
- /home/dominik/images/jupiter.jpg
- r{file, relative path}
- ./papers/last.pdf
- r{file, path on remote machine}
- /myselfsome.where:papers/last.pdf
- r{file, jump to line number}
- file:projects.org
- r{text search in Org file}
- code{org-link-search-must-match-exact-headline}. If its value
- is
- code{query-to-create}, then an exact headline will be searched; if it is not
- found, then the user will be queried to create it.}
- file:projects.org::*task title
- footnote{Headline searches always match the exact headline, ignoring
- spaces and cookies. If the headline is not found and the value of the option
- code{query-to-create},
- then the user will be queried to create it.}
- docview:papers/last.pdf::NNN
- r{Link to heading by ID}
- news:comp.emacs
- r{Mail link}
- mhe:folder
- r{MH-E message link}
- rmail:folder
- r{RMAIL message link}
- gnus:group
- r{Gnus article link}
- bbdb:R.*Stallman
- r{IRC link}
- info:org#External links
- r{A shell command}
- elisp:org-agenda
- r{Elisp form to evaluate}
- cindex VM links
- code{contrib/} directory (
- code{contrib/} directory:
- r{VM folder link}
- vm:folder#id
- r{VM on remote machine}
- vm-imap:account:folder
- r{VM IMAP message link}
- wl:folder
- r{WANDERLUST message link}
- ref{Adding hyperlink types}.
- A link should be enclosed in double brackets and may contain a descriptive
- text to be displayed instead of the URL (
- example
- [[http://www.gnu.org/software/emacs/][GNU Emacs]]
- noindent
- If the description is a file name or URL that points to an image, HTML
- export (
- cindex square brackets, around links
- samp{bbdb:Richard Stallman}), or if you need to remove ambiguities
- about the end of the link, enclose them in square brackets.
- section Handling links
- table
- orgcmd{C-c l,org-store-link}
- emph{global} command (you
- must create the key binding yourself) which can be used in any buffer to
- create a link. The link will be stored for later insertion into an Org
- buffer (see below). What kind of link will be created depends on the current
- buffer:
- *
- For Org files, if there is a
- footnote{If the headline contains a timestamp, it will be
- removed from the link and result in a wrong link---you should avoid putting
- timestamp in the headline.}.
- cindex property, CUSTOM_ID
- code{CUSTOM_ID} property, a link to this custom ID
- will be stored. In addition or alternatively (depending on the value of
- code{ID} property will
- be created and/or used to construct a link
- file{org-id.el} must first be loaded, either through
- code{org-id} in code{(require
- 'org-id)} in your Emacs init file.}. So using this command in Org buffers
- will potentially create two links: a human-readable from the custom ID, and
- one that is globally unique and works even if the entry is moved from file to
- file. Later, when inserting the link, you need to decide which one to use.
- *
- Pretty much all Emacs mail clients are supported. The link will point to the
- current article, or, in some GNUS buffers, to the group. The description is
- constructed from the author and the subject.
- *
- Here the link will be the current URL, with the page title as description.
- *
- Links created in a BBDB buffer will point to the current entry.
- *
- code{org-irc-link-to-logs} to
- samp{file:/} style link to the relevant point in the logs for the current
- conversation is created. Otherwise an
- b{Other files}
- pxref{Search options}) pointing to the contents of the current line. If
- there is an active region, the selected words will form the basis of the
- search string. If the automatically created link is not working correctly or
- accurately enough, you can write custom functions to select the search string
- and to do the search for particular file types---see
- kbd{C-c l} is only a suggestion---see
- b{Agenda view}
- c
- cindex link completion
- cindex inserting links
- vindex org-link-parameters
- Insert a link
- footnote{After insertion of a stored link, the link will be
- removed from the list of stored links. To keep it in the list later use, use
- a triple kbd{C-c C-l}, or configure the option
- b{Inserting stored links}
- key{up} and kbd{M-p/n}).
- * Completion with
- samp{http:} or
- pxref{Link abbreviations}). If you
- press var{prefix}, Org will offer
- specific completion support for some link types
- samp{:complete} property of a link
- in kbd{file
- kbd{C-u C-c C-l}, see
- below) will be offered, and after key{RET}} you can complete
- contact names.
- cindex file name completion
- kbd{C-c C-l} is called with a
- samp{../}. Otherwise an absolute path
- is used, if possible with
- kbd{C-u} prefixes.
- item C-c C-l r{(with cursor on existing link)}
- When the cursor is on an existing link,
- c
- orgcmd{C-c C-o,org-open-at-point}
- vindex org-link-frame-setup
- Open link at point. This will launch a web browser for URLs (using
- samp{file:} links
- with Emacs and select a suitable application for local non-text files.
- Classification of files is based on file extension only. See option
- kbd{C-u} prefix. If you want to avoid
- opening in Emacs, use a *
- If the cursor is on a headline, but not on a link, offer all links in the
- headline and entry text. If you want to setup the frame configuration for
- following links, customize
- orgkey
- vindex org-return-follows-link
- When kbd{
- c
- kindex mouse-1
- itemx mouse-1
- On links, kbd{mouse-2} will open the link just as
- c
- item mouse-3
- kbd{mouse-2}, but force file links to be opened with Emacs, and
- internal links to be displayed in another window
- code{org-display-internal-link-with-indirect-buffer}}.
- orgcmd{C-c C-x C-v,org-toggle-inline-images}
- cindex images, inlining
- cindex
- cindex
- code{org-startup-with-inline-images}
- code{#+STARTUP} keywords code{noinlineimages}}.
- cindex mark ring
- Push the current position onto the mark ring, to be able to return
- easily. Commands following an internal link do this automatically.
- orgcmd{C-c &,org-mark-ring-goto}
- kbd{C-c %}. Using this
- command several times in direct succession moves through a ring of
- previously recorded positions.
- orgcmdkkcc{C-c C-x C-n,C-c C-x C-p,org-next-link,org-previous-link}
- kbd{C-n} and
- lisp
- (add-hook 'org-load-hook
- (lambda ()
- (define-key org-mode-map "\C-n" 'org-next-link)
- (define-key org-mode-map "\C-p" 'org-previous-link)))
- end table
- section Using links outside Org
- You can insert and follow links that have Org syntax not only in
- Org, but in any Emacs buffer. For this, you should create two
- global commands, like this (please select suitable global keys
- yourself):
- end lisp
- section Link abbreviations
- cindex abbreviation, links
- Long URLs can be cumbersome to type, and often many similar links are
- needed in a document. For this you can use link abbreviations. An
- abbreviated link looks like this
- end example
- vindex org-link-abbrev-alist
- where the tag is optional.
- The
- samp{-}, and
- code{org-link-abbrev-alist}
- that relates the linkwords to replacement text. Here is an example:
- group
- (setq org-link-abbrev-alist
- '(("bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=")
- ("url-to-ja" . "http://translate.google.fr/translate?sl=en&tl=ja&u=%h")
- ("google" . "http://www.google.com/search?q=")
- ("gmap" . "http://maps.google.com/maps?q=%s")
- ("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1")
- ("ads" . "http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?author=%s&db_key=AST")))
- end smalllisp
- If the replacement text contains the string
- samp{%h} instead of
- samp{%(my-function)} will pass the tag
- to a custom function, and replace it by the resulting string.
- If the replacement text doesn't contain any specifier, the tag will simply be
- appended in order to create the link.
- Instead of a string, you may also specify a function that will be
- called with the tag as the only argument to create the link.
- With the above setting, you could link to a specific bug with
- samp{OrgMode} with
- code{[[gmap:51 Franklin Street, Boston]]} or of Carsten office
- code{[[ads:Dominik,C]]}.
- If you need special abbreviations just for a single Org buffer, you
- can define them in the file with
- example
- #+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id=
- #+LINK: google http://www.google.com/search?q=%s
- noindent
- In-buffer completion (samp{[} to
- complete link abbreviations. You may also define a function that implements
- special (e.g., completion) support for inserting such a link with
- lisp
- (org-link-set-parameters ``type'' :complete #'some-function)
- node Search options
- cindex search option in file links
- footnote{For backward
- compatibility, line numbers can also follow a single colon.} colon. For
- example, when the command pxref{Handling
- links}) to a file, it encodes the words in the current line as a search
- string that can be used to find this line back later when following the
- link with
- example
- [[file:~/code/main.c::255]]
- [[file:~/xx.org::My Target]]
- [[file:~/xx.org::*My Target]]
- [[file:~/xx.org::#my-custom-id]]
- [[file:~/xx.org::/regexp/]]
- table
- item 255
- Jump to line 255.
- samp{<<My Target>>}, or do a text search for
- ref{Internal links}. In HTML export (
- item *My Target
- In an Org file, restrict search to headlines.
- code{CUSTOM_ID} property
- code{regexp}. This uses the Emacs
- command
- code{org-occur} is used to create a
- sparse tree with the matches.
- c
- end table
- As a degenerate case, a file link with an empty file name can be used
- to search the current file. For example,
- samp{find me} in the current file, just as
- node Custom searches
- cindex custom search strings
- TeX{} database files have many entries like
- TeX{} entry is the
- citation key.
- vindex org-execute-file-search-functions
- If you come across such a problem, you can write custom functions to set
- the right search string for a particular file type, and to do the search
- for the string in the file. Using
- code{org-create-file-search-functions} and
- TeX{} database files, and you can use the corresponding code as
- an implementation example. See the file
- node TODO items
- cindex TODO items
- Org mode does not maintain TODO lists as separate documents
- menu
- * TODO basics:: Marking and displaying TODO entries
- * TODO extensions:: Workflow and assignments
- * Progress logging:: Dates and notes for progress
- * Priorities:: Some things are more important than others
- * Breaking down tasks:: Splitting a task into manageable pieces
- * Checkboxes:: Tick-off lists
- node TODO basics
- samp{TODO}, for example:
- end example
- table
- orgcmd{C-c C-t,org-todo}
- vindex org-use-fast-todo-selection
- Rotate the TODO state of the current item among
- end example
- If TODO keywords have fast access keys (see
- code{org-use-fast-todo-selection} is non-
- kbd{t} command key (
- orgkey{C-u C-c C-t}
- When TODO keywords have no selection keys, select a specific keyword using
- completion; otherwise force cycling through TODO states with no prompt. When
- code{prefix}, use the fast
- selection interface.
- key{right}
- key{left}
- key{right} r{/} key{left}
- pxref{TODO
- extensions}). See also
- code{shift-selection-mode}. See also the variable
- orgcmd{C-c / t,org-show-todo-tree}
- vindex org-todo-keywords
- View TODO items in a pxref{Sparse trees}). Folds the
- entire buffer, but shows all TODO items (with not-DONE state) and the
- headings hierarchy above them. With a prefix argument (or by using
- . You will be prompted for the keyword,
- and you can also give a list of keywords like
- code{org-todo-keywords}.
- With two prefix arguments, find all TODO states, both un-done and done.
- pxref{Agenda views}) into a single buffer. The new
- buffer will be in
- pxref{Agenda commands}).
- orgcmd{S-M-
- end table
- vindex org-todo-state-tags-triggers
- Changing a TODO state can also trigger tag changes. See the docstring of the
- option
- node TODO extensions
- cindex extended TODO keywords
- . Org mode allows you to classify TODO items in more complex ways
- with code{org-todo-keywords}). With
- special setup, the TODO keyword system can work differently in different
- files.
- Note that
- pxref{Tags}).
- end menu
- subsection TODO keywords as workflow states
- cindex workflow states as TODO keywords
- You can use TODO keywords to indicate different
- footnote{Changing
- this variable only becomes effective after restarting Org mode in a
- buffer.}:
- end lisp
- The vertical bar separates the TODO keywords (states that
- emph{no further action}). If
- you don't provide the separator bar, the last state is used as the DONE
- state.
- kbd{C-c C-t} will cycle an entry from TODO
- to FEEDBACK, then to VERIFY, and finally to DONE and DELEGATED
- kbd{C-3 C-c C-t} will change the state immediately to VERIFY
- kbd{S-
- pxref{Completion}) or even a special one-key selection scheme
- (
- ref{Tracking TODO state changes}, for more information.
- subsection TODO keywords as types
- cindex names as TODO keywords
- emph{types} of action items. For example, you might want to indicate
- that items are for ``work'' or ``home''. Or, when you work with several
- people on a single project, you might want to assign action items
- directly to persons, by using their names as TODO keywords. This would
- be set up like this:
- end lisp
- In this case, different keywords do not indicate a sequence, but rather
- different types. So the normal work flow would be to assign a task to a
- person, and later to mark it DONE
- kbd{C-c C-t}
- kbd{t} command in the timeline and agenda buffers.}. When used several
- times in succession, it will still cycle through all names, in order to first
- select the right type for a task. But when you return to the item after some
- time and execute
- . Use prefix arguments or completion to quickly select a specific
- name. You can also review the items of a specific TODO type in a sparse tree
- by using a numeric prefix to
- kbd{C-3 C-c / t}. To collect Lucy's items
- from all agenda files into a single buffer, you would use the numeric prefix
- argument as well when creating the global TODO list:
- node Multiple sets in one file
- cindex TODO keyword sets
- Sometimes you may want to use different sets of TODO keywords in
- parallel. For example, you may want to have the basic
- code{DONE}, but also a workflow for bug fixing, and a
- separate state indicating that an item has been canceled (so it is not
- DONE, but also does not require action). Your setup would then look
- like this:
- end lisp
- The keywords should all be different, this helps Org mode to keep track
- of which subsequence should be used for a given entry. In this setup,
- code{DONE} to (nothing) to code{FIXED} to
- (nothing) to
- table
- kindex C-S-
- kindex C-S-
- kindex C-u C-u C-c C-t
- itemx C-S-
- itemx C-S-
- kbd{C-u C-u C-c C-t} or key{right}} would jump from
- code{DONE} to
- code{CANCELED}. Note that the
- code{shift-selection-mode} (
- kindex S-
- kindex S-
- item S-
- itemx S-
- kbd{S-kbd{S-emph{all}
- keywords from all sets, so for example key{right}} would switch
- from code{REPORT} in the example above. See also
- code{shift-selection-mode}.
- node Fast access to TODO states
- footnote{All characters are allowed except
- lisp
- (setq org-todo-keywords
- '((sequence "TODO(t)" "|" "DONE(d)")
- (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")
- (sequence "|" "CANCELED(c)")))
- vindex org-fast-tag-selection-include-todo
- If you then press
- kbd{SPC} can be used to remove any TODO
- keyword from an entry.
- code{org-fast-tag-selection-include-todo}, it allows you to change the TODO
- state through the tags interface (
- node Per-file keywords
- cindex keyword options
- cindex #+TODO
- cindex #+SEQ_TODO
- It can be very useful to use different aspects of the TODO mechanism in
- different files. For file-local settings, you need to add special lines to
- the file which set the keywords and interpretation for that file only. For
- example, to set one of the two examples discussed above, you need one of the
- following lines anywhere in the file:
- end example
- code{#+SEQ_TODO} to be explicit about the
- interpretation, but it means the same as
- example
- #+TYP_TODO: Fred Sara Lucy Mike | DONE
- example
- #+TODO: TODO | DONE
- #+TODO: REPORT BUG KNOWNCAUSE | FIXED
- #+TODO: | CANCELED
- cindex completion, of option keywords
- key{TAB}
- samp{#+} into the buffer and then use key{TAB}} completion.
- kbd{C-c C-c} with the cursor still in the line to make the changes
- known to Org mode
- kbd{C-c C-c} with the
- cursor in a line starting with
- node Faces for TODO keywords
- cindex faces, for TODO keywords
- r{(face)}
- r{(face)}
- code{org-todo}
- for keywords indicating that an item still has to be acted upon, and
- code{org-todo-keyword-faces}. For example:
- group
- (setq org-todo-keyword-faces
- '(("TODO" . org-warning) ("STARTED" . "yellow")
- ("CANCELED" . (:foreground "blue" :weight bold))))
- end lisp
- While using a list with face properties as shown for CANCELED
- code{org-faces-easy-properties} determines if that color is interpreted as a
- foreground or a background color.
- subsection TODO dependencies
- cindex dependencies, of TODO states
- vindex org-enforce-todo-dependencies
- . And sometimes
- there is a logical sequence to a number of (sub)tasks, so that one task
- cannot be acted upon before all siblings above it are done. If you customize
- the option
- .
- Furthermore, if an entry has a property
- . Here is an
- example:
- end example
- You can ensure an entry is never blocked by using the
- example
- * This entry is never blocked
- :PROPERTIES:
- :NOBLOCKING: t
- :END:
- table
- orgcmd{C-c C-x o,org-toggle-ordered-property}
- cindex property, ORDERED
- Toggle the
- i{track} the value of
- this property with a tag for better visibility, customize the option
- orgkey{C-u C-u C-u C-c C-t}
- Change TODO state, circumventing any state blocking.
- vindex org-agenda-dim-blocked-tasks
- If you set the option
- pxref{Agenda views}).
- vindex org-enforce-todo-dependencies
- You can also block changes of TODO states by looking at checkboxes
- (
- code{org-enforce-todo-checkbox-dependencies}, an entry that has unchecked
- checkboxes will be blocked from switching to DONE.
- If you need more complex dependency structures, for example dependencies
- between entries in different trees or files, check out the contributed
- module
- page
- section Progress logging
- cindex logging, of progress
- Org mode can automatically record a timestamp and possibly a note when
- you mark a TODO item as DONE, or even each time you change the state of
- a TODO item. This system is highly configurable; settings can be on a
- per-keyword basis and can be localized to a file or even a subtree. For
- information on how to clock working time for a task, see
- menu
- * Closing items:: When was this entry marked DONE?
- * Tracking TODO state changes:: When did the status change?
- * Tracking your habits:: How consistent have you been?
- node Closing items
- emph{when} a certain TODO
- item was finished. This is achieved with
- code{#+STARTUP: logdone}}
- end lisp
- noindent
- Then each time you turn an entry from a TODO (not-done) state into any of the
- DONE states, a line
- key{C-c C-t SPC} for example), that line
- will also be removed, unless you set
- code{nil}. If you want to record a note along with the timestamp,
- usecode{#+STARTUP:
- lognotedone}.}
- end lisp
- samp{Closing Note} heading.
- In the timeline (
- pxref{Weekly/daily agenda}), you can then use the
- samp{CLOSED} timestamp on each day,
- giving you an overview of what has been done.
- subsection Tracking TODO state changes
- vindex org-log-states-order-reversed
- cindex property, LOG_INTO_DRAWER
- When TODO keywords are used as workflow states (
- footnote{See the option
- pxref{Drawers}).
- Customize
- code{LOGBOOK}
- code{LOGBOOK} drawer is unfolded when pressing
- key{C-u SPC} to keep it folded here}. You can also
- overrule the setting of this variable for a subtree by setting a
- samp{!} (for a timestamp) or
- lisp
- (setq org-todo-keywords
- '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)")))
- samp{}, just type
- noindent
- footnote{It is possible that Org mode will record two timestamps
- when you are using both
- samp{Closing Note}.}, and that a note is recorded when switching to
- WAIT or CANCELED
- samp{!} after the slash means that in addition to the note taken when
- entering the state, a timestamp should be recorded when
- i{target} state does not configure
- logging for entering it. So it has no effect when switching from WAIT
- to DONE, because DONE is configured to record a timestamp only. But
- when switching from WAIT back to TODO, the
- example
- #+TODO: TODO(t) WAIT(w/!) | DONE(d!) CANCELED(c)
- cindex property, LOGGING
- In order to define logging settings that are local to a subtree or a
- single item, define a LOGGING property in this entry. Any non-empty
- LOGGING property resets all logging settings to
- code{lognotedone} or
- code{TODO(!)}. For example
- end example
- subsection Tracking your habits
- enumerate
- code{habits} module by customizing
- item
- The habit is a TODO item, with a TODO keyword representing an open state.
- code{STYLE} is set to the value
- item
- The TODO has a scheduled date, usually with a
- code{++} style may be appropriate for habits with time
- constraints, e.g., must be done on weekends, or a
- item
- The TODO may also have minimum and maximum ranges specified by using the
- syntax
- item
- You must also have state logging for the
- pxref{Tracking TODO state changes}), in order for historical data to be
- represented in the consistency graph. If it is not enabled it is not an
- error, but the consistency graphs will be largely meaningless.
- example
- ** TODO Shave
- SCHEDULED: <2009-10-17 Sat .+2d/4d>
- :PROPERTIES:
- :STYLE: habit
- :LAST_REPEAT: [2009-10-19 Mon 00:36]
- :END:
- - State "DONE" from "TODO" [2009-10-15 Thu]
- - State "DONE" from "TODO" [2009-10-12 Mon]
- - State "DONE" from "TODO" [2009-10-10 Sat]
- - State "DONE" from "TODO" [2009-10-04 Sun]
- - State "DONE" from "TODO" [2009-10-02 Fri]
- - State "DONE" from "TODO" [2009-09-29 Tue]
- - State "DONE" from "TODO" [2009-09-25 Fri]
- - State "DONE" from "TODO" [2009-09-19 Sat]
- - State "DONE" from "TODO" [2009-09-16 Wed]
- - State "DONE" from "TODO" [2009-09-12 Sat]
- code{SCHEDULED} date and repeat interval) and at least every 4 days. If
- today is the 15th, then the habit first appears in the agenda on Oct 17,
- after the minimum of 2 days has elapsed, and will appear overdue on Oct 19,
- after four days have elapsed.
- What's really useful about habits is that they are displayed along with a
- consistency graph, to show how consistent you've been at getting that task
- done in the past. This graph shows every day that the task was done over the
- past three weeks, with colors for each day. The colors used are:
- code
- item Green
- If the task could have been done on that day.
- item Red
- If the task was overdue on that day.
- table
- item org-habit-graph-column
- The buffer column at which the consistency graph should be drawn. This will
- overwrite any text in that column, so it is a good idea to keep your habits'
- titles brief and to the point.
- item org-habit-following-days
- The number of days after today that will appear in consistency graphs.
- code{nil}, only show habits in today's agenda view. This is set to true by
- default.
- kbd{K} in the agenda buffer will cause habits to
- temporarily be disabled and they won't appear at all. Press
- node Priorities
- cindex priorities
- If you use Org mode extensively, you may end up with enough TODO items that
- it starts to make sense to prioritize them. Prioritizing can be done by
- placing a
- example
- *** TODO [#A] Write letter to Sam Fortune
- noindent
- samp{A},
- samp{C}.
- samp{B}. Priorities make a difference only for
- sorting in the agenda (
- code{org-priority-faces}.
- Priorities can be attached to any outline node; they do not need to be TODO
- items.
- kbd
- kbd{C-c ,}
- kbd{C-c ,}
- command{org-priority}). The
- command prompts for a priority character samp{B} or
- key{SPC} instead, the priority cookie is removed from the
- headline. The priorities can also be changed ``remotely'' from the timeline
- and agenda buffer with the pxref{Agenda commands}).
- orgcmdkkcc{S-key{down},org-priority-up,org-priority-down}
- footnote{See also the option
- pxref{Creating timestamps}). See also
- code{shift-selection-mode}.
- vindex org-highest-priority
- vindex org-default-priority
- You can change the range of allowed priorities by setting the options
- code{org-lowest-priority}, and
- cindex #+PRIORITIES
- end example
- section Breaking tasks down into subtasks
- cindex statistics, for TODO items
- footnote{To keep subtasks out of the
- global TODO list, see the
- samp{[/]} or
- kbd{C-c C-c} on the cookie. For example:
- end example
- code{COOKIE_DATA} to either samp{todo} to resolve
- this issue.
- code{org-hierarchical-todo-statistics}. To do this for a single subtree,
- include the word code{COOKIE_DATA}
- property.
- end example
- If you would like a TODO entry to automatically change to DONE
- when all children are done, you can use the following setup:
- end example
- Another possibility is the use of checkboxes to identify (a hierarchy of) a
- large number of subtasks (
- node Checkboxes
- cindex checkboxes
- footnote{With the exception of description
- lists. But you can allow it by modifying
- pxref{Plain lists}) can be made into a checkbox by starting
- it with the string
- pxref{TODO items}), but is more lightweight. Checkboxes are not included
- in the global TODO list, so they are often great to split a task into a
- number of simple steps. Or you can use them in a shopping list. To toggle a
- checkbox, use
- file{org-mouse.el}).
- Here is an example of a checkbox list.
- end example
- Checkboxes work hierarchically, so if a checkbox item has children that
- are checkboxes, toggling one of the children checkboxes will make the
- parent checkbox reflect if none, some, or all of the children are
- checked.
- cindex checkbox statistics
- vindex org-checkbox-hierarchical-statistics
- The samp{[1/3]} in the first and second line are cookies
- indicating how many checkboxes present in this entry have been checked off,
- and the total number of checkboxes present. This can give you an idea on how
- many checkboxes remain, even without opening a folded entry. The cookies can
- be placed into a headline or into (the first line of) a plain list item.
- Each cookie covers checkboxes of direct children structurally below the
- headline/item on which the cookie appears
- code{org-checkbox-hierarchical-statistics} if you want such cookies to
- count all checkboxes below the cookie, not just those belonging to direct
- children.}. You have to insert the cookie yourself by typing either
- samp{[%]}. With samp{n out of m}
- result, as in the examples above. With
- samp{[50%]} and
- code{COOKIE_DATA}
- to either samp{todo} to resolve this issue.
- cindex checkbox blocking
- code{ORDERED} property, checkboxes must
- be checked off in sequence, and an error will be thrown if you try to check
- off a box while there are unchecked boxes above it.
- table
- orgcmd{C-c C-c,org-toggle-checkbox}
- Toggle checkbox status or (with prefix arg) checkbox presence at point. With
- a single prefix argument, add an empty checkbox or remove the current
- onekbd{C-u C-c C-c} before the
- samp{[-]}, which is considered to be an
- intermediate state.
- samp{[-]}, which is considered to be an
- intermediate state.
- minus
- item
- If the cursor is in a headline, toggle the state of the first checkbox in the
- region between this headline and the next---so
- item
- If there is no active region, just toggle the checkbox at point.
- orgcmd{M-S-
- pxref{Plain lists}).
- vindex org-track-ordered-property-with-tag
- code{ORDERED} property of the entry, to toggle if checkboxes must
- be checked off in sequence. A property is used for this behavior because
- this should be local to the current entry, not inherited like a tag.
- However, if you would like to
- code{org-track-ordered-property-with-tag}.
- kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are
- updated automatically if you toggle checkboxes with
- kbd{M-S-
- end table
- chapter Tags
- cindex headline tagging
- cindex sparse tree, tag based
- An excellent way to implement labels and contexts for cross-correlating
- information is to assign
- vindex org-tag-faces
- Every headline can contain a list of tags; they occur at the end of the
- headline. Tags are normal words containing letters, numbers,
- samp{}. Tags must be preceded and followed by a single colon, e.g.,
- samp{:work:urgent:}.
- Tags will by default be in bold face with the same color as the headline.
- You may specify special faces for specific tags using the option
- pxref{Faces for TODO keywords}).
- end menu
- section Tag inheritance
- cindex inheritance, of tags
- i{Tags} make use of the hierarchical structure of outline trees. If a
- heading has a certain tag, all subheadings will inherit the tag as
- well. For example, in the list
- end example
- samp{:work:},
- samp{:notes:}, and
- footnote{As with all these in-buffer settings, pressing
- cindex #+FILETAGS
- end example
- vindex org-use-tag-inheritance
- code{org-tags-exclude-from-inheritance}.
- To turn it off entirely, use
- vindex org-tags-match-list-sublevels
- When a headline matches during a tags search while tag inheritance is turned
- on, all the sublevels in the same tree will (for a simple match form) match
- as well
- pxref{Property searches}).}. The list
- of matches may then become very long. If you only want to see the first tags
- match in a subtree, configure
- vindex org-agenda-use-tag-inheritance
- Tag inheritance is relevant when the agenda search tries to match a tag,
- either in the code{tags-todo} agenda types. In other agenda
- types,
- code{org-agenda-use-tag-inheritance} to control
- this: the default value includes all agenda types, but setting this to
- node Setting tags
- cindex setting tags
- kindex M-
- kbd{M-
- table
- orgcmd{C-c C-q,org-set-tags-command}
- vindex org-tags-column
- Enter new tags for the current headline. Org mode will either offer
- completion or a special single-key interface for setting tags, see
- below. After pressing
- code{org-tags-column}. When called with a
- pxref{TODO basics}).
- kbd{C-c C-q}.
- vindex org-tag-alist
- Org supports tag insertion based on a
- code{org-tag-alist}. Finally you can set
- the default tags for a given file with lines like
- example
- #+TAGS: work home tennisclub
- #+TAGS: laptop car pc sailboat
- code{org-tag-alist}, but would like to use a dynamic tag list
- in a specific file, add an empty TAGS option line to that file:
- end example
- code{org-tag-persistent-alist}. You may turn this off on a per-file basis
- by adding a STARTUP option line to that file:
- end example
- By default Org mode uses the standard minibuffer completion facilities for
- entering tags. However, it also implements another, quicker, tag selection
- method called
- code{org-tag-alist} in
- your Emacs init file. For example, you may find the need to tag many items
- in different files with
- lisp
- (setq org-tag-alist '(("@@work" . ?w) ("@@home" . ?h) ("laptop" . ?l)))
- noindent If the tag is only relevant to the file you are working on, then you
- can instead set the TAGS option line as:
- end example
- samp{\n} into the tag list
- end example
- example
- #+TAGS: work(w) home(h) tennisclub(t)
- #+TAGS: laptop(l) pc(p)
- noindent
- You can also group together tags that are mutually exclusive by using
- braces, as in:
- { work(w) home(h) tennisclub(t)
- end example
- samp{work},
- samp{tennisclub} should be selected. Multiple such groups are allowed.
- kbd{C-c C-c} with the cursor in one of
- these lines to activate any changes.
- code{org-tag-alist},
- you must use the dummy tags code{:endgroup} instead
- of the braces. Similarly, you can use
- lisp
- (setq org-tag-alist '((:startgroup . nil)
- ("@@work" . ?w) ("@@home" . ?h)
- ("@@tennisclub" . ?t)
- (:endgroup . nil)
- ("laptop" . ?l) ("pc" . ?p)))
- kbd{C-c C-c} will
- automatically present you with a special interface, listing inherited tags,
- the tags of the current headline, and a list of all valid tags with
- corresponding keys
- table
- kindex
- item
- kindex
- item
- kindex
- item
- item C-g
- Abort without installing changes.
- kbd{q} is not assigned to a tag, it aborts like
- item !
- Turn off groups of mutually exclusive tags. Use this to (as an
- exception) assign several tags from such a group.
- kbd{C-c} will display the
- selection window.
- noindent
- This method lets you assign tags to a headline with very few keys. With
- the above setup, you could clear the current tags and set
- samp{laptop} and kbd{C-c
- C-c key{RET}}. Switching from
- samp{work} would be done with key{RET}} or
- alternatively with
- samp{Sarah} could be done with key{TAB} S a r a h
- key{RET}}.
- code{org-fast-tag-selection-single-key}.
- Then you no longer have to press
- kbd{C-c} to turn off auto-exit for the current tag
- selection process (in effect: start selection with
- kbd{C-c C-c}). If you set the variable to the value
- kbd{C-c}.
- section Tag hierarchy
- cindex tags, groups
- emph{group
- tag} for a set of other tags. The group tag can be seen as the ``broader
- term'' for its set of tags. Defining multiple
- example
- #+TAGS: [ GTD : Control Persp ]
- samp{GTD} is the
- samp{Control}, samp{Control} and
- example
- #+TAGS: [ Control : Context Task ]
- #+TAGS: [ Persp : Vision Goal AOF Project ]
- example
- - GTD
- - Persp
- - Vision
- - Goal
- - AOF
- - Project
- - Control
- - Context
- - Task
- code{:startgrouptag},
- code{:endgrouptag} keyword directly when setting
- lisp
- (setq org-tag-alist '((:startgrouptag)
- ("GTD")
- (:grouptags)
- ("Control")
- ("Persp")
- (:endgrouptag)
- (:startgrouptag)
- ("Control")
- (:grouptags)
- ("Context")
- ("Task")
- (:endgrouptag)))
- example
- #+TAGS: }
- code{org-tag-alist} you can use
- code{:endgroup} instead of code{:endgrouptag} to
- make the tags mutually exclusive.
- Furthermore, the members of a
- {
- example
- #+TAGS: [ Vision : .+
- {G} ]
- #+TAGS: [ AOF : .+
- {P} ]
- samp{Project} will now list all tags also including
- regular expression matches for .+}, and similarly for tag searches on
- samp{Goal} and
- samp{P2014_OrgTags}.
- vindex org-group-tags
- If you want to ignore group tags temporarily, toggle group tags support
- with kbd{C-c C-x q}. If you
- want to disable tag groups completely, set code{nil}.
- section Tag searches
- cindex searching for tags
- Once a system of tags has been set up, it can be used to collect related
- information into special lists.
- kbd
- kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
- orgcmd{C-c a m,org-tags-view}
- Create a global list of tag matches from all agenda files.
- orgcmd{C-c a M,org-tags-view}
- code{org-tags-match-list-sublevels}).
- samp{+boss+urgent-project1}, to find entries with tags
- samp{urgent}, but not samp{Kathy|Sally} to find entries
- tagged as samp{Sally}. The full syntax of the search string
- is rich and allows also matching against TODO keywords, entry levels and
- properties. For a complete description with many examples, see
- node Properties and columns
- cindex properties
- A property is a key-value pair associated with an entry. Properties can be
- set so they are associated with a single entry, with every entry in a tree,
- or with every entry in an Org mode file.
- There are two main applications for properties in Org mode. First,
- properties are like tags, but with a value. Imagine maintaining a file where
- you document bugs and plan releases for a piece of software. Instead of
- using tags like code{:release_2:}, you can use a
- property, say
- code{1.0} or
- pxref{Column view}).
- end menu
- section Property syntax
- cindex drawer, for properties
- Properties are key-value pairs. When they are associated with a single entry
- or with a tree they need to be inserted into a special drawer
- (code{PROPERTIES}, which has to be located
- right below a headline, and its planning line (
- example
- * CD collection
- ** Classic
- *** Goldberg Variations
- :PROPERTIES:
- :Title: Goldberg Variations
- :Composer: J.S. Bach
- :Artist: Glen Gould
- :Publisher: Deutsche Grammophon
- :NDisks: 1
- :END:
- code{org-use-property-inheritance}, a property set
- this way will either be associated with a single entry, or the subtree
- defined by the entry, see
- samp{:Xyz:}
- by setting a property
- emph{inherited}, so if you set it in a level 1 entry, it will apply to
- the entire tree. When allowed values are defined, setting the
- corresponding property becomes easier and is less prone to typing
- errors. For the example with the CD collection, we can predefine
- publishers and the number of disks in a box like this:
- end example
- If you want to set properties that can be inherited by any entry in a
- file, use a line like
- cindex #+PROPERTY
- end example
- Contrary to properties set from a special drawer, you have to refresh the
- buffer with
- code{+} to
- the property name. The following results in the property
- cindex property, +
- end example
- It is also possible to add to the values of inherited properties. The
- following results in the
- code{Goldberg Variations} subtree.
- example
- * CD collection
- ** Classic
- :PROPERTIES:
- :GENRES: Classic
- :END:
- *** Goldberg Variations
- :PROPERTIES:
- :Title: Goldberg Variations
- :Composer: J.S. Bach
- :Artist: Glen Gould
- :Publisher: Deutsche Grammophon
- :NDisks: 1
- :GENRES+: Baroque
- :END:
- vindex org-global-properties
- Property values set with the global variable
- noindent
- The following commands help to work with properties:
- kbd
- key{TAB},pcomplete}
- After an initial colon in a line, complete property keys. All keys used
- in the current file will be offered as possible completions.
- item C-u M-x org-insert-drawer RET
- orgcmd{C-c C-c,org-property-action}
- With the cursor in a property drawer, this executes property commands.
- orgcmdkkcc{S-key{left},org-property-next-allowed-value,org-property-previous-allowed-value}
- Switch property at point to the next/previous allowed value.
- orgcmd{C-c C-c D,org-delete-property-globally}
- Globally remove a property, from all entries in the current file.
- end table
- section Special properties
- pxref{Column view}), or to use them in queries. The
- following property names are special and should not be used as keys in the
- properties drawer:
- cindex property, special, BLOCKED
- cindex property, special, CLOCKSUM_T
- cindex property, special, DEADLINE
- cindex property, special, ITEM
- cindex property, special, SCHEDULED
- cindex property, special, TIMESTAMP
- cindex property, special, TODO
- r{All tags, including inherited ones.}
- BLOCKED
- r{The sum of CLOCK intervals in the subtree.
- r{must be run first to compute the values in the current buffer.}
- CLOCKSUM_T
- r{
- r{values in the current buffer.}
- CLOSED
- r{The deadline time string, without the angular brackets.}
- FILE
- r{The headline of the entry.}
- PRIORITY
- r{The scheduling timestamp, without the angular brackets.}
- TAGS
- r{The first keyword-less timestamp in the entry.}
- TIMESTAMP_IA
- r{The TODO keyword of the entry.}
- node Property searches
- cindex properties, searching
- pxref{Tag searches}).
- kbd
- kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
- xref{Matching tags and properties}.
- vindex org-tags-match-list-sublevels
- Create a global list of tag matches from all agenda files, but check
- only TODO items and force checking of subitems (see the option
- end table
- The syntax for the search string is described in
- table
- orgkey{C-c / p}
- Create a sparse tree based on the value of a property. This first
- prompts for the name of a property, and then for a value. A sparse tree
- is created with all entries that define this property with the given
- value. If you enclose the value in curly braces, it is interpreted as
- a regular expression and matched against the property values.
- node Property inheritance
- cindex properties, inheritance
- vindex org-use-property-inheritance
- The outline structure of Org mode documents lends itself to an
- inheritance model of properties: if the parent in a tree has a certain
- property, the children can inherit this property. Org mode does not
- turn this on by default, because it can slow down property searches
- significantly and is often not needed. However, if you find inheritance
- useful, you can turn it on by setting the variable
- code{t} to make
- all properties inherited from the parent, to a list of properties
- that should be inherited, or to a regular expression that matches
- inherited properties. If a property has the value
- code{nil}.
- Org mode has a few properties for which inheritance is hard-coded, at
- least for the special applications for which they are used:
- table
- item COLUMNS
- The
- pxref{Column view}). It is inherited in the sense that the level
- where a
- item CATEGORY
- code{:CATEGORY:} property
- applies to the entire subtree.
- cindex property, ARCHIVE
- For archiving, the
- pxref{Moving subtrees}).
- cindex property, LOGGING
- The LOGGING property may define logging settings for an entry or a
- subtree (
- end table
- section Column view
- A great way to view and edit properties in an outline tree is
- kbd{S-key{TAB}}, or simply
- pxref{Agenda views}) where
- queries have collected selected items, possibly from a number of files.
- end menu
- subsection Defining columns
- cindex properties, column view
- Setting up a column view first requires defining the columns. This is
- done by defining a column format line.
- end menu
- subsubsection Scope of column definitions
- To define a column format for an entire file, use a line like
- example
- #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
- code{:COLUMNS:} property to the top node of that tree, for example:
- end example
- If a
- node Column attributes
- example
- %[var{property}[({}]
- noindent
- Except for the percent sign and the property name, all items are
- optional. The individual parts have the following meaning:
- var{width}
- r{If omitted, the width will be determined automatically.}
- r{The property that should be edited in this column.}
-
- r{as well (
- var{title}
- r{name is used.}
- var{summary-type}r{The summary type. If specified, the column values for}
- footnote{If
- more than one summary type apply to the property, the parent
- values are computed according to the first of them.}.}
-
- {+r{Sum numbers in this column.}
- } samp{+}, but format result with
- {$r{Currency, short for
- {minr{Smallest number in column.}
- }
- {meanr{Arithmetic mean of numbers.}
- } samp{[X]} if all children are
- {X/r{Checkbox status,
- {X%r{Checkbox status,
- {:r{Sum times, HH:MM, plain numbers are
- hours
- code{org-effort-durations}, e.g.,
-
- {:minr{Smallest time value in column.}
- }
- {:meanr{Arithmetic mean of time values.}
- } footnote{An age is defined as
- a duration since a given time-stamp (
- samp{d}, samp{m} and
- samp{0d 13h 0m 10s}.} (in
- days/hours/mins/seconds).}
- }
- {meanr{Arithmetic mean of ages (in days/hours/mins/seconds).}
- } samp{low-high} estimates.}
- code{est+} summary type requires further explanation. It is used for
- combining estimates, expressed as
- code{est+} adds the
- statistical mean and variance of the sub-tasks, generating a final estimate
- from the sum. For example, suppose you had ten tasks, each of which was
- estimated at 0.5 to 2 days of work. Straight addition produces an estimate
- of 5 to 20 days, representing what to expect if everything goes either
- extremely well or extremely poorly. In contrast,
- code{%5d} or
- vindex org-columns-summary-types
- You can also define custom summary types by setting
- example
- :COLUMNS: %25ITEM %9Approved(Approved?)} %Owner %11Status \
- {:
- end example
- samp{%25ITEM}, means the first 25 characters of the
- item itself, i.e., of the headline. You probably always should start the
- column definition with the
- samp{Owner} with a list of names as allowed values, for
- samp{Approved}. When no width is given after the
- samp{Approved} column does have a
- modified title (
- samp{Time_Estimate} column by adding time duration
- expressions like HH:MM, and for the
- samp{[X]} status if all children have been checked. The
- samp{CLOCKSUM_T} columns are special, they lists the
- sums of CLOCK intervals in the subtree, either for all clocks or just for
- today.
- subsection Using column view
- kbd
- orgcmd{C-c C-x C-c,org-columns}
- code{#+COLUMNS} definition. If the
- cursor is somewhere inside the outline, this command searches the hierarchy,
- up from point, for a
- code{:COLUMNS:} property. If no such property
- is found, the format is taken from the
- code{org-columns-default-format}, and column view is established
- for the current entry and its subtree.
- orgcmd{g,org-columns-redo}
- Same as
- orgcmd{q,org-columns-quit}
- Exit column view.
- item key{right} key{down}
- Move through the column view from field to field.
- key{left}
- key{right}
- key{left}/
- item 1..9,0
- Directly select the Nth allowed value,
- orgcmdkkcc{n,p,org-columns-next-allowed-value,org-columns-previous-allowed-value}
- Same as key{left}/
- orgcmd{e,org-columns-edit-value}
- Edit the property at point. For the special properties, this will
- invoke the same interface that you normally use to change that
- property. For example, when editing a TAGS property, the tag completion
- or fast selection interface will pop up.
- orgcmd{v,org-columns-show-value}
- View the full value of this property. This is useful if the width of
- the column is smaller than that of the value.
- tsubheading{Modifying the table structure}
- orgcmd{S-M-
- orgcmd{S-M-
- end table
- subsection Capturing column view
- Since column view is just an overlay over a buffer, it cannot be
- exported or printed directly. If you want to capture a column view, use
- a pxref{Dynamic blocks}). The frame
- of this block looks like this:
- example
- * The column view
- #+BEGIN: columnview :hlines 1 :id "label"
- #+END:
- noindent This dynamic block has the following parameters:
- code
- cindex property, ID
- r{use the tree in which the capture block is located}
- global
- var{path-to-file}"
- @r{run column view at the top of this file}
- "r{call column view in the tree that has an
- r{property with the value
- r{
- r{the current entry and copy it to the kill-ring.}
- item :hlines
- When var{N}, insert
- an hline before each headline with level var{N}}.
- code{t}, force column groups to get vertical lines.
- item :skip-empty-rows
- When set to
- code{ITEM}.
- code{nil}, indent each
- end table
- table
- orgcmd{C-c C-x i,org-insert-columns-dblock}
- Insert a dynamic block capturing a column view. You will be prompted
- for the scope or ID of the view.
- code{#+BEGIN} line of the dynamic block.
- pxref{Dynamic blocks}). This is useful if
- you have several clock table blocks, column-capturing blocks or other dynamic
- blocks in a buffer.
- code{#+TBLFM:} after the table, the table will
- actually be recalculated automatically after an update.
- An alternative way to capture and process property values into a table is
- provided by Eric Schulte's
- footnote{Contributed packages are not part of Emacs, but are
- distributed with the main distribution of Org (visit
- node Property API
- cindex properties, API
- ref{Using the
- property API}.
- chapter Dates and times
- cindex times
- cindex date stamp
- To assist project planning, TODO items can be labeled with a date and/or
- a time. The specially formatted string carrying the date and time
- information is called a
- menu
- * Timestamps:: Assigning a time to a tree entry
- * Creating timestamps:: Commands which insert timestamps
- * Deadlines and scheduling:: Planning your work
- * Clocking work time:: Tracking how long you spend on a task
- * Effort estimates:: Planning work effort in advance
- * Timers:: Notes with a running timer
- node Timestamps
- cindex timestamps
- cindex date stamps
- cindex scheduling
- A timestamp is a specification of a date (possibly with a time or a range of
- times) in a special format, either footnote{In this
- simplest form, the day name is optional when you type the date yourself.
- However, any dates inserted or modified by Org will add that day name, for
- reading convenience.} or samp{<2003-09-16
- Tue 12:00-12:30>}
- ref{Custom time
- format}.}. A timestamp can appear anywhere in the headline or body of an Org
- tree entry. Its presence causes entries to be shown on specific dates in the
- agenda (
- table
- item Plain timestamp; Event; Appointment
- cindex appointment
- A simple timestamp just assigns a date/time to an item. This is just
- like writing down an appointment or event in a paper agenda. In the
- timeline and agenda displays, the headline of an entry associated with a
- plain timestamp will be shown exactly on that date.
- end example
- cindex timestamp, with repeater interval
- A timestamp may contain a
- example
- * Pick up Sam at school
- <2007-05-16 Wed 12:30 +1w>
- item Diary-style sexp entries
- For more complex date specifications, Org mode supports using the special
- sexp diary entries implemented in the Emacs calendar/diary
- package
- code{calendar-date-style} (or, for older Emacs
- versions,
- code{(diary-date 12 1 2005)} or
- code{(diary-date 2005 12 1)}, depending on
- the settings. This has been the source of much confusion. Org mode users
- can resort to special versions of these functions like
- code{org-anniversary}. These work just like the corresponding
- code{calendar-date-style}.}. For
- example with optional time
- end example
- cindex timerange
- samp{--} denote a range. The headline
- will be shown on the first and last day of the range, and on any dates
- that are displayed and fall in the range. Here is an example:
- end example
- cindex timestamp, inactive
- emph{not} trigger an entry to show up in the agenda.
- end example
- node Creating timestamps
- cindex creating timestamps
- table
- orgcmd{C-c .,org-time-stamp}
- Prompt for a date and insert a corresponding timestamp. When the cursor is
- at an existing timestamp in the buffer, the command is used to modify this
- timestamp instead of inserting a new one. When this command is used twice in
- succession, a time range is inserted.
- orgcmd{C-c !,org-time-stamp-inactive}
- Like
- c
- kindex C-u C-c !
- itemx C-u C-c !
- kbd{C-c .} and
- code{org-time-stamp-rounding-minutes}.
- orgkey{C-c C-c}
- Normalize timestamp, insert/fix day name if missing or wrong.
- orgcmd{C-c <,org-date-from-calendar}
- Insert a timestamp corresponding to the cursor date in the Calendar.
- orgcmd{C-c >,org-goto-calendar}
- Access the Emacs calendar for the current date. If there is a
- timestamp in the current line, go to the corresponding date
- instead.
- orgcmd{C-c C-o,org-open-at-point}
- Access the agenda for the date given by the timestamp or -range at
- point (
- c
- key{left},S-
- pxref{Conflicts}).
- orgcmdkkcc{S-key{down},org-timestamp-up,org-timestamp-down-down}
- Change the item under the cursor in a timestamp. The cursor can be on a
- year, month, day, hour or minute. When the timestamp contains a time range
- like
- pxref{Priorities}). The key bindings also conflict with shift-selection and
- related modes (
- c
- cindex evaluate time range
- Evaluate a time range by computing the difference between start and end.
- With a prefix argument, insert result after the time range (in a table: into
- the following column).
- menu
- * The date/time prompt:: How Org mode helps you entering date and time
- * Custom time format:: Making dates look different
- node The date/time prompt
- cindex date, reading in minibuffer
- vindex org-read-date-prefer-future
- When Org mode prompts for a date/time, the default is shown in default
- date/time format, and the prompt therefore seems to ask for a specific
- format. But it will in fact accept date/time information in a variety of
- formats. Generally, the information should start at the beginning of the
- string. Org mode will find whatever information is in
- there and derive anything you have not specified from the
- i{before} today, it will assume that you mean a future date
- code{org-read-date-prefer-future}. You may set that variable to
- the symbol
- samp{(=>F).}
- For example, let's assume that today is
- b{bold}.
- result{} 2003-02-05
- 2/5/3
- result{} b{06}-14
- 12 b{2006}-
- result{}
- result{} nearest Friday after the default date
- sep 15 b{2006}-09-15
- feb 15 b{2007}-02-15
- sep 12 9
- result{} b{06}-
- result{}
- result{} ISO week four of the current year
- result{} Friday of ISO week 4 in 2012
- 2012-w04-5
- end example
- Furthermore you can specify a relative date by giving, as the
- example
- +0
- result{} today
- +4d
- result{} same as above
- +2w
- result{} five days from default date
- +2tue
- result{} last Wednesday
- vindex parse-time-months
- code{parse-time-months} and
- vindex org-read-date-force-compatible-dates
- Not all dates can be represented in a given Emacs implementation. By default
- Org mode forces dates into the compatibility range 1970--2037 which works on
- all Emacs implementations. If you want to use dates outside of this range,
- read the docstring of the variable
- example
- 11am-1:15pm
- result{} same as above
- 11am+2:15
- end example
- vindex org-popup-calendar-for-date-prompt
- Parallel to the minibuffer prompt, a calendar is popped up
- code{org-popup-calendar-for-date-prompt}.}. When you exit the date
- prompt, either by clicking on a date in the calendar, or by pressing
- kindex <
- kindex M-v
- kindex mouse-1
- key{right}
- key{left}
- key{down}
- key{up}
- key{right}
- key{left}
- key{RET}
- key{down}
- key{up}
- key{RET}
- r{Select date by clicking on it.}
- S-key{left}
- key{down}/r{One week forward/backward.}
- M-S-key{left}
- r{Scroll calendar forward/backward by one month.}
- M-v / C-v
- key{down}/r{Scroll calendar forward/backward by one year.}
- vindex org-read-date-display-live
- The actions of the date/time prompt may seem complex, but I assure you they
- will grow on you, and you will start getting annoyed by pretty much any other
- way of entering a date/time out there. To help you understand what is going
- on, the current interpretation of your input will be displayed live in the
- minibuffer
- code{org-read-date-display-live}.}.
- subsection Custom time format
- cindex time format, custom
- vindex org-display-custom-times
- code{org-display-custom-times} and
- table
- orgcmd{C-c C-x C-t,org-toggle-time-stamp-overlays}
- Toggle the display of custom formats for dates and times.
- noindent
- Org mode needs the default format for scanning, so the custom date/time
- format does not
- emph{over} the default format using text properties. This has the
- following consequences:
- bullet
- item
- The key{up}/
- kbd{S-key{down}} will change the stamp by one day,
- just like key{left}/
- item
- If the timestamp contains a range of clock times or a repeater, these
- will not be overlaid, but remain in the buffer as they were.
- emph{all} (invisible) characters
- belonging to the ISO timestamp have been removed.
- end itemize
- section Deadlines and scheduling
- A timestamp may be preceded by special keywords to facilitate planning. Both
- the timestamp and the keyword have to be positioned immediatly after the task
- they refer to.
- var
- cindex DEADLINE keyword
- Meaning: the task (most likely a TODO item, though not necessarily) is supposed
- to be finished on that date.
- vindex org-agenda-skip-deadline-prewarning-if-scheduled
- On the deadline date, the task will be listed in the agenda. In
- addition, the agenda for
- code{org-deadline-warning-days} before the due date, and continuing
- until the entry is marked DONE
- example
- *** TODO write article about the Earth for the Guide
- DEADLINE: <2004-02-29 Sun>
- The editor in charge is [[bbdb:Ford Prefect]]
- code{DEADLINE: <2004-02-29 Sun -5d>}. This warning is
- deactivated if the task gets scheduled and you set
- code{t}.
- cindex SCHEDULED keyword
- Meaning: you are planning to start working on that task on the given
- date.
- footnote{It will still
- be listed on that date after it has been marked DONE
- code{org-agenda-skip-scheduled-if-done}.}. In
- addition, a reminder that the scheduled date has passed will be present
- in the compilation for
- example
- *** TODO Call Trillian for a date on New Years Eve.
- SCHEDULED: <2004-12-25 Sat>
- vindex org-scheduled-delay-days
- emph{delay} the display of this task in the agenda, use
- code{--2d}
- instead. See
- code{org-agenda-skip-scheduled-delay-if-deadline} for details on how to
- control this globally or per agenda.
- b{Important:} Scheduling an item in Org mode should
- i{scheduling a meeting}.
- Setting a date for a meeting is just a simple appointment, you should
- mark this entry with a simple plain timestamp, to get this item shown
- on the date where it applies. This is a frequent misunderstanding by
- Org users. In Org mode,
- end table
- You may use timestamps with repeaters in scheduling and deadline
- entries. Org mode will issue early and late warnings based on the
- assumption that the timestamp represents the
- c
- c
- in scheduling and deadline timestamps is limited. Org mode does not
- know enough about the internals of each sexp function to issue early and
- late warnings. However, it will show the item on each day where the
- sexp entry matches.
- end menu
- subsection Inserting deadlines or schedules
- The following commands allow you to quickly insert a deadline or to schedule
- an item:
- kbd
- orgcmd{C-c C-d,org-deadline}
- Insert
- code{org-log-redeadline}code{#+STARTUP}
- keywords code{lognoteredeadline}, and
- orgcmd{C-c C-s,org-schedule}
- Insert
- code{org-log-reschedule}code{#+STARTUP}
- keywords code{lognotereschedule}, and
- c
- cindex sparse tree, for deadlines
- code{org-deadline-warning-days}.
- With
- kbd{C-1 C-c / d} shows
- all deadlines due tomorrow.
- orgcmd{C-c / b,org-check-before-date}
- Sparse tree for deadlines and scheduled items before a given date.
- orgcmd{C-c / a,org-check-after-date}
- Sparse tree for deadlines and scheduled items after a given date.
- code{org-schedule} and
- node Repeated tasks
- cindex tasks, repeated
- example
- ** TODO Pay the rent
- DEADLINE: <2005-10-01 Sat +1m>
- noindent
- the
- code{y/w/m/d/h} letters. If you need both a repeater
- and a special warning period in a deadline entry, the repeater should come
- first and the warning period last:
- vindex org-todo-repeat-to-state
- Deadlines and scheduled items produce entries in the agenda when they are
- over-due, so it is important to be able to mark such an entry as completed
- once you have done so. When you mark a DEADLINE or a SCHEDULE with the TODO
- keyword DONE, it will no longer produce entries in the agenda. The problem
- with this is, however, that then also the
- kbd{C-c C-t}), it will
- shift the base date of the repeating timestamp by the repeater interval, and
- immediately set the entry state back to TODO
- code{REPEAT_TO_STATE} property or
- the variable
- example
- ** TODO Pay the rent
- DEADLINE: <2005-11-01 Tue +1m>
- code{DONE}, use
- code{org-todo} with a numeric prefix argument of -1.)
- footnote{You can change this using the option
- code{#+STARTUP} options
- code{lognoterepeat}, and code{lognoterepeat}, you
- will also be prompted for a note.} will be added under the deadline, to keep
- a record that you actually acted on the previous instance of this deadline.
- As a consequence of shifting the base date, this entry will no longer be
- visible in the agenda when checking past dates, but all future instances
- will be visible.
- With the
- i{after} the last time you did it. For these tasks, Org mode has
- special repeaters samp{.+}. For example:
- end example
- code{org-agenda-skip-scheduled-if-deadline-is-shown} to
- kbd{C-c C-x c} was
- created for this purpose, it is described in
- node Clocking work time
- cindex clocking time
- footnote{Clocking only works if all
- headings are indented with less than 30 stars. This is a hardcoded
- limitation of code{org-clock-sum}.} of a project.
- And it remembers a history or tasks recently clocked, so that you can jump
- quickly between a number of tasks absorbing your time.
- To save the clock history across Emacs sessions, use
- end lisp
- When you clock into a new task after resuming Emacs, the incomplete
- clock
- code{(setq org-clock-persist t)}.}
- will be found (
- menu
- * Clocking commands:: Starting and stopping a clock
- * The clock table:: Detailed reports
- * Resolving idle time:: Resolving time when you've been idle
- node Clocking commands
- table
- orgcmd{C-c C-x C-i,org-clock-in}
- vindex org-clock-continuously
- code{:LOGBOOK:} drawer (see also the variable
- code{CLOCK_INTO_DRAWER} or
- kbd{C-u} prefix argument,
- select the task from a list of recently clocked tasks. With two
- kbd{d} when
- selecting a clocking task. With three
- *
- cindex property: LAST_REPEAT
- pxref{Effort estimates}), the mode line displays the current
- clocking time against it
- code{org-clock-in-prepare-hook}.} If the task
- is a repeating one (
- footnote{as recorded by the
- code{CLOCK_MODELINE_TOTAL} property. It may have the values
- code{today} to
- show all time clocked on this task today (see also the variable
- code{all} to include all time, or
- footnote{See also the variable
- * Clicking with
- c
- vindex org-log-note-clock-out
- Stop the clock (clock-out). This inserts another timestamp at the same
- location where the clock was last started. It also directly computes
- the resulting time and inserts it after the time range as
- code{org-log-note-clock-out} for the
- possibility to record an additional note together with the clock-out
- timestamp
- code{#+STARTUP: lognoteclock-out}}.
- vindex org-clock-continuously
- Reclock the last clocked task. With one
- kbd{C-u} prefixes,
- force continuous clocking by starting the clock when the last clock
- stopped.
- kindex C-c C-y
- orgcmdkkc{C-c C-c,C-c C-y,org-evaluate-time-range}
- Recompute the time interval after changing one of the timestamps. This
- is only necessary if you edit the timestamps directly. If you change
- them with key{cursor}} keys, the update is automatic.
- key{up/down},org-clock-timestamps-up/down}
- On
- orgcmd{S-M-
- code{CLOCK} log lines, increase/decrease the timestamp at point and
- the one of the previous (or the next clock) timestamp by the same duration.
- For example, if you hit key{up}} to increase a clocked-out timestamp
- by five minutes, then the clocked-in timestamp of the next clock will be
- increased by five minutes.
- orgcmd{C-c C-x C-q,org-clock-cancel}
- Cancel the current clock. This is useful if a clock was started by
- mistake, or if you ended up working on something else.
- kbd{C-u}
- prefix arg, select the target task from a list of recently clocked tasks.
- vindex org-remove-highlights-with-change
- Display time summaries for each subtree in the current buffer. This puts
- overlays at the end of each headline, showing the total time recorded under
- that heading, including the time of any subheadings. You can use visibility
- cycling to study the tree, but the overlays disappear when you change the
- buffer (see variable
- kbd{C-c C-c}.
- kbd{l} key may be used in the timeline (
- pxref{Weekly/daily agenda}) to show which tasks have been
- worked on or closed during a day.
- code{org-clock-out} and
- node The clock table
- cindex clocktable, dynamic block
- emph{clock table}, because it is
- formatted as one or several Org tables.
- kbd
- pxref{Dynamic blocks}) containing a clock
- report as an Org mode table into the current file. When the cursor is
- at an existing clock table, just update it. When called with a prefix
- argument, jump to the first clock report in the current document and
- update it. The clock table always includes also trees with
- orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update}
- Update dynamic block at point. The cursor needs to be in the
- orgkey{C-u C-c C-x C-u}
- Update all dynamic blocks (
- orgcmdkxkc{S-key{right},org-clocktable-try-shift}
- Shift the current
- code{#+BEGIN: clocktable} line for this command. If
- code{today}, it will be shifted to
- end table
- Here is an example of the frame for a clock table as it is inserted into the
- buffer with the
- cindex #+BEGIN, clocktable
- end example
- vindex org-clocktable-defaults
- The
- code{org-clocktable-defaults}.
- example
- :maxlevel
- r{Clocks at deeper levels will be summed into the upper level.}
- :scope
- r{the current buffer or narrowed region}
- file
- r{the subtree where the clocktable is located}
- treer{the surrounding level code{tree3}}
- tree
- r{all agenda files}
- ("file"..)
- r{current file and its archives}
- agenda-with-archives
- r{The time block to consider. This block is specified either}
-
- r{these formats:}
- 2007-12-31
- r{December 2007}
- 2007-W50
- r{2nd quarter in 2007}
- 2007
- var{N}
- var{N}
- var{N}
- var{N}
- r{Use key{left}/
- r{A time string specifying when to start considering times.}
- code{"<-2w>"} can also be used. See}
- ref{Matching tags and properties} for relative time syntax.}
- :tend
- r{Relative times like
- r{
- r{The starting day of the week. The default is 1 for monday.}
- :mstart
- r{day of the month.}
- :step code{week} or
- r{To use this, code{:tstart},
- r{Do not show steps that have zero time.}
- :fileskip0
- r{A tags match to select entries that should contribute. See}
- ref{Matching tags and properties} for the match syntax.}
- code{org-clocktable-write-default},
- but you can specify your own function using the
- example
- :emphasize code{t}, emphasize level one and level two items.}
- :lang footnote{Language terms can be set through the variable
- r{Link the item headlines in the table to their origins.}
- :narrow
- r{the org table. If you write it like
- r{headline will also be shortened in export.}
- :indent
- r{Number of columns to be used for times. If this is smaller}
- code{:maxlevel}, lower levels will be lumped into one column.}
- :level
- r{A cons cell like containing the column to sort and a sorting type.}
- code{:sort (1 . ?a)} sorts the first column alphabetically.}
- :compact code{:level nil :indent t :narrow 40! :tcolumns 1}}
- code{:narrow}}
- :timestamp
- r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.}
- :properties
- r{property will get its own column.}
- :inherit-props code{t}, the values for
- r{Content of a
- r{As a special case,
- r{If you do not specify a formula here, any existing formula}
-
- r{A function to format clock data and insert it into the buffer.}
- example
- #+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t
- #+END: clocktable
- noindent
- and to use a specific time range you could write
- example
- #+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
- :tend "<2006-08-10 Thu 12:00>"
- #+END: clocktable
- example
- #+BEGIN: clocktable :tstart "<-1w>" :tend "<now>"
- #+END: clocktable
- example
- #+BEGIN: clocktable :scope subtree :link t :formula %
- #+END: clocktable
- example
- #+BEGIN: clocktable :scope agenda :block lastweek :compact t
- #+END: clocktable
- node Resolving idle time
- subsubheading Resolving idle time
- vindex org-clock-x11idle-program-name
- vindex org-clock-idle-time
- By customizing the variable
- footnote{On computers using Mac OS X,
- idleness is based on actual user idleness, not just Emacs' idle time. For
- X11, you can install a utility program
- code{contrib/scripts} directory of the Org git distribution, or install the
- code{org-clock-x11idle-program-name} if you are running Debian, to get the
- same general treatment of idleness. On other systems, idle time refers to
- Emacs idle time only.}, and ask what you want to do with the idle time.
- There will be a question waiting for you when you get back, indicating how
- much idle time has passed (constantly updated with the current amount), as
- well as a set of choices to correct the discrepancy:
- kbd
- kbd{k}. Org
- will ask how many of the minutes to keep. Press
- item K
- If you use the shift key and press
- item s
- To keep none of the minutes, use
- item S
- To keep none of the minutes and just clock out at the start of the away time,
- use the shift key and press
- item C
- To cancel the clock altogether, use
- end table
- What if you subtracted those away minutes from the current clock, and now
- want to apply them to a new clock? Simply clock in to any task immediately
- after the subtraction. Org will notice that you have subtracted time ``on
- the books'', so to speak, and will ask if you want to apply those minutes to
- the next task you clock in on.
- There is one other instance when this clock resolution magic occurs. Say you
- were clocked in and hacking away, and suddenly your cat chased a mouse who
- scared a hamster that crashed into your UPS's power button! You suddenly
- lose all your buffers, but thanks to auto-save you still have your recent Org
- mode changes, including your last clock in.
- If you restart Emacs and clock into any task, Org will notice that you have a
- dangling clock which was never clocked out from your last session. Using
- that clock's starting time as the beginning of the unaccounted-for period,
- Org will ask how you want to resolve that time. The logic and behavior is
- identical to dealing with away time due to idleness; it is just happening due
- to a recovery event rather than a set amount of idle time.
- You can also check all the files visited by your Org agenda for dangling
- clocks at any time using kbd{C-c C-x C-z}).
- cindex continuous clocking
- code{org-clock-continuously}
- to
- code{org-clock-in} and two code{org-clock-in-last}.
- section Effort estimates
- cindex property, Effort
- If you want to plan your work in a very detailed way, or if you need to
- produce offers with quotations of the estimated work effort, you may want to
- assign effort estimates to entries. If you are also clocking your work, you
- may later want to compare the planned effort with the actual working time,
- a great way to improve planning estimates. Effort estimates are stored in
- a special property
- table
- orgcmd{C-c C-x e,org-set-effort}
- Set the effort estimate for the current entry. With a numeric prefix
- argument, set it to the Nth allowed value (see below). This command is also
- accessible from the agenda with the
- orgcmd{C-c C-x C-e,org-clock-modify-effort-estimate}
- Modify the effort estimate of the item currently being clocked.
- pxref{Column view}). You should start by setting up discrete values for
- effort estimates, and a
- example
- #+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00
- #+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)} %CLOCKSUM
- noindent
- vindex org-columns-default-format
- or, even better, you can set up these values globally by customizing the
- variables code{org-columns-default-format}.
- In particular if you want to use this setup also in the agenda, a global
- setup may be advised.
- The way to assign estimates to individual items is then to switch to column
- mode, and to use key{right}} and key{left}} to change the
- value. The values you enter will immediately be summed up in the hierarchy.
- In the column next to it, any clocked time will be displayed.
- footnote{Please note
- the pitfalls of summing hierarchical data in a flat list (
- code{org-agenda-columns-add-appointments-to-effort-sum}. The
- appointments on a day that take place over a specified time interval will
- then also be added to the load estimate of the day.
- Effort estimates can be used in secondary agenda filtering that is triggered
- with the pxref{Agenda commands}). If you have
- these estimates defined consistently, two or three key presses will narrow
- down the list to stuff that fits into an available time slot.
- section Taking notes with a timer
- cindex countdown timer
- table
- orgcmd{C-c C-x 0,org-timer-start}
- Start or reset the relative timer. By default, the timer is set to 0. When
- called with a
- kbd{C-u C-u}, change all timer strings
- in the active region by a certain amount. This can be used to fix timer
- strings if the timer was not started at exactly the right moment.
- code{org-timer-default-timer} sets the default countdown value. Giving
- a numeric prefix argument overrides this default value. This command is
- available as
- end table
- Once started, relative and countdown timers are controlled with the same
- commands.
- kbd
- orgcmd{C-c C-x -,org-timer-item}
- Insert a description list item with the value of the current relative or
- countdown timer. With a prefix argument, first reset the relative timer to
- 0.
- key{RET},org-insert-heading}
- Once the timer list is started, you can also use key{RET}} to insert
- new timer items.
- comma{},org-timer-pause-or-continue}
- Pause the timer, or continue it if it is already paused.
- end table
- chapter Capture - Refile - Archive
- i{capture}. It also can store files
- related to a task (
- menu
- * Capture:: Capturing new stuff
- * Attachments:: Add files to tasks
- * RSS feeds:: Getting input from RSS feeds
- * Protocols:: External (e.g., Browser) access to Emacs and Org
- * Refile and copy:: Moving/copying a tree from one place to another
- * Archiving:: What to do with finished projects
- node Capture
- cindex capture
- Capture lets you quickly store notes with little interruption of your work
- flow. Org's method for capturing new items is heavily inspired by John
- Wiegley excellent
- file{remember.el}, then replaced it with
- file{org-remember.el} has
- been completely replaced by
- file{org-remember.el}, you need to update
- it and use the setup described below. To convert your
- example
- end example
- kbd{M-x
- customize-variable org-capture-templates}, check the result, and save the
- customization.
- end menu
- subsection Setting up capture
- The following customization sets a default target file for notes, and defines
- a global keykbd{C-c c} is only a
- suggestion.} for capturing new material.
- smalllisp
- end group
- node Using capture
- table
- orgcmd{C-c c,org-capture}
- Call the command
- cindex date tree
- defined
- orgcmd{C-c C-c,org-capture-finalize}
- Once you have finished entering information into the capture buffer,
- orgcmd{C-c C-w,org-capture-refile}
- Finalize the capture process by refiling (
- code{org-refile} command.
- end table
- You can also call
- kbd{k c} key combination. With this access, any timestamps inserted by
- the selected capture template will default to the cursor date in the agenda,
- rather than to the current date.
- To find the locations of the last stored capture, use
- table
- orgkey{C-u C-c c}
- Visit the target location of a capture template. You get to select the
- template in the usual way.
- end table
- cindex org-capture-last-stored
- You can also jump to the bookmark
- code{org-capture-bookmark} to
- code{org-capture} with
- a
- node Capture templates
- cindex templates, for Capture
- You can use templates for different types of capture items, and
- for different target locations. The easiest way to create such templates is
- through the customize interface.
- kbd
- code{org-capture-templates}.
- samp{Tasks} in
- your file
- file{journal.org} should capture journal entries. A possible configuration
- would look like:
- group
- (setq org-capture-templates
- '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")
- "* TODO %?\n %i\n %a")
- ("j" "Journal" entry (file+datetree "~/org/journal.org")
- "* %?\nEntered on %U\n %i\n %a")))
- end smalllisp
- kbd{C-c c t}, Org will prepare the template
- for you like this:
- var{link to where you initiated capture}]]
- noindent
- During expansion of the template,
- kbd{C-c C-c} and Org returns you to the same
- place where you started the capture process.
- To define special keys to capture to a particular template without going
- through the interactive template selection, you can create your key binding
- like this:
- end lisp
- end menu
- subsubsection Template elements
- Now lets look at the elements of a template definition. Each entry in
- table
- item keys
- The keys that will select the template, as a string, characters
- only, for example
- code{"bt"} for selection with two keys. When using
- several keys, keys using the same prefix key must be sequential
- in the list and preceded by a 2-element entry explaining the
- prefix key, for example
- end smalllisp
- kbd{C} key, this key will
- be used to open the customize buffer for this complex variable.
- item type
- The type of entry, a symbol. Valid values are:
- code
- item item
- A plain list item, placed in the first plain list at the target
- location. Again the target file should be an Org file.
- item table-line
- a new line in the first table at the target location. Where exactly the
- line will be inserted depends on the properties
- code{:table-line-pos} (see below).
- end table
- vindex org-default-notes-file
- Specification of where the captured item should be placed. In Org mode
- files, targets usually define a node. Entries will become children of this
- node. Other types will be added to the table or list in the body of this
- node. Most target specifications contain a file name. If that file name is
- the empty string, it defaults to
- code{org-directory}.
- Valid values are:
- code
- item (id "id of existing org entry")
- Filing as child of this entry, or in the body of the entry.
- item (file+olp "path/to/file" "Level 1 heading" "Level 2" ...)
- For non-unique headings, the full path is safer.
- item (file+datetree "path/to/file")
- Will create a heading in a date tree for today's date
- code{* 2013 :noexport:}
- and
- item (file+datetree+prompt "path/to/file")
- Will create a heading in a date tree, but will prompt for the date.
- item (file+weektree+prompt "path/to/file")
- Will create a heading in a week tree, but will prompt for the date.
- item (clock)
- File to the entry that is currently being clocked.
- end table
- code{(file "path/to/template")}. See below for
- more details.
- table
- item :prepend
- Normally new captured information will be appended at
- the target location (last child, last table line, last list item...).
- Setting this property will change that.
- item :empty-lines
- Set this to the number of lines to insert
- before and after the new item. Default 0, only common other value is 1.
- item :clock-keep
- Keep the clock running when filing the captured entry.
- code{:clock-keep} has precedence over
- code{t}, the current clock will
- run and the previous one will not be resumed.
- item :table-line-pos
- Specification of the location in the table where the new line should be
- inserted. It can be a string, a variable holding a string or a function
- returning a string. The string should look like
- item :kill-buffer
- If the target file was not yet visited when capture was invoked, kill the
- buffer again after capture is completed.
- end table
- subsubsection Template expansion
- In the template itself, special footnote{If you need one of
- these sequences literally, escape the
- smallexample
- %[r{Insert the contents of the file given by
- var{sexp}) var{sexp} and replace with the result.}
-
- r{within the expression will be expanded prior to this.}
-
- r{The result of format-time-string on the ... format specification.}
- %t
- r{Timestamp, with date and time.}
- %u, %U
- r{Initial content, the region when capture is called while the}
-
- r{The entire text will be indented like
- r{Annotation, normally the link created with
- r{Like
- r{Like %a, but only insert the literal link.}
- %c
- r{Content of the X clipboard.}
- %k
- r{Link to the currently clocked task.}
- %n code{user-full-name}).}
- %f
- r{Full path of the file or directory visited by current buffer.}
- %:keyword
- r{Prompt for tags, with completion on tags in target file.}
- %^G
- r{Like code{%^T}, code{%^U}.}
- code{%^}t}.}
- %^C
- r{Like
- {}p var{prop}.}
- %^var{prompt}r{prompt the user for a string and replace this sequence with it.}
-
- r{%^}.}
-
- dots{} %\N {}, where
- r{a number, starting from 1.}
- %?
- end smallexample
- footnote{If you define your own link types (
- code{org-store-link-props} can be accessed in capture templates in a
- similar way.}:
- smallexample
- Link type | Available keywords
- ---------------------------------+----------------------------------------------
- bbdb | %:name %:company
- irc | %:server %:port %:nick
- vm, vm-imap, wl, mh, mew, rmail, | %:type %:subject %:message-id
- gnus, notmuch | %:from %:fromname %:fromaddress
- | %:to %:toname %:toaddress
- | %:date
- r{(date as active timestamp)}
- | %:date-timestamp-inactive
- r{(either "to NAME" or "from NAME")code{org-from-is-user-regexp}.}}
- gnus | %:group,
- end smallexample
- smallexample
- %?
- end smallexample
- subsubsection Templates in contexts
- code{org-capture-templates-contexts}. Let's say
- for example that you have a capture template
- smalllisp
- (setq org-capture-templates-contexts
- '(("p" (in-mode . "message-mode"))))
- code{"p"} should refer to another
- template. In that case, add this command key like this:
- end smalllisp
- See the docstring of the variable for more information.
- section Attachments
- vindex org-attach-directory
- It is often useful to associate reference material with an outline node/task.
- Small chunks of plain text can simply be stored in the subtree of a project.
- Hyperlinks (
- i{attachments},
- which are files located in a directory belonging to an outline node. Org
- uses directories named by the unique ID of each entry. These directories are
- located in the
- footnote{If you move entries or Org files from one
- directory to another, you may want to configure
- code{git init}, Org will automatically commit changes when it sees them.
- The attachment system has been contributed to Org by John Wiegley.
- In cases where it seems better to do so, you can also attach a directory of your
- choice to an entry. You can also make children inherit the attachment
- directory from a parent, so that an entire subtree uses the same attached
- directory.
- table
- orgcmd{C-c C-a,org-attach}
- The dispatcher for commands related to the attachment system. After these
- keys, a list of commands is displayed and you must press an additional key
- to select a command:
- kbd
- vindex org-attach-method
- Select a file and move it into the task's attachment directory. The file
- will be copied, moved, or linked, depending on
- kindex C-c C-a c
- kindex C-c C-a l
- orgcmdtkc{n,C-c C-a n,org-attach-new}
- Create a new attachment as an Emacs buffer.
- orgcmdtkc{o,C-c C-a o,org-attach-open}
- code{org-file-apps}.
- For more details, see the information on following hyperlinks
- (
- orgcmdtkc{O,C-c C-a O,org-attach-open-in-emacs}
- Also open the attachment, but force opening the file in Emacs.
- orgcmdtkc{F,C-c C-a F,org-attach-reveal-in-emacs}
- Also open the directory, but force using
- orgcmdtkc{d,C-c C-a d,org-attach-delete-one}
- Select and delete a single attachment.
- command{dired} and delete from there.
- cindex property, ATTACH_DIR
- Set a specific directory as the entry's attachment directory. This works by
- putting the directory path into the
- orgcmdtkc{i,C-c C-a i,org-attach-set-inherit}
- code{ATTACH_DIR_INHERIT} property, so that children will use the
- same directory for attachments as the parent does.
- end table
- section RSS feeds
- cindex Atom feeds
- Org can add and change entries based on information found in RSS feeds and
- Atom feeds. You could use this to make a task out of each new podcast in a
- podcast feed. Or you could use a phone-based note-creating service on the
- web to import tasks into Org. To access feeds, configure the variable
- smalllisp
- end group
- noindent
- will configure that new items from the feed provided by
- file{~/org/feeds.org} under the heading
- table
- orgcmd{C-c C-x g,org-feed-update-all}
- code{org-feed-alist} and act upon
- them.
- end table
- Under the same headline, Org will create a drawer
- file{org-feed.el} and the docstring of
- node Protocols
- cindex protocols, for external access
- file{emacsserver}. For example, you can
- configure bookmarks in your web browser to send a link to the current page to
- Org and create a note from it using capture (
- uref{http://orgmode.org/worg/org-contrib/org-protocol.php} for detailed
- documentation and setup instructions.
- section Refile and copy
- cindex copying notes
- When reviewing the captured data, you may want to refile or to copy some of
- the entries into a different list, for example into a project. Cutting,
- finding the right location, and then pasting the note is cumbersome. To
- simplify this process, you can use the following special command:
- kbd
- findex org-copy
- Copying works like refiling, except that the original note is not deleted.
- findex org-refile
- vindex org-refile-targets
- vindex org-outline-path-complete-in-steps
- vindex org-log-refile
- vindex org-refile-keep
- Refile the entry or region at point. This command offers possible locations
- for refiling the entry and lets you select one with completion. The item (or
- all items in the region) is filed below the target heading as a subitem.
- Depending on
- *
- By default, all level 1 headlines in the current buffer are considered to be
- targets, but you can have more complex definitions across a number of files.
- See the variable
- code{org-refile-use-outline-path} and
- code{org-refile-allow-creating-parent-nodes}.
- When the variable footnote{with corresponding
- code{logrefile},
- code{nologrefile}} is set, a timestamp or a note will be
- recorded when an entry has been refiled.
- orgcmd{C-u C-u C-c C-w,org-refile-goto-last-stored}
- Jump to the location where
- item C-2 C-c C-w
- Refile as the child of the item currently being clocked.
- code{org-refile-keep} to make
- this the default behavior, and beware that this may result in duplicated
- orgcmdtkc{C-0 C-c C-w r{or}
- code{org-refile-use-cache}. To make the command see new possible
- targets, you have to clear the cache with this command.
- node Archiving
- cindex archiving
- When a project represented by a (sub)tree is finished, you may want
- to move the tree out of the way and to stop it from contributing to the
- agenda. Archiving is important to keep your working files compact and global
- searches like the construction of agenda views fast.
- kbd
- vindex org-archive-default-command
- Archive the current entry using the command specified in the variable
- end table
- end menu
- subsection Moving a tree to the archive file
- table
- orgcmdkskc{C-c C-x C-s,C-c $,org-archive-subtree}
- code{org-archive-location}.
- emph{not} on a headline when this command
- is invoked, the level 1 trees will be checked.
- emph{does} contain a
- timestamp, and that timestamp is in the past.
- cindex archive locations
- The default archive location is a file in the same directory as the
- current file, with the name derived by appending
- code{org-archive-location}.
- There is also an in-buffer option for setting this variable, for example:
- example
- #+ARCHIVE: %s_done::
- cindex property, ARCHIVE
- code{:ARCHIVE:} property with the
- location as the value (
- vindex org-archive-save-context-info
- When a subtree is moved, it receives a number of special properties that
- record context information like the file from where the entry came, its
- outline path the archiving time etc. Configure the variable
- node Internal archiving
- code{ARCHIVE tag}.
- A headline that is marked with the ARCHIVE tag (
- itemize
- item
- pxref{Visibility cycling}). You can force cycling archived
- subtrees with key{TAB}}, or by setting the option
- code{show-all} will open archived subtrees.
- vindex org-sparse-tree-open-archived-trees
- During sparse tree construction (
- code{org-sparse-tree-open-archived-trees}.
- vindex org-agenda-skip-archived-trees
- During agenda view construction (
- code{org-agenda-skip-archived-trees}, in which case these trees will always
- be included. In the agenda you can press
- item
- pxref{Exporting}), only the headline
- is. Configure the details using the variable
- item
- code{org-columns-skip-archived-trees} is configured to
- end itemize
- The following commands help manage the ARCHIVE tag:
- kbd
- orgkey{C-u C-c C-x a}
- Check if any direct children of the current headline should be archived.
- To do this, each subtree is checked for open TODO entries. If none are
- found, the command offers to set the ARCHIVE tag for the child. If the
- cursor is
- orgcmd{C-
- orgcmd{C-c C-x A,org-archive-to-archive-sibling}
- Move the current entry to the
- samp{Archive} and the tag
- end table
- chapter Agenda views
- itemize
- item
- an
- item
- a
- item
- a
- item
- a
- item
- a
- item
- a
- item
- end itemize
- emph{agenda
- buffer}. This buffer is read-only, but provides commands to visit the
- corresponding locations in the original Org files, and even to
- edit these files remotely.
- vindex org-agenda-restore-windows-after-quit
- Two variables control how the agenda buffer is displayed and whether the
- window configuration is restored when the agenda exits:
- code{org-agenda-restore-windows-after-quit}.
- end menu
- section Agenda files
- cindex files for agenda
- emph{agenda
- files}, the files listed in the variable
- footnote{If the value of that variable is not a
- list, but a single file name, then the list of agenda files will be
- maintained in that external file.}. If a directory is part of this list,
- all files with the extension
- footnote{When using the dispatcher, pressing
- code{org-agenda-files} until the next
- dispatcher command.}. You can customize
- cindex files, adding to agenda list
- kbd
- orgcmd{C-c ],org-remove-file}
- Remove current file from the list of agenda files.
- cindex cycling, of agenda files
- itemx C-,
- Cycle through agenda file list, visiting one file after the other.
- item M-x org-iswitchb RET
- Command to use an
- end table
- kbd{<} once or several times in the dispatcher
- (
- table
- orgcmd{C-c C-x <,org-agenda-set-restriction-lock}
- Permanently restrict the agenda to the current subtree. When with a
- prefix argument, or with the cursor before the first headline in a file,
- the agenda scope is set to the entire file. This restriction remains in
- effect until removed with kbd{<}
- or
- orgcmd{C-c C-x >,org-agenda-remove-restriction-lock}
- Remove the permanent restriction created by
- end table
- file{speedbar.el}, you can use the following commands in
- the Speedbar frame:
- kbd
- r{in the speedbar frame},<,org-speedbar-set-agenda-restriction}
- Permanently restrict the agenda to the item---either an Org file or a subtree
- in such a file---at the cursor in the Speedbar frame.
- If there is a window displaying an agenda view, the new restriction takes
- effect immediately.
- r{in the speedbar frame},>,org-agenda-remove-restriction-lock}
- Lift the restriction.
- node Agenda dispatcher
- cindex agenda dispatcher
- kbd{C-c a} (
- kbd{C-c a} is indeed how the dispatcher
- is accessed and list keyboard access to commands accordingly. After
- pressing
- table
- item a
- Create the calendar-like agenda (
- item t
- pxref{Global TODO list}).
- r{/} M
- Create a list of headlines matching a TAGS expression (
- item L
- Create the timeline view for the current buffer (
- item s
- Create a list of entries selected by a boolean expression of keywords
- and/or regular expressions that must or must not occur in the entry.
- vindex org-agenda-text-search-extra-files
- Search for a regular expression in all agenda files and additionally in
- the files listed in
- code{multi-occur}. A prefix argument can be
- used to specify the number of context lines for each match, default is
- 1.
- r{/} !
- Create a list of stuck projects (
- item <
- Restrict an agenda command to the current buffer
- kbd{1} to restrict to the current
- buffer.}. After pressing
- item < <
- If there is an active region, restrict the following agenda command to
- the region. Otherwise, restrict it to the current subtree
- kbd{0} to restrict to the
- current region/subtree.}. After pressing
- item *
- vindex org-agenda-sticky
- Toggle sticky agenda views. By default, Org maintains only a single agenda
- buffer and rebuilds it each time you change the view, to make sure everything
- is always up to date. If you often switch between agenda views and the build
- time bothers you, you can turn on sticky agenda buffers or make this the
- default by customizing the variable
- kbd{r} or
- code{org-toggle-sticky-agenda}.
- xref{Custom agenda views}.
- section The built-in agenda views
- In this section we describe the built-in views.
- end menu
- subsection The weekly/daily agenda
- cindex weekly agenda
- emph{agenda} is to act like a page of a
- paper agenda, showing all the tasks for the current week or day.
- kbd
- orgcmd{C-c a a,org-agenda-list}
- Compile an agenda for the current week from a list of Org files. The agenda
- shows the entries for each day. With a numeric prefix
- kbd{C-u} causes all TODO entries to be
- listed before the agenda. This feature is deprecated, use the dedicated TODO
- list, or a block agenda instead (kbd{C-u 2 1
- C-c a a}) you may set the number of days to be displayed.
- vindex org-agenda-span
- vindex org-agenda-start-day
- code{org-agenda-span} (or the obsolete
- code{day}, code{month} or
- code{org-agenda-start-on-weekday}). You can also set the start
- date using a date shift:
- ref{Agenda
- commands}.
- cindex calendar integration
- lisp
- (setq org-agenda-include-diary t)
- noindent After that, everything will happen automatically. All diary
- entries including holidays, anniversaries, etc., will be included in the
- agenda buffer created by Org mode. key{TAB}, and
- kbd{i} command to
- insert new entries for the current date works in the agenda buffer, as
- well as the commands kbd{M}, and
- kbd{c} can be used to switch back and forth
- between calendar and agenda.
- If you are using the diary only for sexp entries and holidays, it is
- faster to not use the above setting, but instead to copy or even move
- the entries into an Org file. Org mode evaluates diary-style sexp
- entries, and does it faster because there is no overhead for first
- creating the diary display. Note that the sexp entries must start at
- the left margin, no whitespace is allowed before them. For example,
- the following segment of an Org file will be processed and entries
- will be made in the agenda:
- footnote{code{diary-anniversary}, but the argument order is always according to ISO and therefore independent of the value of
- end example
- cindex BBDB, anniversaries
- example
- * Anniversaries
- :PROPERTIES:
- :CATEGORY: Anniv
- :END:
- %%(org-bbdb-anniversaries)
- kbd{C-o anniversary
- code{YYYY-MM-DD} or
- samp{birthday} or
- samp{birthday}. Here are a few examples, the header for the file
- example
- 1973-06-22
- 06-22
- 1955-08-02 wedding
- 2008-04-14 %s released version 6.01 of org mode, %d years ago
- samp{%%(diary-anniversary)} entries
- in an Org or Diary file.
- If you would like to see upcoming anniversaries with a bit of forewarning,
- you can use the following instead:
- end example
- That will give you three days' warning: on the anniversary date itself and the
- two days prior. The argument is optional: if omitted, it defaults to 7.
- cindex
- cindex appointment reminders
- cindex reminders
- Org can interact with Emacs appointments notification facility. To add the
- appointments of your agenda files, use the command
- code{APPT_WARNTIME} property which will then override the
- value of
- node Global TODO list
- cindex global TODO list
- table
- orgcmd{C-c a t,org-todo-list}
- Show the global TODO list. This collects the TODO items from all agenda
- files (
- code{agenda-mode}, so there are commands to examine and manipulate the TODO
- entries directly from that buffer (
- orgcmd{C-c a T,org-todo-list}
- vindex org-todo-keywords
- Like the above, but allows selection of a specific TODO keyword. You can
- also do this by specifying a prefix argument to
- samp{|} as the boolean OR operator. With a numeric
- prefix, the Nth keyword in
- kindex r
- The
- kbd{3 r}. If you often need a search for a specific
- keyword, define a custom command for it (*
- Matching specific TODO keywords can also be done as part of a tags
- search (
- end table
- Remote editing of TODO items means that you can change the state of a
- TODO entry with a single key press. The commands available in the
- TODO list are described in
- cindex sublevels, inclusion into TODO list
- Normally the global TODO list simply shows all headlines with TODO
- keywords. This list can become very long. There are two ways to keep
- it more compact:
- minus
- vindex org-agenda-todo-ignore-scheduled
- vindex org-agenda-todo-ignore-timestamp
- emph{scheduled} for execution or
- have a pxref{Timestamps}) as no longer
- code{org-agenda-todo-ignore-scheduled},
- code{org-agenda-todo-ignore-timestamp} and/or
- item
- code{org-agenda-todo-list-sublevels} to get this behavior.
- node Matching tags and properties
- cindex matching, of tags
- cindex tags view
- emph{tags} (
- pxref{Properties and columns}), you can select headlines
- based on this metadata and collect them into an agenda buffer. The match
- syntax described here also applies when creating sparse trees with
- table
- orgcmd{C-c a m,org-tags-view}
- Produce a list of all headlines that match a given set of tags. The
- command prompts for a selection criterion, which is a boolean logic
- expression with tags, like
- samp{work|home} (
- pxref{Agenda dispatcher}).
- vindex org-tags-match-list-sublevels
- kbd{C-c a m}, but only select headlines that are also TODO items in a
- not-DONE state and force checking subitems (see variable
- code{org-agenda-tags-todo-honor-ignore-options}. Matching
- specific TODO keywords together with a tags match is also possible, see
- end table
- The commands available in the tags list are described in
- subsubheading Match syntax
- samp{&} for
- samp{|} for . samp{|}.
- Parentheses are not implemented. Each element in the search is either a
- tag, a regular expression matching tags, or an expression like
- samp{-}, to select
- against it, and
- code{AND} operator samp{+} or
- table
- item work
- Select headlines tagged
- item work&boss
- Select headlines tagged samp{:boss:}.
- samp{:work:}, but discard those also tagged
- item work|laptop
- Selects lines tagged samp{:laptop:}.
- samp{:laptop:} lines to be tagged also
- end table
- samp{work+}} matches headlines that contain the tag
- i{starting} with
- cindex group tags, as regular expressions
- Group tags (
- samp{:work:} is a group tag for the group
- samp{work} will search for {\(?:work\|lab\|conf\)
- samp{-work} will search for all headlines but those with
- one of the tags in the group (i.e., {\(?:work\|lab\|conf\)
- cindex TODO keyword matching, with tags search
- cindex category, require for tags/property match
- pxref{Properties and columns}) at the same
- time as matching tags. The properties may be real properties, or special
- properties that represent other metadata (
- code{TODO} represents the TODO keyword of the
- entry and the ``property''
- code{LEVEL} represents the
- level of an entry. So a search
- samp{boss} and are
- . In buffers with
- samp{LEVEL} does not count the number of stars, but
- table
- item work+TODO="WAITING"
- Select
- samp{WAITING}.
- end table
- When matching properties, a number of different operators can be used to test
- the value of a property. Here is a complex example:
- {Sarah\|Denny
- end example
- itemize
- item
- If the comparison value is a plain number, a numerical comparison is done,
- and the allowed operators are samp{=}, samp{<=},
- samp{<>}.
- item
- If the comparison value is enclosed in double-quotes
- samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
- assumed to be date/time specifications in the standard Org way, and the
- comparison will be done accordingly. Special values that will be recognized
- are code{"<today>"}, and
- code{"<+5d>"} or
- code{d}, code{m}, and
- item
- If the comparison value is enclosed
- in curly braces, a regexp match is performed, with
- samp{<>} meaning that it does not
- match.
- samp{:work:} but
- not samp{A}, a
- samp{unlimited}, an
- samp{:With:} property that is
- matched by the regular expression
- ref{Property
- inheritance}, for details.
- For backward compatibility, and also for typing speed, there is also a
- different way to test TODO states in a search. For this, terminate the
- tags/property part of the search string (which may include several terms
- connected with samp{/} and then specify a Boolean
- expression just for TODO keywords. The syntax is then similar to that for
- tags, but should be applied with care: for example, a positive selection on
- several TODO keywords cannot meaningfully be combined with boolean AND
- emph{negative selection} combined with AND can be meaningful. To
- make sure that only lines are checked that actually have any TODO keyword
- (resulting in a speed-up), use
- samp{!}. Using samp{/!} will
- not match TODO keywords in a DONE state. Examples:
- samp
- samp{work+TODO="WAITING"}
- samp{:work:}-tagged TODO lines that are neither
- samp{NEXT}
- samp{:work:}-tagged TODO lines that are either
- samp{NEXT}.
- node Timeline
- cindex timeline, single file
- emph{time-sorted view}. The main purpose of this command is
- to give an overview over events in a project.
- kbd
- kbd{C-u} prefix, all unfinished TODO entries
- (scheduled or not) are also listed under the current date.
- noindent
- The commands available in the timeline buffer are listed in
- node Search view
- cindex search view
- cindex searching, for text
- This agenda view is a general text search facility for Org mode entries.
- It is particularly useful to find notes.
- kbd
- end table
- For example, the search string
- samp{computer equipment} as a substring. If the two words are
- separated by more space or a line break, the search will still match.
- Search view can also search for specific keywords in the entry, using Boolean
- logic. The search string {8\.11[bg]
- code{computer}
- and code{ethernet}, and which are also
- not matched by the regular expression
- samp{+} is necessary to turn on
- word search, other
- code{org-search-view}.
- code{org-agenda-text-search-extra-files}.
- subsection Stuck projects
- emph{stuck} project is a project that
- has no defined next actions, so it will never show up in the TODO lists
- Org mode produces. During the review, you need to identify such
- projects and define next actions for them.
- kbd
- kindex C-c a !
- vindex org-stuck-projects
- Customize the variable
- end table
- You almost certainly will have to configure this view before it will
- work for you. The built-in default assumes that all your projects are
- level-2 headlines, and that a project is not stuck if it has at least
- one entry marked with a TODO keyword TODO or NEXT or NEXTACTION.
- Let's assume that you, in your own way of using Org mode, identify
- projects with a tag PROJECT, and that you use a TODO keyword MAYBE to
- indicate a project that should not be considered yet. Let's further
- assume that the TODO keyword DONE marks finished projects, and that NEXT
- and TODO indicate next actions. The tag SHOP indicates shopping and
- is a next action even without the NEXT tag. Finally, if the project
- contains the special word IGNORE anywhere, it should not be listed
- either. In this case you would start by identifying eligible projects
- with a tags/todo matchxref{Tag searches}.}
- lisp
- (setq org-stuck-projects
- '("+PROJECT/-MAYBE-DONE" ("NEXT" "TODO") ("@@SHOP")
- "\\<IGNORE\\>"))
- node Presentation and sorting
- cindex presentation, of agenda items
- vindex org-agenda-tags-column
- Before displaying items in an agenda view, Org mode visually prepares the
- items and sorts them. Each item occupies a single line. The line starts
- with a emph{category} (
- code{org-agenda-tags-column}. You can
- also customize the prefix using the option
- menu
- * Categories:: Not all tasks are equal
- * Time-of-day specifications:: How the agenda knows the time
- * Sorting agenda items:: The order of things
- * Filtering/limiting agenda items:: Dynamically narrow the agenda
- node Categories
- cindex category
- example
- #+CATEGORY: Thesis
- noindent
- code{:CATEGORY:} property with the
- special category you want to apply as the value.
- noindent
- You can set up icons for category by customizing the
- node Time-of-day specifications
- cindex time-of-day specification
- Org mode checks each agenda item for a time-of-day specification. The
- time can be part of the timestamp that triggered inclusion into the
- agenda, for example as in samp{<2005-05-10 Tue 19:00>}}. Time
- ranges can be specified with two timestamps, like
- w{
- samp{12:45} or a
- pxref{Weekly/daily agenda}), time
- specifications in diary entries are recognized as well.
- For agenda display, Org mode extracts the time and displays it in a
- standard 24 hour format as part of the prefix. The example times in
- the previous paragraphs would end up in the agenda like this:
- end example
- example
- 8:00...... ------------------
- 8:30-13:00 Arthur Dent lies in front of the bulldozer
- 10:00...... ------------------
- 12:00...... ------------------
- 12:45...... Ford Prefect arrives and takes Arthur to the pub
- 14:00...... ------------------
- 16:00...... ------------------
- 18:00...... ------------------
- 19:00...... The Vogon reads his poem
- 20:00...... ------------------
- 20:30-22:15 Marvin escorts the Hitchhikers to the bridge
- vindex org-agenda-use-time-grid
- code{org-agenda-use-time-grid}, and can be configured with
- node Sorting agenda items
- cindex sorting, of agenda items
- itemize
- item
- emph{schedule} for the day. After that, items remain
- grouped in categories, in the sequence given by
- pxref{Priorities}),
- which is composed of the base priority (2000 for priority
- samp{B}, and 0 for
- item
- For the TODO list, items remain in the order of categories, but within
- each category, sorting takes place according to priority
- (
- item
- For tags matches, items are not sorted at all, but just appear in the
- sequence in which they are found in the agenda files.
- vindex org-agenda-sorting-strategy
- Sorting can be customized using the variable
- pxref{Effort estimates}).
- subsection Filtering/limiting agenda items
- Agenda built-in or customized commands are statically defined. Agenda
- filters and limits provide two ways of dynamically narrowing down the list of
- agenda entries: emph{limits}. Filters only act on the
- display of the items, while limits take effect before the list of agenda
- entries is built. Filters are more often used interactively, while limits are
- mostly useful when defined as local variables within custom agenda commands.
- cindex filtering, by tag, category, top headline and effort, in agenda
- cindex category filtering, in agenda
- cindex effort filtering, in agenda
- table
- orgcmd{/,org-agenda-filter-by-tag}
- footnote{Custom commands can preset a filter by
- binding the variable
- key{SPC} will mean any tag
- at all. Pressing
- emph{do} have the tag.
- A second
- kbd{+} or
- code{org-agenda-auto-exclude-function} is set to a user-defined function,
- that function can decide which tags should be excluded from the agenda
- automatically. Once this is set, the kbd{RET}
- as a sub-option key and runs the auto exclusion logic. For example, let's
- say you use a
- code{Errand} tag for errands in town, and a
- smalllisp
- end group
- c
- kindex ]
- {
- }
- {
- table
- item
- kbd{[} and
- kbd{kbd{
- samp{+}, indicating that this search
- term
- i{must not} occur/match in the entry for it to be
- selected.
- orgcmd{<,org-agenda-filter-by-category}
- code{<} another time will remove this filter. When called
- with a prefix argument exclude the category of the item at point from the
- agenda. You can add a filter preset through the option
- orgcmd{^,org-agenda-filter-by-top-headline}
- Filter the current agenda view and only display the siblings and the parent
- headline of the one at point.
- vindex org-agenda-regexp-filter-preset
- Filter the agenda view by a regular expression: only show agenda entries
- matching the regular expression the user entered. When called with a prefix
- argument, it will filter
- code{org-agenda-category-filter-preset} (see below.)
- vindex org-agenda-effort-filter-preset
- lisp
- (setq org-global-properties
- '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00")))
- kbd{<}, kbd{=}, and then the one-digit index of an effort
- estimate in your array of allowed values, where
- code{org-sort-agenda-noeffort-is-high}.
- end table
- cindex limits, in agenda
- vindex org-agenda-max-effort
- vindex org-agenda-max-tags
- Here is a list of options that you can set, either globally, or locally in
- your custom agenda views (
- table
- item org-agenda-max-entries
- Limit the number of entries.
- item org-agenda-max-todos
- Limit the number of entries with TODO keywords.
- end table
- When set to a positive integer, each option will exclude entries from other
- categories: for example,
- code{org-agenda-max-effort}.
- One useful setup is to use
- code{NEXT} TODO keyword.
- end smalllisp
- Once you mark one of these five entry as
- table
- orgcmd{~,org-agenda-limit-interactively}
- This prompts for the type of limit to apply and its value.
- node Agenda commands
- cindex commands, in agenda buffer
- Entries in the agenda buffer are linked back to the Org file or diary
- file where they originate. You are not allowed to edit the agenda
- buffer itself, but commands are provided to show and jump to the
- original entry location, and to edit the Org files ``remotely'' from
- the agenda buffer. In this way, all information is stored only once,
- removing the risk that your agenda and note files may diverge.
- Some commands can be executed with mouse clicks on agenda lines. For
- the other commands, the cursor needs to be in the desired line.
- kbd
- cindex motion commands in agenda
- key{down} and
- orgcmd{p,org-agenda-previous-line}
- Previous line (same as kbd{C-p}).
- orgcmd{P,org-agenda-previous-item}
- Previous item: same as previous line, but only consider items.
- orgcmdkkc{
- c
- c
- key{TAB},mouse-2,org-agenda-goto}
- Go to the original location of the item in another window.
- orgcmd{
- c
- vindex org-agenda-start-with-follow-mode
- Toggle Follow mode. In Follow mode, as you move the cursor through
- the agenda buffer, the other window always shows the corresponding
- location in the Org file. The initial setting for this mode in new
- agenda buffers can be set with the variable
- c
- kbd{C-u} prefix, do not remove the
- previously used indirect buffer.
- tsubheading{Change display}
- kindex A
- c
- item o
- Delete other windows.
- orgcmdkskc{v d,d,org-agenda-day-view}
- xorgcmd{v t,org-agenda-fortnight-view}
- xorgcmd{v y,org-agenda-year-view}
- vindex org-agenda-span
- Switch to day/week/month/year view. When switching to day or week view, this
- setting becomes the default for subsequent agenda refreshes. Since month and
- year views are slow to create, they do not become the default. A numeric
- prefix argument may be used to jump directly to a specific day of the year,
- ISO week, month, or year, respectively. For example,
- kbd{9 w} to ISO week number 9. When setting day, week, or
- month view, a year may be encoded in the prefix argument as well. For
- example,
- kbd{v
- code{org-agenda-span}.
- orgcmd{f,org-agenda-later}
- Go forward in time to display the following
- code{org-agenda-current-span} days.
- orgcmd{b,org-agenda-earlier}
- Go backward in time to display earlier dates.
- orgcmd{.,org-agenda-goto-today}
- Go to today.
- orgcmd{j,org-agenda-goto-date}
- Prompt for a date and go there.
- orgcmd{J,org-agenda-clock-goto}
- Go to the currently clocked-in task
- c
- ref{Weekly/daily agenda}.
- orgcmdkskc{v l,l,org-agenda-log-mode}
- vindex org-log-done
- code{org-log-done}) are shown in the agenda, as are
- entries that have been clocked on that day. You can configure the entry
- types that should be included in log mode using the variable
- kbd{C-u} prefix, show
- all possible logbook entries, including state changes. When called with two
- prefix arguments
- kbd{v L} is equivalent to
- c
- c
- xorgcmd{v A,org-agenda-archives-mode 'files}
- code{ARCHIVED} are also scanned when producing the agenda. When you use the
- capital
- kbd{v a} again.
- orgcmdkskc{v R,R,org-agenda-clockreport-mode}
- vindex org-clock-report-include-clocking-task
- Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will
- always show a table with the clocked times for the time span and file scope
- covered by the current agenda view. The initial setting for this mode in new
- agenda buffers can be set with the variable
- kbd{C-u R}), the clock table will not show
- contributions from entries that are hidden by agenda filtering
- code{org-clock-report-include-clocking-task}.
- orgkey{v c}
- code{org-agenda-clock-consistency-checks} for
- information on how to customize the definition of what constituted a clocking
- problem. To return to normal agenda display, press
- c
- vindex org-agenda-start-with-entry-text-mode
- code{org-agenda-entry-text-maxlines}. Calling this command with a numeric
- prefix argument will temporarily modify that number to the prefix value.
- orgcmd{G,org-agenda-toggle-time-grid}
- vindex org-agenda-time-grid
- Toggle the time grid on and off. See also the variables
- code{org-agenda-time-grid}.
- orgcmd{r,org-agenda-redo}
- Recreate the agenda buffer, for example to reflect the changes after
- modification of the timestamps of items with key{left}} and
- key{right}}. When the buffer is the global TODO list, a prefix
- argument is interpreted to create a selective list for a specific TODO
- keyword.
- kbd{r}.
- orgcmdkskc{C-x C-s,s,org-save-all-org-buffers}
- Save all Org buffers in the current Emacs session, and also the locations of
- IDs.
- orgcmd{C-c C-x C-c,org-agenda-columns}
- pxref{Column view}) in the agenda buffer. The column
- view format is taken from the entry at point, or (if there is no entry at
- point), from the first entry in the agenda view. So whatever the format for
- that entry would be in the original buffer (taken from a property, from a
- code{org-columns-default-format}), will be used in the agenda.
- pxref{Agenda files}).
- pxref{Filtering/limiting
- agenda items}.
- vindex org-agenda-tag-filter-preset
- Filter the agenda view with respect to a tag and/or effort estimates.
- vindex org-agenda-category-filter-preset
- Filter the current agenda view with respect to the category of the item at
- point. Pressing
- orgcmd{^,org-agenda-filter-by-top-headline}
- Filter the current agenda view and only display the siblings and the parent
- headline of the one at point.
- vindex org-agenda-regexp-filter-preset
- Filter the agenda view by a regular expression: only show agenda entries
- matching the regular expression the user entered. When called with a prefix
- argument, it will filter
- code{org-agenda-category-filter-preset} (see below.)
- tsubheading{Remote editing}
- item 0--9
- Digit argument.
- cindex undoing remote-editing events
- orgcmd{C-_,org-agenda-undo}
- Undo a change due to a remote editing command. The change is undone
- both in the agenda buffer and in the remote buffer.
- orgcmd{t,org-agenda-todo}
- Change the TODO state of the item, both in the agenda and in the
- original org file.
- orgcmd{C-S-
- orgcmd{C-S-
- c
- vindex org-agenda-confirm-kill
- Delete the current agenda item along with the entire subtree belonging
- to it in the original Org file. If the text to be deleted remotely
- is longer than one line, the kill needs to be confirmed by the user. See
- variable
- c
- c
- vindex org-archive-default-command
- Archive the subtree corresponding to the entry at point using the default
- archiving command set in
- code{a} key, confirmation will be required.
- orgcmd{C-c C-x a,org-agenda-toggle-archive-tag}
- Toggle the ARCHIVE tag for the current headline.
- orgcmd{C-c C-x A,org-agenda-archive-to-archive-sibling}
- Move the subtree corresponding to the current entry to its
- c
- c
- vindex org-agenda-show-inherited-tags
- Show all tags associated with the current item. This is useful if you have
- turned off
- c
- c
- item ,
- Set the priority for the current item (
- key{SPC},
- the priority cookie is removed from the entry.
- orgcmd{P,org-agenda-show-priority}
- Display weighted priority of current item.
- orgcmdkkc{+,S-
- kbd{r}
- key for this.
- orgcmdkkc{-,S-
- c
- vindex org-log-into-drawer
- Add a note to the entry. This note will be recorded, and then filed to the
- same location where state change notes are put. Depending on
- c
- c
- c
- c
- key{right},org-agenda-do-date-later}
- Change the timestamp associated with the current line by one day into the
- future. If the date is in the past, the first call to this command will move
- it to today.
- kbd{3 6 5 S-kbd{C-u} prefix,
- change the time by one hour. If you immediately repeat the command, it will
- continue to change hours even without the prefix arg. With a double
- *
- The stamp is changed in the original Org file, but the change is not directly
- reflected in the agenda buffer. Use kbd{g} to update the buffer.
- orgcmd{S-
- c
- kbd{>} has
- been chosen, because it is the same as
- c
- c
- c
- c
- c
- code{org-capture}, but use the date at point as the default date for
- the capture template. See
- code{org-capture}.
- vindex org-capture-use-agenda-date
- cindex dragging, agenda lines
- footnote{Moving agenda lines does
- not persist after an agenda refresh and does not modify the contributing
- orgcmd{M-<down>,org-agenda-drag-line-forward}
- Drag the line at point forward one line. With a numeric prefix argument,
- drag forward by that many lines.
- cindex remote editing, bulk, from agenda
- orgcmd{m,org-agenda-bulk-mark}
- Mark the entry at point for bulk action. With numeric prefix argument, mark
- that many successive entries.
- orgcmd{*,org-agenda-bulk-mark-all}
- Mark all visible agenda entries for bulk action.
- orgcmd{u,org-agenda-bulk-unmark}
- Unmark entry at point for bulk action.
- orgcmd{U,org-agenda-bulk-remove-all-marks}
- Unmark all marked entries for bulk action.
- orgcmd{M-m,org-agenda-bulk-toggle}
- Toggle mark of the entry at point for bulk action.
- orgcmd{M-*,org-agenda-bulk-toggle-all}
- Toggle marks of all visible entries for bulk action.
- orgcmd{%,org-agenda-bulk-mark-regexp}
- Mark entries matching a regular expression for bulk action.
- orgcmd{B,org-agenda-bulk-action}
- Bulk action: act on all marked entries in the agenda. This will prompt for
- another key to select the action to be applied. The prefix arg to
- kbd{s} and
- code{org-agenda-persistent-marks} to
- kbd{p} at the prompt.
- kbd
- item $
- Archive all selected entries.
- item t
- Change TODO state. This prompts for a single TODO keyword and changes the
- state of all selected entries, bypassing blocking and suppressing logging
- notes (but not timestamps).
- item -
- Remove a tag from all selected entries.
- samp{++8d} or
- item d
- Set deadline to a specific date.
- kbd{g}) to bring them back.
- kbd{C-u B S}), scatter only across weekdays.
- footnote{You can also create persistent custom functions
- through
- lisp
- end group
- end table
- cindex calendar commands, from agenda
- c
- c
- orgcmd{i,org-agenda-diary-entry}
- footnote{This file is parsed for the agenda when
- kbd{i}
- command in the calendar. The diary file will pop up in another window, where
- you can add the entry.
- If you configure
- code{DATE_TREE} property, or else with years as
- top-level entries. Emacs will prompt you for the entry text---if you specify
- it, the entry will be created in
- key{RET} at the prompt without typing
- text, the target file will be shown in another window for you to finish the
- entry there. See also the
- c
- c
- c
- c
- item M-x org-icalendar-combine-agenda-files RET
- Export a single iCalendar file containing entries from all agenda files.
- This is a globally available command, and also available in the agenda menu.
- orgcmd{C-x C-w,org-agenda-write}
- cindex agenda views, exporting
- file{.html} or
- file{.ps}), PDF (file{.org}) and plain text
- (any other extension). When exporting to Org, only the body of original
- headlines are exported, not subtrees or inherited tags. When called with a
- code{org-agenda-exporter-settings} to set options for
- file{htmlize} to be used during export.
- orgcmd{q,org-agenda-quit}
- Quit agenda, remove the agenda buffer.
- cindex agenda files, removing buffers
- end table
- section Custom agenda views
- cindex agenda views, custom
- Custom agenda commands serve two purposes: to store and quickly access
- frequently used TODO and tags searches, and to create special composite
- agenda buffers. Custom agenda commands will be accessible through the
- dispatcher (
- menu
- * Storing searches:: Type once, use often
- * Block agenda:: All the stuff you need in a single buffer
- * Setting options:: Changing the rules
- node Storing searches
- kindex C-c a C
- cindex agenda views, main example
- cindex agenda*, as an agenda views
- cindex todo, as an agenda view
- cindex todo-tree
- cindex tags-tree
- Custom commands are configured in the variable
- kbd{C-c a C}. You can also directly set it with Emacs
- Lisp in the Emacs init file. The following example contains all valid agenda
- views:
- group
- (setq org-agenda-custom-commands
- '(("x" agenda)
- ("y" agenda*)
- ("w" todo "WAITING")
- ("W" todo-tree "WAITING")
- ("u" tags "+boss-urgent")
- ("v" tags-todo "+boss-urgent")
- ("U" tags-tree "+boss-urgent")
- ("f" occur-tree "\\<FIXME\\>")
- ("h" . "HOME+Name tags searches") ; description for "h" prefix
- ("hl" tags "+home+Lisa")
- ("hp" tags "+home+Peter")
- ("hk" tags "+home+Kim")))
- end lisp
- kbd{C-c a} in order to access the command.
- Usually this will be just a single character, but if you have many
- similar commands, you can also define two-letter combinations where the
- first character is the same in several combinations and serves as a
- prefix key
- table
- item C-c a x
- as a global search for agenda entries plannedemph{Planned} means
- here that these entries have some planning information attached to them, like
- a time-stamp, a scheduled or a deadline string. See
- item C-c a y
- as a global search for agenda entries planned this week/day, but only those
- with an hour specification like
- item C-c a w
- as a global search for TODO entries with
- item C-c a W
- as the same search, but only in the current buffer and displaying the
- results as a sparse tree
- samp{:boss:} but not
- item C-c a v
- as the same search as
- item C-c a U
- as the same search as
- item C-c a f
- to create a sparse tree (again: current buffer only) with all entries
- containing the word
- item C-c a h
- as a prefix command for a HOME tags search where you have to press an
- additional key (kbd{p} or
- end table
- Note that the
- node Block agenda
- cindex block agenda
- emph{several} commands, each of which creates a block in
- the agenda buffer. The available commands include
- kbd{C-c a a}),
- kbd{C-c a t}), and the
- matching commands discussed above: code{tags}, and
- lisp
- end group
- noindent
- This will define
- samp{home}, and also all lines tagged with
- kbd{C-c a o} provides a similar view for office tasks.
- subsection Setting options for custom commands
- vindex org-agenda-custom-commands
- Org mode contains a number of variables regulating agenda construction
- and display. The global variables define the behavior for all agenda
- commands, including the custom commands. However, if you want to change
- some settings just for a single custom view, you can do so. Setting
- options requires inserting a list of variable names and values at the
- right spot in
- lisp
- end group
- noindent
- Now the
- samp{ Mixed: }
- instead of giving the category of the entry. The sparse tags tree of
- kbd{C-c a N} will do a text search limited
- to only a single file.
- code{org-agenda-custom-commands} has two separate spots for setting
- options. You can add options that should be valid for just a single
- command in the set, and options that should be valid for all commands in
- the set. The former are just added to the command entry; the latter
- must come after the list of command entries. Going back to the block
- agenda example (
- kbd{C-c a h} commands to
- code{priority-up}. This would look like this:
- group
- (setq org-agenda-custom-commands
- '(("h" "Agenda and Home-related tasks"
- ((agenda)
- (tags-todo "home")
- (tags "garden"
- ((org-agenda-sorting-strategy '(priority-up)))))
- ((org-agenda-sorting-strategy '(priority-down))))
- ("o" "Agenda and Office-related tasks"
- ((agenda)
- (tags-todo "work")
- (tags "office")))))
- end lisp
- As you see, the values and parentheses setting is a little complex.
- When in doubt, use the customize interface to set this variable---it
- fully supports its structure. Just one caveat: when setting options in
- this interface, the
- vindex org-agenda-custom-commands-contexts
- To control whether an agenda command should be accessible from a specific
- context, you can customize
- code{"o"} displaying a view
- that you only need when reading emails. Then you would configure this option
- like this:
- end lisp
- You can also tell that the command key
- code{"r"}. In that case, add this command key like this:
- end lisp
- See the docstring of the variable for more information.
- section Exporting agenda views
- footnote{You need to install Hrvoje Niksic's
- footnote{To create PDF output, the
- ghostscript
- table
- orgcmd{C-x C-w,org-agenda-write}
- cindex agenda views, exporting
- file{.html} or
- file{.ps}), iCalendar (extension
- code{org-agenda-exporter-settings} to set options for
- file{htmlize} to be used during export, for example
- vindex htmlize-output-type
- vindex ps-landscape-mode
- end lisp
- footnote{If you want to store standard views like the weekly agenda
- or the global TODO list as well, you need to define custom commands for
- them in order to be able to specify file names.}. Here is an example
- that first defines custom commands for the agenda and the global
- TODO list, together with a number of files to which to export them.
- Then we define two block agenda commands and specify file names for them
- as well. File names can be relative to the current working directory,
- or absolute.
- group
- (setq org-agenda-custom-commands
- '(("X" agenda "" nil ("agenda.html" "agenda.ps"))
- ("Y" alltodo "" nil ("todo.html" "todo.txt" "todo.ps"))
- ("h" "Agenda and Home-related tasks"
- ((agenda "")
- (tags-todo "home")
- (tags "garden"))
- nil
- ("~/views/home.html"))
- ("o" "Agenda and Office-related tasks"
- ((agenda)
- (tags-todo "work")
- (tags "office"))
- nil
- ("~/views/office.ps" "~/calendars/office.ics"))))
- end lisp
- The extension of the file name determines the type of export. If it is
- file{htmlize.el} package to convert
- the buffer to HTML and save it to this file name. If the extension is
- code{ps-print-buffer-with-faces} is used to produce
- Postscript output. If the extension is
- emph{not} created when you use one of those
- commands interactively because this might use too much overhead.
- Instead, there is a special command to produce
- table
- orgcmd{C-c a e,org-store-agenda-views}
- Export all agenda views that have export file names associated with
- them.
- lisp
- (setq org-agenda-custom-commands
- '(("X" agenda ""
- ((ps-number-of-columns 2)
- (ps-landscape-mode t)
- (org-agenda-prefix-format " [ ] ")
- (org-agenda-with-colors nil)
- (org-agenda-remove-tags t))
- ("theagenda.ps"))))
- noindent
- This command sets two options for the Postscript exporter, to make it
- print in two columns in landscape format---the resulting page can be cut
- in two and then used in a paper agenda. The remaining settings modify
- the agenda prefix to omit category and scheduling information, and
- instead include a checkbox to check off items. We also remove the tags
- to make the lines compact, and we don't want to use colors for the
- black-and-white printer. Settings specified in
- code{org-agenda-custom-commands} take precedence.
- example
- emacs -eval (org-batch-store-agenda-views) -kill
- noindent
- or, if you need to modify some parameters
- example
- emacs -eval '(org-batch-store-agenda-views \
- org-agenda-span (quote month) \
- org-agenda-start-day "2007-11-01" \
- org-agenda-include-diary nil \
- org-agenda-files (quote ("~/org/project.org")))' \
- -kill
- noindent
- which will create the agenda views restricted to the file
- ref{Extracting agenda information}, for
- more information.
- section Using column view in the agenda
- cindex agenda, column view
- Column view (
- table
- orgcmd{C-c C-x C-c,org-agenda-columns}
- Turn on column view in the agenda.
- enumerate
- vindex org-columns-default-format
- code{COLUMNS} format to use. Since the
- entries in the agenda are collected from different files, and different files
- may have different
- code{org-agenda-overriding-columns-format} is
- currently set, and if so, takes the format from there. Otherwise it takes
- the format associated with the first item in the agenda, or, if that item
- does not have a specific format (defined in a property, or in its file), it
- uses
- item
- pxref{Column attributes}),
- turning on column view in the agenda will visit all relevant agenda files and
- make sure that the computations of this property are up to date. This is
- also true for the special
- emph{twice} (for
- example as scheduled and as a deadline), and it may show two entries from the
- same hierarchy (for example a emph{child}). In these
- cases, the summation in the agenda will lead to incorrect results because
- some values will count double.
- code{CLOCKSUM}, that is always
- the entire clocked time for this item. So even in the daily/weekly agenda,
- the clocksum listed in column view may originate from times outside the
- current view. This has the advantage that you can compare these values with
- a column listing the planned total effort for a task---one of the major
- applications for column view in the agenda. If you want information about
- clocked time in the displayed period use clock table mode (press
- item
- code{CLOCKSUM_T}, that is
- always today's clocked time for this item. So even in the weekly agenda,
- the clocksum listed in column view only originates from today. This lets
- you compare the time you spent on a task for today, with the time already
- spent (via
- end enumerate
- chapter Markup for rich export
- When exporting Org mode documents, the exporter tries to reflect the
- structure of the document as accurately as possible in the back-end. Since
- export targets like HTML and
- menu
- * Paragraphs:: The basic unit of text
- * Emphasis and monospace:: Bold, italic, etc.
- * Horizontal rules:: Make a line
- * Images and tables:: Images, tables and caption mechanism
- * Literal examples:: Source code examples with special formatting
- * Special symbols:: Greek letters and other symbols
- * Subscripts and superscripts:: Simple syntax for raising/lowering text
- * Embedded
- end menu
- section Paragraphs, line breaks, and quoting
- samp{\\} at the end of a line.
- To preserve the line breaks, indentation and blank lines in a region, but
- otherwise use normal formatting, you can use this construct, which can also
- be used to format poetry.
- cindex verse blocks
- end example
- When quoting a passage from another document, it is customary to format this
- as a paragraph that is indented on both the left and the right margin. You
- can include quotations in Org mode documents like this:
- cindex quote blocks
- end example
- If you would like to center some text, do it like this:
- cindex center blocks
- end example
- section Emphasis and monospace
- cindex bold text, markup rules
- cindex verbatim text, markup rules
- cindex strike-through text, markup rules
- vindex org-emphasis-regexp-components
- b{*bold*}, code{=verbatim=}
- and samp{+strike-through+}. Text
- in the code and verbatim string is not processed for Org mode specific
- syntax, it is exported verbatim.
- To turn off fontification for marked up text, you can set
- code{nil}. To narrow down the list of
- available markup syntax, you can customize
- code{org-emphasis-regexp-components}. Beware that changing one of
- the above variables will no take effect until you reload Org, for which you
- may need to restart Emacs.
- section Horizontal rules
- node Images and tables
- cindex tables, markup rules
- cindex #+NAME
- Both the native Org mode tables (
- file{table.el} package will be exported properly. For Org mode tables,
- the lines before the first horizontal separator line will become table header
- lines. You can use the following lines somewhere before the table to assign
- a caption and a label for cross references, and in the text you can refer to
- the object with pxref{Internal links}):
- end example
- Optionally, the caption can take the form:
- end example
- code{[[./img/a.jpg]]}. If you wish to
- define a caption for the image and maybe a label for internal cross
- references, make sure that the link is on a line by itself and precede it
- with code{#+NAME} as follows:
- end example
- xref{Handling links,the
- discussion of image links}.
- Even though images and tables are prominent examples of captioned structures,
- the same caption mechanism can apply to many others (e.g.,
- node Literal examples
- cindex literal examples, markup rules
- cindex #+BEGIN_EXAMPLE
- end example
- Note that such blocks may be
- pxref{Plain
- lists}). For simplicity when using small examples, you can also start the
- example lines with a colon followed by a space. There may also be additional
- whitespace before the colon:
- end example
- vindex org-latex-listings
- If the example is source code from a programming language, or any other text
- that can be marked up by font-lock in Emacs, you can ask for the example to
- look like the fontified Emacs buffer
- file{htmlize.el} package,
- which is distributed with Org). Fontified code chunks in
- url{https://www.ctan.org/tex-archive/macros/latex/contrib/listings/?lang=en, listings,}
- or the
- code{org-latex-packages-alist}. Refer to
- samp{src} block, where you also need
- to specify the name of the major mode that should be used to fontify the
- examplesamp{src} blocks may also be evaluated either
- interactively or on export.
- ref{Easy templates} for
- shortcuts to easily insert code blocks.
- example
- #+BEGIN_SRC emacs-lisp
- (defun org-xor (a b)
- "Exclusive or."
- (if a (not b) b))
- #+END_SRC
- code{example} and in code{-n}
- switch to the end of the
- code{-n} takes an optional numeric argument specifying the
- starting line number of the block. If you use a
- code{+n} can also take a numeric argument. The value of the
- argument will be added to the last line of the previous block to determine
- the starting line number.
- end example
- In literal examples, Org will interpret strings like
- code{[[(name)]]}
- (i.e., the reference name enclosed in single parenthesis). In HTML, hovering
- the mouse over such a link will remote-highlight the corresponding code line,
- which is kind of cool.
- You can also add a i{removes} the labels from the
- source codecode{-k} to i{keep} the
- labels in the source code while using line numbers for the links, which might
- be useful to explain those in an Org mode example code.}. With the
- example
- #+BEGIN_SRC emacs-lisp -n -r
- (save-excursion (ref:sc)
- (goto-char (point-min))) (ref:jump)
- #+END_SRC
- In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]]
- jumps to point-min.
- cindex indentation, in source blocks
- Finally, you can use
- pxref{Editing source code}).
- code{-l} switch to change the format, for example
- code{org-coderef-label-format}.
- HTML export also allows examples to be published as text areas (
- code{#+BEGIN_...} and
- pxref{Easy templates}).
- kbd
- item C-c '
- Edit the source code example at point in its native mode. This works by
- switching to a temporary buffer with the source code. You need to exit by
- pressing footnote{Upon exit, lines starting with
- samp{,*}, samp{,#+} will get a comma prepended, to keep them
- from being interpreted by Org as outline nodes or special syntax. These
- commas will be stripped for editing with
- code{artist-mode}
- code{org-edit-fixed-width-region-mode}.}
- to allow creating ASCII drawings easily. Using this command in an empty line
- will create a new fixed-width region.
- item C-c l
- Calling
- kbd{C-c '} will prompt for a label. Make sure
- that it is unique in the current buffer, and insert it with the proper
- formatting like
- samp{(label)}, for retrieval with
- end table
- section Special symbols
- cindex math symbols
- cindex HTML entities
- LaTeX{} entities
- You can use
- samp{\alpha} to indicate the Greek letter, or
- samp{\} and maybe a few letters, and press key{TAB}} to see possible
- completions. If you need such a symbol inside a word, terminate it with
- a pair of curly brackets. For example
- {
- end example
- vindex org-entities-user
- A large number of entities is provided, with names taken from both HTML and
- code{org-entities-help}. It is also possible to
- provide your own special symbols in the variable
- code{\alpha} are exported as
- code{\(\alpha\)} in the
- code{\nbsp} becomes code{~} in
- cindex escaping characters
- Entities may also be used as a may to escape markup in an Org document, e.g.,
- {samp{_not underlined_}.
- footnote{You can turn this on by default by setting the
- variable
- code{#+STARTUP} option
- table
- cindex
- kindex C-c C-x \
- end table
- cindex dash, special symbol
- footnote{This behaviour can be disabled with
- pxref{Export settings}).} the following commonly used character
- combinations: samp{--} and
- samp{...} becomes a compact set of dots.
- section Subscripts and superscripts
- cindex superscript
- samp{_} are used to indicate super- and subscripts. To
- increase the readability of ASCII text, it is not necessary---but OK---to
- surround multi-character sub- and superscripts with curly braces. Those are,
- however, mandatory, when more than one word is involved. For example
- {Alpha Centauri{sun
- end example
- code{org-use-sub-superscripts} to change
- this convention. For example, when setting this variable to {
- samp{a_b} will not be interpreted as a subscript, but {b
- table
- kindex C-c C-x \
- end table
- LaTeX{}
- LaTeX{}
- TeX{} interpretation
- LaTeX{} interpretation
- Plain ASCII is normally sufficient for almost all note taking. Exceptions
- include scientific notes, which often require mathematical symbols and the
- occasional formula. footnote{
- TeX{} system. Many of the features described here as
- ``TeX{}, but for simplicity I am blurring this
- distinction.} is widely used to typeset scientific documents. Org mode
- supports embedding
- LaTeX{} source code, and because it can be
- readily processed to produce pretty output for a number of export back-ends.
- LaTeX{} fragments:: Complex formulas made easy
- * Previewing
- end menu
- LaTeX{} fragments
- LaTeX{} fragments
- LaTeX{} fragments
- LaTeX{} math fragments, and it supports ways to process
- these for several export back-ends. When exporting to
- uref{http://www.mathjax.org, MathJax} (
- pxref{Previewing
- LaTeX{} fragments don't need any special marking at all. The following
- snippets will be identified as
- itemize
- item
- Environments of any kind
- file{dvipng} program, file{imagemagick} suite is
- used to create images, any
- code{\begin} statement appears on a new line, at the
- beginning of the line or after whitespaces only.
- LaTeX{} math delimiters. To avoid conflicts with
- currency specifications, single
- samp{$} characters with no whitespace in between,
- and if the closing
- samp{\(...\)} as inline math delimiters.
- noindent For example:
- {equation
- {b
- {equation
- {2{2
- end example
- c
- c
- c If you need any of the delimiter ASCII sequences for other purposes, you
- code{org-format-latex-options} to deselect the
- LaTeX{} converter.
- LaTeX{} processing can be configured with the variable
- code{t} which means
- MathJax for HTML, and no processing for ASCII and
- example
- #+OPTIONS: tex:t
- r{Do not process
- r{Verbatim export, for jsMath or so}
- node Previewing
- subsection Previewing
- cindex
- vindex org-preview-latex-default-process
- If you have a working file{dvipng},
- file{convert} installed
- url{http://sourceforge.net/projects/dvipng/},
- file{imagemagick} suite. Choose the converter by setting the
- variable LaTeX{}
- fragments can be processed to produce images of the typeset expressions to be
- used for inclusion while exporting to HTML (see LaTeX{} fragments}),
- or for inline previewing within Org mode.
- vindex org-format-latex-header
- You can customize the variables
- code{org-format-latex-header} to influence some aspects of the preview. In
- particular, the code{:html-scale})
- property of the former can be used to adjust the size of the preview images.
- kbd
- item C-c C-x C-l
- Produce a preview image of the
- kindex C-c C-c
- end table
- LaTeX{} fragments in a file with
- end example
- To disable it, simply use
- end example
- subsection Using CD
- cindex CD
- LaTeX{} mode is a minor mode that is normally used in combination with a
- major TeX{} in order to speed-up insertion of
- environments and math templates. Inside Org mode, you can make use of
- some of the features of CD
- file{cdlatex.el} and
- TeX{}) from
- LaTeX{} mode itself under Org mode, but use the light
- version
- kbd{M-x org-cdlatex-mode RET}, or for all
- Org files with
- end lisp
- When this mode is enabled, the following features are present (for more
- details see the documentation of CD
- itemize
- kindex C-c
- item
- Environment templates can be inserted with {}.
- kindex
- key{TAB} key will do template expansion if the cursor is inside a
- footnote{Org mode has a method to test if the cursor is
- inside such a fragment, see the documentation of the function
- key{TAB} will
- expand code{\frac}}} and position the cursor
- correctly inside the first brace. Another
- key{TAB} will expand
- environment abbreviations at the beginning of a line. For example, if
- you write key{TAB},
- this abbreviation will be expanded to an
- kbd{M-x cdlatex-command-help RET}.
- kindex _
- vindex cdlatex-simplify-sub-super-scripts
- Pressing kbd{^} inside a
- key{TAB} to move
- out of the braces, and if the braces surround only a single character or
- macro, they are removed again (depending on the variable
- item
- kbd{`} followed by a character inserts math
- macros, also outside
- item
- kbd{'} followed by another character modifies
- the symbol before point with an accent or a font. If you wait more than
- 1.5 seconds after the apostrophe, a help window will pop up. Character
- modification will work only inside
- end itemize
- chapter Exporting
- pxref{Document structure}) and
- markup (
- cindex export back-end
- Libraries responsible for such translation are called back-ends. Org ships
- with the following ones
- item ascii (ASCII format)
- LaTeX{} Beamer format)
- item icalendar (iCalendar format)
- LaTeX{} format)
- item odt (OpenDocument Text format)
- item texinfo (Texinfo format)
- end itemize
- code{contrib/} directory
- (footnote{These
- libraries traditionnaly appear as file{ox-koma-letter}
- for
- vindex org-export-backends
- By default, the following five back-ends are loaded:
- code{html}, code{latex} and
- code{org-export-backends}, or
- by requiring the associated library, e.g.,
- end lisp
- Eventually, you can these facilities can be used with
- code{orgstruct-mode} in foreign buffers so you can author tables and lists
- in Org syntax and convert them in place to the target language.
- LaTeX{} export:: Exporting to
- end menu
- section The export dispatcher
- cindex Export, dispatcher
- The main entry point for export related tasks is the dispatcher, a
- hierarchical menu from which it is possible to select an export format and
- toggle export options
- code{org-export-dispatch-use-expert-ui} to a
- non-
- key{?}.}.
- asis
- kbd{C-u}
- prefix argument, repeat the last export command on the current buffer while
- preserving toggled options. If the current buffer hasn't changed and subtree
- export was activated, the command will affect that same subtree.
- pxref{Export settings}) can be toggled from the
- export dispatcher with the following key combinations:
- kbd
- vindex org-export-async-init-file
- Toggle asynchronous export. Asynchronous export uses an external Emacs
- process that is configured with a specified initialization file.
- While exporting asynchronously, the output is not displayed, but stored in
- a place called ``the export stack''. This stack can be displayed by calling
- the dispatcher with a double kbd{&} key
- from the dispatcher menu.
- code{org-export-in-background}.
- code{<head>...</head>}
- in the HTML back-end), a body-only export will not include this header.
- vindex org-export-initial-scope
- Toggle subtree export. The top heading becomes the document title.
- You can change the default state of this option by setting
- item C-v
- Toggle visible-only export. Only export the text that is currently
- visible, i.e., not hidden by outline visibility in the buffer.
- node Export settings
- cindex Export, settings
- pxref{In-buffer
- settings}), by setting individual keywords, or by specifying them in a
- compact form with the
- pxref{Properties and columns}). Options set at a specific level
- override options set at a more general level.
- samp{#+SETUPFILE: filename} syntax.
- Option keyword sets tailored to a particular back-end can be inserted from
- the export dispatcher (code{Insert
- template} command by pressing
- code{#+} and then
- to use
- table
- item AUTHOR
- vindex user-full-name
- The document author (
- item CREATOR
- vindex org-export-creator-string
- Entity responsible for output generation (
- item DATE
- vindex org-export-date-timestamp-format
- A date or a time-stamp
- code{org-export-date-timestamp-format} defines how this time-stamp will be
- exported.}.
- cindex #+EMAIL
- code{user-mail-address}).
- cindex #+LANGUAGE
- code{org-export-default-language}). E.g.,
- emph{File} (english) into
- item SELECT_TAGS
- vindex org-export-select-tags
- The tags that select a tree for export (
- code{:export:}. Within a subtree tagged with
- code{:noexport:} (see
- below). When headlines are selectively exported with
- item EXCLUDE_TAGS
- vindex org-export-exclude-tags
- The tags that exclude a tree from export (
- code{:noexport:}. Entries with the
- code{:export:} tag. Code blocks contained in excluded subtrees will still
- be executed during export even though the subtree is not exported.
- cindex #+TITLE
- item EXPORT_FILE_NAME
- end table
- The footnote{If you want to configure
- many options this way, you can use several
- table
- item ':
- code{org-export-with-smart-quotes}). When activated,
- pairs of double quotes become primary quotes according to the language used.
- Inside, pairs of single quotes become secondary quotes. Other single quotes
- are treated as apostrophes.
- code{org-export-with-emphasize}).
- vindex org-export-with-special-strings
- Toggle conversion of special strings
- (
- item ::
- code{org-export-with-fixed-width}).
- vindex org-export-with-timestamps
- Toggle inclusion of any time/date active/inactive stamps
- (
- item \n:
- code{org-export-preserve-breaks}).
- vindex org-export-with-sub-superscripts
- Toggle {
- samp{a_}} will be interpreted, but the simple
- code{org-export-with-sub-superscripts}).
- vindex org-export-with-archived-trees
- Configure export of archived trees. Can be set to
- code{org-export-with-archived-trees}).
- vindex org-export-with-author
- Toggle inclusion of author name into exported file
- (
- item broken-links:
- code{mark}, signal the problem clearly in the output
- (
- item c:
- code{org-export-with-clocks}).
- vindex org-export-with-creator
- Toggle inclusion of creator info into exported file
- (
- item d:
- code{org-export-with-drawers}).
- vindex org-export-with-date
- Toggle inclusion of a date into exported file (
- item e:
- code{org-export-with-entities}).
- vindex org-export-with-email
- Toggle inclusion of the author's e-mail into exported file
- (
- item f:
- code{org-export-with-footnotes}).
- vindex org-export-headline-levels
- Set the number of headline levels for export
- (
- item inline:
- code{org-export-with-inlinetasks}).
- vindex org-export-with-section-numbers
- code{org-export-with-section-numbers}). It can also
- be set to a number
- code{UNNUMBERED} property to
- non-
- item p:
- code{org-export-with-planning}).
- ``Planning information'' is the line containing the
- code{DEADLINE:} or the
- item pri:
- code{org-export-with-priority}).
- vindex org-export-with-properties
- Toggle inclusion of property drawers, or list properties to include
- (
- item stat:
- code{org-export-with-statistics-cookies}).
- vindex org-export-with-tags
- Toggle inclusion of tags, may also be
- code{org-export-with-tags}).
- vindex org-export-with-tasks
- Toggle inclusion of tasks (TODO items), can be
- code{todo} to remove DONE tasks, or a list of keywords to keep
- (
- item tex:
- LaTeX{} fragments and environments. It may be set to
- code{org-export-with-latex}).
- vindex org-export-time-stamp-file
- Toggle inclusion of the creation time into exported file
- (
- item title:
- code{org-export-with-title}).
- vindex org-export-with-toc
- Toggle inclusion of the table of contents, or set the level limit
- (
- item todo:
- code{org-export-with-todo-keywords}).
- vindex org-export-with-tables
- Toggle inclusion of tables (
- end table
- When exporting only a subtree, each of the previous keywords
- samp{SETUPFILE}.} can be overridden locally by special node
- properties. These begin with
- samp{EXPORT_}.
- For example, samp{EXPORT_FILE_NAME} keywords become,
- respectively, samp{EXPORT_FILE_NAME} properties.
- vindex org-export-allow-bind-keywords
- If code{nil}, Emacs variables
- can become buffer-local during export by using the BIND keyword. Its syntax
- is
- node Table of contents
- cindex table of contents
- cindex list of listings
- vindex org-export-with-toc
- The table of contents is normally inserted directly before the first headline
- of the file. The depth of the table is by default the same as the number of
- headline levels, but you can choose a smaller number, or turn off the table
- of contents entirely, by configuring the variable
- example
- #+OPTIONS: toc:2
- r{no default TOC at all}
- code{org-export-with-toc} or
- code{#+TOC: headlines N} at the desired
- location(s).
- r{no default TOC}
- ...
- #+TOC: headlines 2
- end example
- Moreover, if you append
- footnote{For
- code{titletoc} package. Note that
- emph{before}
- code{org-latex-default-packages-alist}.}. In this case, any depth
- parameter becomes relative to the current level.
- r{insert local TOC, with direct children only}
- code{TOC} keyword can also generate a list of all tables (resp.
- example
- #+TOC: listings
- r{build a list of tables}
- cindex property, ALT_TITLE
- The headline's title usually determines its corresponding entry in a table of
- contents. However, it is possible to specify an alternative title by
- setting
- node Include files
- cindex include files, during export
- During export, you can include the content of another file. For example, to
- include your
- cindex #+INCLUDE
- end example
- samp{example},
- samp{src}), and, if the markup is either samp{src}, the
- language for formatting the contents.
- If markup is requested, the included content will be placed within an
- appropriate blocksamp{verse},
- samp{center}), but this places severe restrictions on the type
- of content that is permissible}. No changes to the included content are made
- and it is the responsibility of the user to ensure that the result is valid
- Org syntax. For markup samp{src}, which is requesting a
- literal example, the content will be code-escaped before inclusion.
- If no markup is requested, the text will be assumed to be in Org mode format
- and will be processed normally. However, footnote labels (
- code{INCLUDE} keyword. In particular, headlines within the file will become
- children of the current section. That behavior can be changed by providing
- an additional keyword parameter,
- example
- #+INCLUDE: "~/my-book/chapter2.org" :minlevel 1
- code{:lines} keyword parameter. The line at the upper end of the range
- will not be included. The start and/or the end of the range may be omitted
- to use the obvious defaults.
- r{Include lines 5 to 10, 10 excluded}
- #+INCLUDE: "~/.emacs" :lines "-10"
- r{Include lines from 10 to EOF}
- code{org-link-search}
- code{org-link-search-must-match-exact-headline} is locally bound to non-
- code{org-link-search} only matches headlines and named elements.}
- (code{:only-contents} property is non-
- code{:lines} keyword
- operates locally with respect to the requested element. Some examples:
- r{Include the body of the heading with the custom id
- r{Include named element.}
- #+INCLUDE: "./paper.org::*conclusion" :lines 1-20
- samp{conclusion}.}
- table
- kindex C-c '
- end table
- section Macro replacement
- cindex #+MACRO
- code{org-export-global-macros}, or document-wise with the following syntax:
- end example
- code{{}}}
- code{#+CAPTION}, code{#+AUTHOR},
- table
- item {}}
- {{author}
- itemx {}}
- cindex author, macro
- item {}}
- {{date(}}
- code{#+DATE} keyword.
- code{{}}} macro that will be used only if
- var{FORMAT} should be a format string
- understood by
- item {var{FORMAT})}
- itemx {var{FORMAT}, }}
- cindex modification time, macro
- These macros refer to the date and time when the document is exported and to
- the modification date and time, respectively.
- code{format-time-string}. If the second
- argument to the code{nil}, Org
- retrieves the information from the version control system, using
- item {}}
- item {var{PROPERTY-NAME})}
- itemx {var{PROPERTY-NAME},}}
- var{PROPERTY-NAME} in current
- entry. If pxref{Search options}) refers to a remote
- entry, it will be used instead.
- code{org-hide-macro-markers} non-
- node Comment lines
- cindex comment lines
- cindex #+BEGIN_COMMENT
- Lines starting with zero or more whitespace characters followed by one
- samp{#+BEGIN_COMMENT}
- ...
- samp{COMMENT} keyword at the beginning of an entry, but after any
- other keyword or priority cookie, comments out the entire subtree. In this
- case, the subtree is not exported and no code block within it is executed
- either
- pxref{Export settings}) instead.}. The command below helps changing the
- comment status of a headline.
- kbd
- item C-c ;
- Toggle the
- end table
- section ASCII/Latin-1/UTF-8 export
- cindex Latin-1 export
- . Latin-1 and UTF-8 export augment the file
- with special characters and symbols available in these encodings.
- code{org-ascii-text-width}.
- code{org-ascii-links-to-notes} for details and other options.
- table
- orgcmd{C-c C-e t a/l/u,org-ascii-export-to-ascii}
- Export as an ASCII file. For an Org file,
- file{myfile.txt}. The file will be overwritten without warning.
- When the original file is
- file{myfile.txt.txt} in order to prevent data loss.
- end table
- ref{Export settings}.
- samp
- cindex #+SUBTITLE (ASCII)
- The document subtitle.
- subheading Header and sectioning structure
- In the exported version, the first three outline levels become headlines,
- defining a general document structure. Additional levels are exported as
- lists. The transition can also occur at a different level (
- subheading Quoting ASCII text
- You can insert text that will only appear when using
- cindex #+ASCII
- example
- Text ascii:and additional text within a paragraph.
- #+ASCII: Some text
- #+BEGIN_EXPORT ascii
- All lines in this block will appear only when using this back-end.
- #+END_EXPORT
- subheading ASCII specific attributes
- cindex horizontal rules, in ASCII export
- code{:width}, which
- specifies the length, in characters, of a given horizontal rule. It must be
- specified using an
- example
- #+ATTR_ASCII: :width 10
- -----
- subheading ASCII special blocks
- cindex #+BEGIN_JUSTIFYLEFT
- code{#+BEGIN_CENTER} blocks (
- example
- #+BEGIN_JUSTIFYLEFT
- It's just a jump to the left...
- #+END_JUSTIFYLEFT
- #+BEGIN_JUSTIFYRIGHT
- ...and then a step to the right.
- #+END_JUSTIFYRIGHT
- node Beamer export
- cindex Beamer export
- The emph{Beamer} allows production of high quality
- presentations using
- menu
- * Beamer export commands:: How to export Beamer documents.
- * Beamer specific export settings:: Export settings for Beamer export.
- * Sectioning Frames and Blocks in Beamer:: Blocks and sections in Beamer.
- * Beamer specific syntax:: Syntax specific to Beamer.
- * Editing support:: Helper functions for Org Beamer export.
- * A Beamer Example:: An complete Beamer example.
- node Beamer export commands
- table
- orgcmd{C-c C-e l b,org-beamer-export-to-latex}
- Export as a file{myfile.org}, the
- file{myfile.tex}. The file will be overwritten without
- warning.
- orgcmd{C-c C-e l P,org-beamer-export-to-pdf}
- Export as
- item C-c C-e l O
- Export as
- end table
- subsection Beamer specific export settings
- Beamer export introduces a number of keywords, similar to the general options
- settings described in
- table
- item BEAMER_THEME
- vindex org-beamer-theme
- The Beamer theme (
- smallexample
- #+BEAMER_THEME: Rochester [height=20pt]
- item BEAMER_FONT_THEME
- item BEAMER_INNER_THEME
- item BEAMER_OUTER_THEME
- item BEAMER_HEADER
- samp{hyperref}
- settings.
- cindex #+DESCRIPTION (Beamer)
- The document description. By default these are inserted as metadata using
- code{org-latex-hyperref-template}. Description can also be typeset as part
- of the front matter via
- code{#+DESCRIPTION} keywords if the description is is long.
- cindex #+KEYWORDS (Beamer)
- The keywords defining the contents of the document. By default these are
- inserted as metadata using
- code{org-latex-hyperref-template}. Description can also be
- typeset as part of the front matter via
- code{#+KEYWORDS} if the description is is long.
- cindex #+SUBTITLE (Beamer)
- code{org-beamer-subtitle-format}. It can also access via
- code{org-latex-title-command}.
- node Sectioning Frames and Blocks in Beamer
- itemize
- item
- code{org-beamer-frame-level} or code{OPTIONS} line
- (
- cindex property, BEAMER_ENV
- Though, if a headline in the current tree has a
- code{frame} or
- code{fullframe} is a frame with an empty (ignored) title.
- vindex org-beamer-environments-default
- code{block} environments. Special block types
- can be enforced by setting headline's footnote{If
- this property is set, the entry will also get a
- code{org-beamer-environments-default} for
- supported values and
- item
- code{BEAMER_ENV} property is set to either
- code{note}, code{againframe}, the
- headline will become, respectively, an appendix, a note (within frame or
- between frame, depending on its level), a note with its title ignored or an
- code{BEAMER_REF} property
- is mandatory in order to refer to the frame being resumed, and contents are
- ignored.
- Also, a headline with an
- code{column} environment.
- cindex property, BEAMER_ACT
- code{BEAMER_ACT} and
- footnote{The
- cindex property, BEAMER_COL
- Moreover, headlines handle the
- code{nil}
- code{columns}
- code{columns}
- value for
- node Beamer specific syntax
- LaTeX{} back-end. As such, all
- samp{#+LATEX:} or
- ref{
- code{toc:t}
- code{frame} environment. Those generated from a
- pxref{Table of contents}) are not. In that case, it is also
- possible to specify options, enclosed within square brackets.
- end example
- Beamer specific code can be inserted with the following constructs:
- cindex #+BEGIN_EXPORT beamer
- end example
- In particular, this last example can be used to add overlay specifications to
- objects whose type is among code{item},
- code{radio-target} and
- example
- A *beamer:<2->useful* feature
- cindex #+ATTR_BEAMER
- Eventually, every plain list has support for
- code{:overlay} and
- code{ATTR_BEAMER} affiliated keyword. The first one allows the use
- of a different environment, the second sets overlay specifications and
- the last one inserts optional arguments in current list environment.
- end example
- subsection Editing support
- You can turn on a special minor mode
- example
- #+STARTUP: beamer
- table
- orgcmd{C-c C-b,org-beamer-select-environment}
- In
- code{BEAMER_COL} property.
- node A Beamer Example
- example
- #+TITLE: Example Presentation
- #+AUTHOR: Carsten Dominik
- #+OPTIONS: H:2 toc:t num:t
- #+LATEX_CLASS: beamer
- #+LATEX_CLASS_OPTIONS: [presentation]
- #+BEAMER_THEME: Madrid
- #+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col) %8BEAMER_OPT(Opt)
- * This is the first structural section
- ** Frame 1
- *** Thanks to Eric Fraga :B_block:
- :PROPERTIES:
- :BEAMER_COL: 0.48
- :BEAMER_ENV: block
- :END:
- for the first viable Beamer setup in Org
- *** Thanks to everyone else :B_block:
- :PROPERTIES:
- :BEAMER_COL: 0.48
- :BEAMER_ACT: <2->
- :BEAMER_ENV: block
- :END:
- for contributing to the discussion
- **** This will be formatted as a beamer note :B_note:
- :PROPERTIES:
- :BEAMER_env: note
- :END:
- ** Frame 2 (where we will not use columns)
- *** Request
- Please test this stuff!
- node HTML export
- cindex HTML export
- Org mode contains an HTML (XHTML 1.0 strict) exporter with extensive
- HTML formatting, in ways similar to John Gruber's
- menu
- * HTML Export commands:: How to invoke HTML export
- * HTML Specific export settings:: Export settings for HTML export
- * HTML doctypes:: Org can export to various (X)HTML flavors
- * HTML preamble and postamble:: How to insert a preamble and a postamble
- * Quoting HTML tags:: Using direct HTML in Org mode
- * Links in HTML export:: How links will be interpreted and formatted
- * Tables in HTML export:: How to modify the formatting of tables
- * Images in HTML export:: How to insert figures into HTML output
- * Math formatting in HTML export:: Beautiful math also on the web
- * Text areas in HTML export:: An alternative way to show an example
- * CSS support:: Changing the appearance of the output
- * JavaScript support:: Info and Folding in a web browser
- node HTML Export commands
- table
- orgcmd{C-c C-e h h,org-html-export-to-html}
- Export as an HTML file. For an Org file
- file{myfile.html}. The file will be overwritten
- without warning.
- orgcmd{C-c C-e h H,org-html-export-as-html}
- Export to a temporary buffer. Do not create a file.
- c FIXME Exporting sublevels
- cindex headline levels, for exporting
- c defining a general document structure. Additional levels will be exported as
- c specify it with a numeric prefix argument. For example,
- example
- kbd{C-2 C-c C-e b}
- end example
- noindent
- node HTML Specific export settings
- ref{Export settings}.
- samp
- cindex #+DESCRIPTION (HTML)
- The document description. This description is inserted as a HTML meta tag.
- You can use several such keywords if the list is long.
- cindex #+HTML_DOCTYPE
- code{org-html-doctype}).
- cindex #+HTML_CONTAINER
- samp{div}, used to wrap sections and elements
- (
- item HTML_LINK_HOME
- vindex org-html-link-home
- The home link URL (
- item HTML_LINK_UP
- vindex org-html-link-up
- The up link URL (
- item HTML_MATHJAX
- vindex org-html-mathjax-options
- Options for the MathJax (
- LaTeX{} math in HTML documents.
- item HTML_HEAD
- vindex org-html-head
- Arbitrary lines appended to the end of the head of the document
- (
- item HTML_HEAD_EXTRA
- vindex org-html-head-extra
- Arbitrary lines appended to the end of the header of the document
- (
- item KEYWORDS
- item LATEX_HEADER
- LaTeX{}
- fragments to images. See
- item SUBTITLE
- samp{subtitle} CSS class.
- node HTML doctypes
- vindex org-html-doctype
- code{org-html-doctype} allows you to export to different
- (X)HTML variants. The exported HTML will be adjusted according to the syntax
- requirements of that variant. You can either set this variable to a doctype
- string directly, in which case the exporter will try to adjust the syntax
- automatically, or you can use a ready-made doctype. The ready-made options
- are:
- item
- ``html4-strict''
- item
- ``html4-frameset''
- item
- ``xhtml-transitional''
- item
- ``xhtml-11''
- item
- ``xhtml5''
- noindent See the variable
- vindex org-html-html5-fancy
- code{org-html-html5-fancy} to
- non-code{html5-fancy} item in an
- example
- #+BEGIN_aside
- Lorem ipsum
- #+END_aside
- example
- <aside>
- <p>Lorem ipsum</p>
- </aside>
- example
- #+ATTR_HTML: :controls controls :width 350
- #+BEGIN_video
- #+HTML: <source src="movie.mp4" type="video/mp4">
- #+HTML: <source src="movie.ogg" type="video/ogg">
- Your browser does not support the video tag.
- #+END_video
- example
- <video controls="controls" width="350">
- <source src="movie.mp4" type="video/mp4">
- <source src="movie.ogg" type="video/ogg">
- <p>Your browser does not support the video tag.</p>
- </video>
- vindex org-html-html5-elements
- Special blocks that do not correspond to HTML5 elements (see
- code{#+BEGIN_lederhosen} will still export to
- samp{<section>} or
- code{HTML_CONTAINER} property on the headline itself.
- subsection HTML preamble and postamble
- vindex org-html-postamble
- vindex org-html-postamble-format
- vindex org-export-creator-string
- code{org-html-preamble} is
- code{org-html-preamble-format}.
- Setting
- code{nil} will not insert any
- preamble.
- The default value for code{'auto}, which means
- that the HTML exporter will look for information about the author, the email,
- the creator and the date, and build the postamble from these values. Setting
- code{t} will insert the postamble from the
- relevant format string found in
- code{nil} will not insert any postamble.
- subsection Quoting HTML tags
- Plain samp{>} are always transformed to
- samp{>} in HTML export. If you want to include raw HTML code, which
- should only appear in HTML export, mark it with
- samp{html:<b>bold texthtml:</b>}. For more extensive HTML
- that should be copied verbatim to the exported file use either
- cindex #+BEGIN_EXPORT html
- end example
- cindex #+BEGIN_EXPORT html
- end example
- subsection Links in HTML export
- cindex internal links, in HTML export
- vindex org-html-link-org-files-as-html
- Internal links (. This
- includes automatic links created by radio targets (
- i{relative} path as the published Org file. Links to other
- code{org-html-link-org-files-as-html} to
- samp{id:} links can then be used to jump to specific
- entries across files. For information related to linking files while
- publishing them to a publishing directory see
- code{#+ATTR_HTML} line to define attributes that will be added to the
- code{<img>} tags. Here is an example that sets
- code{style} attributes for a link:
- example
- #+ATTR_HTML: :title The Org mode homepage :style color:red;
- [[http://orgmode.org]]
- node Tables in HTML export
- cindex tables, in HTML
- code{org-html-table-default-attributes}. The default setting makes tables
- without cell borders and frame. If you would like to change this for
- individual tables, place something like the following before the table:
- cindex #+ATTR_HTML
- end example
- You can also group columns in the HTML output (
- table
- vindex org-html-table-align-individual-fields
- code{nil} means attach style attributes for alignment to each table field.
- item org-html-table-caption-above
- When non-
- vindex org-html-table-data-tags
- vindex org-html-table-default-attributes
- vindex org-html-table-header-tags
- vindex org-html-table-row-tags
- vindex org-html-table-use-header-tags-for-first-column
- code{nil} means format column one in tables with header tags.
- node Images in HTML export
- cindex images, inline in HTML
- vindex org-html-inline-images
- HTML export can inline images given as links in the Org file, and
- it can make an image the clickable part of a link. By
- default
- code{org-html-inline-images}.}, images are inlined if a link does
- not have a description. So
- samp{[[file:myimg.jpg][the image]]} will just produce a link
- code{file:} link or a
- example
- [[file:highres.jpg][file:thumb.jpg]]
- code{#+ATTR_HTML}.
- In the example below we specify the code{title} attributes to
- support text viewers and accessibility, and align it to the right.
- cindex #+ATTR_HTML
- end example
- code{http} addresses just as well.
- subsection Math formatting in HTML export
- cindex dvipng
- cindex imagemagick
- pxref{
- uref{http://www.mathjax.org, MathJax} which should work out of the box with
- Org
- uref{http://docs.mathjax.org/en/latest/start.html#using-the-mathjax-content-delivery-network-cdn,
- MathJax.org}. A link to the terms of service of the MathJax CDN can be found
- in the docstring of
- code{org-html-mathjax-options}, or in the
- buffer. For example, with the following settings,
- end smallexample
- equation labels will be displayed on the left marign and equations will be
- five ems from the left margin.
- code{org-html-mathjax-options} for all supported variables. The MathJax
- template can be configure via
- LaTeX{} fragments are processed
- into small images that will be inserted into the browser page. Before the
- availability of MathJax, this was the default method for Org files. This
- method requires that the file{dvisvgm} or
- example
- #+OPTIONS: tex:dvipng
- example
- #+OPTIONS: tex:dvisvgm
- example
- #+OPTIONS: tex:imagemagick
- node Text areas in HTML export
- cindex text areas, in HTML
- An alternative way to publish literal code examples in HTML is to use text
- areas, where the example can even be edited before pasting it into an
- application. It is triggered by
- code{example} or
- code{:height} and
- example
- #+ATTR_HTML: :textarea t :width 40
- #+BEGIN_EXAMPLE
- (defun org-xor (a b)
- "Exclusive or."
- (if a (not b) b))
- #+END_EXAMPLE
- node CSS support
- cindex CSS, for HTML export
- vindex org-html-todo-kwd-class-prefix
- footnote{If the classes on
- TODO keywords and tags lead to conflicts, use the variables
- code{org-html-tag-class-prefix} to
- make them unique.} to appropriate parts of the document---your style
- specifications may change these, in addition to any of the standard classes
- like for headlines, tables, etc.
- r{author information, including email}
- p.date
- r{creator info, about org mode version}
- .title
- r{document subtitle}
- .todo
- r{the DONE keywords, all states that count as done}
- .WAITING
- r{timestamp}
- .timestamp-kwd
- r{span around keyword plus timestamp}
- .tag
- r{each tag uses itself as a class, "@@" replaced by "_"}
- .target
- r{the line number in a code example}
- .code-highlighted
- r{div for outline level N (headline plus text))}
- div.outline-text-N
- r{section number in headlines, different for each level}
- .figure-number
- r{label like "Table 1:"}
- .listing-number
- r{how to format an inlined image}
- pre.src
- r{normal example}
- p.verse
- r{footnote section headline}
- p.footnote
- r{a footnote reference number (always a <sup>)}
- .footnum
- r{default class for a linked
- end example
- vindex org-html-head-include-default-style
- vindex org-html-head-extra
- footnote{This style is defined in the constant
- code{org-html-head-include-default-style} or set
- code{nil} in an
- code{org-html-head} and
- cindex #+HTML_HEAD
- example
- #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style1.css" />
- #+HTML_HEAD_EXTRA: <link rel="alternate stylesheet" type="text/css" href="style2.css" />
- noindent
- For longer style definitions, you can use several such lines. You could also
- directly write a code{</style>} section in this way, without
- referring to an external file.
- In order to add styles to a subtree, use the
- code{:CUSTOM_ID:}
- property.
- c FIXME: Talk about links and targets.
- subsection JavaScript supported display of web pages
- emph{Info}-like mode where each section is displayed separately and
- navigation can be done with the kbd{p} keys (and some other keys
- as well, press
- emph{folding} view much like Org provides inside Emacs. The
- script is available at
- url{http://orgmode.org/worg/code/org-info-js/}.
- We host the script at our site, but if you use it a lot, you might not want
- to be dependent on
- cindex #+INFOJS_OPT
- end example
- example
- path:
- r{
- r{a local copy and use a path like
- r{Initial view when the website is first shown. Possible values are:}
- info
- r{Folding interface, initially showing only top-level.}
- content
- r{Folding interface, all headlines and text visible.}
- sdepth:
- r{section for info and folding modes. The default is taken from}
- code{org-export-headline-levels} (= the code{#+OPTIONS}).}
- code{org-export-headline-levels}, each}
-
- r{Should the table of contents
- r{Even when kbd{i}.}
- tdepth:
- r{the variables code{org-export-with-toc}.}
- ftoc:
- r{If yes, the toc will never be displayed as a section.}
- ltoc:
- r{Make this
- r{Headings are highlighted when the mouse is over them. Should be}
- samp{underline} (default) or a background color like
- r{Should view-toggle buttons be everywhere? When
- r{default), only one such button will be present.}
- noindent
- vindex org-html-use-infojs
- You can choose default values for these options by customizing the variable
- code{org-html-use-infojs}.
- LaTeX{} export
- LaTeX{} export
- LaTeX{} export
- LaTeX{} exporter can produce an arbitrarily complex
- footnote{The
- LaTeX{} engines (see
- code{org-latex-pdf-process}), and packages, (see
- code{org-latex-packages-alist}).}. The Org
- LaTeX{}, blank lines are meaningful for this back-end: a paragraph
- will not be started if two contiguous syntactical elements are not separated
- by an empty line.
- LaTeX{} export commands:: How to export to
- LaTeX{} specific export settings:: Export settings for
- LaTeX{} header and sectioning:: Setting up the export file structure
- * Quoting LaTeX{} code
- * Tables in
- LaTeX{} export:: Specific attributes for images
- * Plain lists in
- LaTeX{} export:: Specific attributes for source blocks
- * Example blocks in
- LaTeX{} export:: Specific attributes for special blocks
- * Horizontal rules in
- end menu
- LaTeX{} export commands
- LaTeX{} export commands
- kbd
- LaTeX{} file. For an Org file LaTeX{}
- file will be
- orgcmd{C-c C-e l L,org-latex-export-as-latex}
- Export to a temporary buffer. Do not create a file.
- LaTeX{} and then process to PDF.
- LaTeX{} and then process to PDF, then open the resulting PDF file.
- vindex org-latex-compiler
- vindex org-latex-default-packages-alist
- The exporter supports several samp{pdflatex},
- samp{lualatex}. The default
- code{org-latex-compiler} or the
- code{org-latex-default-packages-alist}). The bibliography compiler may
- also be set via footnote{You cannot set the
- bibliography compiler on a file basis via a keyword. However, ``smart''
- samp{latexmk}, are usually able to
- select the correct bibliography compiler.}.
- LaTeX{} specific export settings
- LaTeX{} specific export settings
- The
- ref{Export settings}.
- samp
- cindex #+DESCRIPTION (
- samp{hyperref}. Document metadata can be configured via
- code{org-latex-title-command}. You can use several
- item LATEX_CLASS
- vindex org-latex-default-class
- code{org-latex-default-class}). Must be an element in
- item LATEX_CLASS_OPTIONS
- LaTeX{} document class.
- cindex #+LATEX_COMPILER
- code{org-latex-compiler}).
- cindex #+LATEX_HEADER
- samp{hyperref} settings. The location can be controlled via
- item LATEX_HEADER_EXTRA
- vindex org-latex-classes
- Arbitrary lines added to the preamble of the document, before the
- code{org-latex-classes}.
- cindex #+KEYWORDS (
- samp{hyperref}. Document metadata can be
- configured via
- code{org-latex-title-command}. You
- can use several
- item SUBTITLE
- LaTeX{})
- vindex org-latex-subtitle-format
- The document subtitle. This is typeset according to
- code{org-latex-subtitle-separate}
- is non-samp{\title}-macro. It
- can also access via
- code{org-latex-title-command}.
- node
- subsection
- cindex
- cindex
- cindex
- cindex header, for
- cindex sectioning structure, for
- code{itemize}
- or
- pxref{Export settings}).
- By default, the code{article}.
- vindex org-latex-classes
- vindex org-latex-packages-alist
- You can change this globally by setting a different value for
- code{#+LATEX_CLASS: myclass} in your file, or with
- a
- code{org-latex-classes}. This variable defines a header template for each
- class
- code{org-latex-default-packages-alist} and
- cindex #+LATEX_CLASS
- cindex property, EXPORT_LATEX_CLASS
- code{LATEX_CLASS_OPTIONS} keyword or
- code{\documentclass} macro. These
- options have to be provided, as expected by
- cindex #+LATEX_HEADER
- code{LATEX_HEADER} and
- footnote{Unlike
- code{LATEX_HEADER_EXTRA} keywords will not be loaded when previewing
- pxref{Previewing
- code{org-latex-classes} for
- more information.
- An example is shown below.
- {xyz
- end example
- LaTeX{} code
- LaTeX{} code
- Embedded ref{Embedded
- LaTeX{} file. Furthermore, you can add special code that
- should only be present in
- cindex #+LATEX
- example
- Code within latex:some code a paragraph.
- #+LATEX: Literal
- end example
- LaTeX{} export
- LaTeX{} export
- LaTeX{} export
- LaTeX{} export of a table, you can specify a label and a caption
- (
- LaTeX{} attributes include:
- code
- vindex org-latex-default-table-mode
- Nature of table's contents. It can be set to code{math},
- code{verbatim}. In particular, when in
- code{inline-math} mode, every cell is exported as-is and the table is
- wrapped within a math environment. Also, contiguous tables sharing the same
- math mode are merged within the same environment. Default mode is determined
- in
- item :environment
- LaTeX{} table
- environment, like footnote{Requires adding the
- code{org-latex-packages-alist}.},
- code{array}, footnote{Requires adding the
- code{org-latex-packages-alist}.},
- enddots{} It defaults to
- item :caption
- pxref{Images and tables}). If you need more advanced commands for that
- task, you can use
- LaTeX{} code. It has precedence over
- item :float
- code{:float} specifies the float environment for the table. Possible
- values are footnote{Formerly, the value was
- code{multicolumn}, code{nil}. When unspecified, a table with
- a caption will have a
- code{:placement} attribute can specify the positioning of the float. Note:
- code{:float sideways} tables.
- itemx :font
- item :spread
- Boolean specific to the code{longtabu} environments, and
- only takes effect when used in conjunction with the
- code{:spread} is non-
- code{:width}.
- itemx :center
- vindex org-latex-tables-booktabs
- code{booktabs} usage (assuming the package is
- properly loaded), table centering and removal of every horizontal rule but
- the first one (in a "table.el" table only). In particular,
- code{org-latex-tables-centered})
- activates the first (respectively second) attribute globally.
- itemx :math-suffix
- code{:math-arguments}
- attribute is used for matrix macros that require more than one argument
- (e.g.,
- end table
- Thus, attributes can be used in a wide array of situations, like writing
- a table that will span over multiple pages, or a matrix product:
- {3cm
- end example
- In the example below,
- code{\bicaption}}} will set the caption.
- {HeadingA{HeadingB
- end example
- LaTeX{} export
- LaTeX{} export
- LaTeX{}
- LaTeX{}
- samp{[[file:img.jpg]]} or
- LaTeX{} processing. Org will use an
- footnote{In the case of
- TikZ (
- code{\input} macro wrapped within a
- code{:width} and
- code{:options} attribute, as shown in the following example:
- end example
- If you need a specific command for the caption, use
- code{#+CAPTION} value, if any.
- {HeadingA{HeadingB
- end example
- If you have specified a caption as described in
- code{figure} environment and thus become
- a floating element. You can also ask Org to export an image as a float
- without specifying caption by setting the
- itemize
- item
- samp{figure} environment. It is
- used by default if you provide a caption to the image.
- code{multicolumn}: if you wish to include an image which spans multiple
- columns in a page. This will export the image wrapped in a
- item
- item
- code{sidewaysfigure}
- environment. Setting this
- code{:placement} setting.
- code{nil}: if you need to avoid any floating environment, even when
- a caption is provided.
- noindent
- To modify the placement option of any floating environment, set the
- example
- #+ATTR_LATEX: :float wrap :width 0.38\textwidth :placement }}
- [[./img/hst.png]]
- vindex org-latex-images-centered
- LaTeX{} export)
- LaTeX{} export)
- Images are centered by default. However, one can disable this behavior by
- setting code{nil}. To prevent any image from
- being centered throughout a document, set
- code{:comment-include} attribute is set to
- a non-LaTeX{}
- node Plain lists in
- subsection Plain lists in
- cindex plain lists, in
- cindex #+ATTR_LATEX, in plain lists
- Plain lists accept two optional attributes:
- code{:options}. The first can be used to specify the environment. The
- second can be used to specifies additional arguments to the environment.
- Both attributes are illustrated in the following example:
- {enumitem
- {{,{, and
- end example
- By default,
- samp{enumitem}
- example
- #+LATEX_HEADER: \usepackage}
- #+LATEX_HEADER: \renewlist}}}
- #+LATEX_HEADER: \setlist[itemize]}
- - One
- - Two
- - Three
- - Four
- - Five
- node Source blocks in
- subsection Source blocks in
- cindex source blocks, in
- cindex #+ATTR_LATEX, in source blocks
- In addition to syntax defined in
- pxref{Images and tables}), source blocks also accept two additional
- attributes: code{:options}.
- You may set the former to
- minus
- code{t}: if you want to make the source block a float. It is the default
- value when a caption is provided.
- code{multicolumn}: if you wish to include a source block which spans multiple
- columns in a page.
- code{nil}: if you need to avoid any floating environment, even when a caption
- is provided. It is useful for source code that may not fit in a single page.
- example
- #+ATTR_LATEX: :float nil
- #+BEGIN_SRC emacs-lisp
- Code that may not fit in a single page.
- #+END_SRC
- vindex org-latex-listings-options
- code{listings}). This is the local
- counterpart to
- code{org-latex-minted-options} variables, which see.
- end example
- LaTeX{} export
- LaTeX{} export
- LaTeX{} export
- LaTeX{} export
- LaTeX{}, example blocks contents are wrapped
- in a
- pxref{Advanced
- configuration}). You can also change this per block using
- example
- #+ATTR_LATEX: :environment myverbatim
- #+BEGIN_EXAMPLE
- This sentence is false.
- #+END_EXAMPLE
- node Special blocks in
- subsection Special blocks in
- cindex special blocks, in
- cindex abstract, in
- cindex proof, in
- cindex #+ATTR_LATEX, in special blocks
- In
- code{:options} attribute will be appended as-is to that
- environment's opening string. For example:
- end example
- example
- \begin}
- We demonstrate how to solve the Syracuse problem.
- \end}
- \begin}[Proof of important theorem]
- ...
- Therefore, any even number greater than 2 is the sum of two primes.
- \end}
- code{:caption}
- attribute. It will override standard
- example
- #+ATTR_LATEX: :caption \MyCaption}
- #+BEGIN_proof
- ...
- #+END_proof
- node Horizontal rules in
- subsection Horizontal rules in
- cindex horizontal rules, in
- cindex #+ATTR_LATEX, in horizontal rules
- Width and thickness of a given horizontal rule can be controlled with,
- respectively, code{:thickness} attributes:
- end example
- section Markdown export
- code{md} export back-end generates Markdown syntax
- url{http://daringfireball.net/projects/markdown/}.} for an Org
- mode buffer.
- It is built over HTML back-end: any construct not supported by Markdown
- syntax (e.g., tables) will be controlled and translated by
- pxref{HTML export}).
- table
- orgcmd{C-c C-e m m,org-md-export-to-markdown}
- Export as a text file written in Markdown syntax. For an Org file,
- file{myfile.md}. The file
- will be overwritten without warning.
- item C-c C-e m o
- Export as a text file with Markdown syntax, then open it.
- subheading Header and sectioning structure
- code{atx} and
- code{org-md-headline-style}. The former introduces
- a hard limit of two levels, whereas the latter pushes it to six. Headlines
- below that limit are exported as lists. You can also set a soft limit before
- that one (
- c begin opendocument
- section OpenDocument Text export
- cindex OpenDocument
- cindex LibreOffice
- Org mode supports export to OpenDocument Text (ODT) format. Documents
- created by this exporter use the
- footnote{
- menu
- * Pre-requisites for ODT export:: What packages ODT exporter relies on
- * ODT export commands:: How to invoke ODT export
- * ODT specific export settings:: Export settings for ODT
- * Extending ODT export:: How to produce samp{pdf} files
- * Applying custom styles:: How to apply custom styles to the output
- * Links in ODT export:: How links will be interpreted and formatted
- * Tables in ODT export:: How Tables are exported
- * Images in ODT export:: How to insert images
- * Math formatting in ODT export:: How
- end menu
- subsection Pre-requisites for ODT export
- file{zip} program to create the final
- output. Check the availability of this program before proceeding further.
- subsection ODT export commands
- cindex region, active
- cindex transient-mark-mode
- kbd
- cindex property EXPORT_FILE_NAME
- Export as OpenDocument Text file.
- code{org-odt-preferred-output-format} is specified, automatically convert
- the exported file to that format.
- file{myfile.org}, the ODT file will be
- footnote{This requires
- footnote{To select the current subtree, use
- code{EXPORT_FILE_NAME} property, that name will be used for the
- export.
- vindex org-odt-preferred-output-format
- If
- xref{x-export-to-other-formats, , Automatically exporting to
- other formats}.
- node ODT specific export settings
- ref{Export settings}.
- samp
- cindex #+DESCRIPTION (ODT)
- The document description. These are inserted as document metadata. You can
- use several such keywords if the list is long.
- cindex #+KEYWORDS (ODT)
- The keywords defining the contents of the document. These are inserted as
- document metadata. You can use several such keywords if the list is long.
- cindex ODT_STYLES_FILE
- code{org-odt-styles-file}). See
- item SUBTITLE
- end table
- subsection Extending ODT export
- The ODT exporter can interface with a variety of document
- converters and supports popular converters out of the box. As a result, you
- can use it to export to formats like
- samp{csv}) to another format (say samp{xls}).
- file{unoconv}
- file{unoconv} as your preferred converter, customize the variable
- code{unoconv}. You can
- also use your own favorite converter or tweak the default settings of the
- samp{unoconv} converters.
- subsubheading Automatically exporting to other formats
- vindex org-odt-preferred-output-format
- Very often, you will find yourself exporting to ODT format, only to
- immediately save the exported document to other formats like
- samp{docx}, samp{pdf} etc. In such cases, you can specify your
- preferred output format by customizing the variable
- pxref{x-export-to-odt,,Exporting to ODT}) can be extended to export to a
- format that is of immediate interest to you.
- anchor{x-convert-to-other-formats}
- There are many document converters in the wild which support conversion to
- and from various file formats, including, but not limited to the
- ODT format. LibreOffice converter, mentioned above, is one such
- converter. Once a converter is configured, you can interact with it using
- the following command.
- table
- item M-x org-odt-convert RET
- Convert an existing document from one format to another. With a prefix
- argument, also open the newly produced file.
- node Applying custom styles
- cindex styles, custom
- pxref{Working with OpenDocument style files}) that ensure a well-formatted
- output. These factory styles, however, may not cater to your specific
- tastes. To customize the output, you can either modify the above styles
- files directly, or generate the required styles using an application like
- LibreOffice. The latter method is suitable for expert and non-expert
- users alike, and is described here.
- enumerate
- file{example.org} file with the below settings and export it
- to ODT format.
- end example
- file{example.odt} using LibreOffice. Use the
- samp{Org} prefix---and
- modify those to your taste. Save the modified file either as an
- OpenDocument Text (file{.ott}) file.
- cindex #+ODT_STYLES_FILE
- code{org-odt-styles-file} and point it to the
- newly created file. For additional configuration options
- code{#+ODT_STYLES_FILE} option. A typical setting will look like
- end example
- or
- end example
- subsubheading Using third-party styles and templates
- You can use third-party styles and templates for customizing your output.
- This will produce the desired output only if the template provides all
- style names that the
- node Links in ODT export
- cindex links, in ODT export
- ODT exporter creates native cross-references for internal links. It creates
- Internet-style links for all other links.
- A link with no description and destined to a regular (un-itemized) outline
- heading is replaced with a cross-reference and section number of the heading.
- A {label: is replaced
- with a cross-reference and sequence number of the labeled entity.
- node Tables in ODT export
- cindex tables, in ODT export
- Export of native Org mode tables (file{table.el}
- tables is supported. However, export of complex
- pxref{Column groups}). Furthermore, all
- tables are typeset to occupy the same width. If the table specifies
- alignment and relative width for its columns (
- footnote{The column widths are
- interpreted as weighted ratios with the default weight being 1}
- code{:rel-width}
- property using an
- example
- #+ATTR_ODT: :rel-width 50
- | Area/Month | Jan | Feb | Mar | Sum |
- |---------------+-------+-------+-------+-------|
- | / | < | | | < |
- | <l13> | <r5> | <r5> | <r5> | <r6> |
- | North America | 1 | 21 | 926 | 948 |
- | Middle East | 6 | 75 | 844 | 925 |
- | Asia Pacific | 9 | 27 | 790 | 826 |
- |---------------+-------+-------+-------+-------|
- | Sum | 16 | 123 | 2560 | 2699 |
- code{#+ATTR_ODT} line.
- node Images in ODT export
- cindex images, embedding in ODT
- subsubheading Embedding images
- You can embed images within the exported document by providing a link to the
- desired image file with no link description. For example, to embed
- example
- [[file:img.png]]
- example
- [[./img.png]]
- subsubheading Embedding clickable images
- You can create clickable images by providing a link whose description is a
- link to an image file. For example, to embed a image
- uref{http://Orgmode.org} website, do the following
- end example
- cindex #+ATTR_ODT
- You can control the size and scale of the embedded images using the
- cindex identify, ImageMagick
- file{identify} program or b) Emacs code{image-size}
- APIsfile{ImageMagick} is only desirable. However, if you
- routinely produce documents that have large images or you export your Org
- files that has images using a Emacs batch script, then the use of
- code{org-odt-pixels-per-inch}. The default value of this variable is
- set to
- table
- item Explicitly size the image
- To embed
- example
- #+ATTR_ODT: :width 10 :height 10
- [[./img.png]]
- item Scale the image
- To embed
- example
- #+ATTR_ODT: :scale 0.5
- [[./img.png]]
- item Scale the image to a specific width
- To embed
- example
- #+ATTR_ODT: :width 10
- [[./img.png]]
- item Scale the image to a specific height
- To embed
- example
- #+ATTR_ODT: :height 10
- [[./img.png]]
- end table
- cindex #+ATTR_ODT
- You can control the manner in which an image is anchored by setting the
- code{#+ATTR_ODT} line. You can specify one
- of the following three values for the
- samp{"as-char"}, samp{"page"}.
- To create an image that is anchored to a page, do the following:
- end example
- subsection Math formatting in ODT export
- The ODT exporter has special support for handling math.
- LaTeX{} math snippets:: How to embed
- end menu
- LaTeX{} math snippets
- LaTeX{} math snippets
- pxref{
- cindex MathML
- item MathML
- This option is activated on a per-file basis with
- end example
- With this option,
- LaTeX{}-to-MathML converter program. The
- resulting MathML fragments are then embedded as an OpenDocument Formula in
- the exported document.
- vindex org-latex-to-mathml-jar-file
- You can specify the
- code{org-latex-to-mathml-convert-command} and
- footnote{See
- lisp
- (setq org-latex-to-mathml-convert-command
- "java -jar %j -unicode -force -df %o %I"
- org-latex-to-mathml-jar-file
- "/path/to/mathtoweb.jar")
- LaTeX{}MLuref{http://dlmf.nist.gov/LaTeXML/}.} use
- end lisp
- You can use the following commands to quickly verify the reliability of
- the
- table
- item M-x org-odt-export-as-odf RET
- Convert a file{.odf}) file.
- LaTeX{} math snippet to an OpenDocument formula (
- end table
- cindex dvisvgm
- item PNG images
- This option is activated on a per-file basis with
- end example
- end example
- or:
- end example
- With this option,
- file{dvipng} program, file{imagemagick} suite be
- available on your system.
- node Working with MathML or OpenDocument formula files
- LaTeX{} math snippets in an
- ODT document less than reliable. In that case, you can embed a
- math equation by linking to its MathML (
- file{.odf}) file as shown below:
- end example
- or
- end example
- subsection Labels and captions in ODT export
- You can label and caption various category of objects---an inline image, a
- table, a code{#+LABEL} and
- xref{Images and tables}. ODT exporter enumerates
- each labeled or captioned object of a given category separately. As a
- result, each such object is assigned a sequence number based on order of its
- appearance in the Org file.
- In the exported document, a user-provided caption is augmented with the
- category and sequence number. Consider the following inline image in an Org
- file.
- end example
- It could be rendered as shown below in the exported document.
- end example
- code{org-odt-category-map-alist}. For example, to tag all embedded
- images with the string
- samp{Figure}) use the following setting:
- end lisp
- With this, previous image will be captioned as below in the exported
- document.
- end example
- subsection Literal examples in ODT export
- Export of literal examples (
- file{htmlfontify.el} to
- generate all style definitions needed for a fancy listing. The
- auto-generated styles have
- code{font-lock} library for the source
- language.
- code{org-odt-create-custom-styles-for-srcblocks}.
- code{org-odt-fontify-srcblocks}.
- subsection Advanced topics in ODT export
- If you rely heavily on ODT export, you may want to exploit the full
- set of features that the exporter offers. This section describes features
- that would be of interest to power users.
- end menu
- subsubheading Configuring a document converter
- cindex doc, docx, rtf
- xref{Extending ODT export}.
- If you are using a converter that is not supported by default or if you would
- like to tweak the default converter settings, proceed as below.
- item Register the converter
- code{org-odt-convert-processes}. Also specify how
- the converter can be invoked via command-line to effect the conversion.
- vindex org-odt-convert-capabilities
- code{org-odt-convert-capabilities}. Use the default value for this
- variable as a guide for configuring your converter. As suggested by the
- default setting, you can specify the full set of formats supported by the
- converter and not limit yourself to specifying formats that are related to
- just the OpenDocument Text format.
- vindex org-odt-convert-process
- Select the newly added converter as the preferred one by customizing the
- option
- end enumerate
- subsubheading Working with OpenDocument style files
- cindex template, custom
- This section explores the internals of the ODT exporter and the
- means by which it produces styled documents. Read this section if you are
- interested in exploring the automatic and custom OpenDocument styles used by
- the exporter.
- subsubheading a) Factory styles
- The ODT exporter relies on two files for generating its output.
- These files are bundled with the distribution under the directory pointed to
- by the variable
- itemize
- item
- file{styles.xml} file of the final
- enumerate
- item
- To add styles generated by
- end enumerate
- item
- file{content.xml} file of the final
- samp{<office:text>}samp{</office:text>} elements of this file.
- Apart from serving as a template file for the final
- enumerate
- item
- It contains dots{}
- end enumerate
- anchor{x-overriding-factory-styles}
- itemize
- item
- file{styles.xml} that will be used in the
- final output. You can specify one of the following values:
- item A
- file{styles.xml}
- file{.odt} or
- file{styles.xml} contained in the specified OpenDocument Text or
- Template file
- file{.odt} or
- file{styles.xml} contained in the specified OpenDocument Text or
- Template file. Additionally extract the specified member files and embed
- those within the final
- file{styles.xml} file references additional files
- like header and footer images.
- code{nil}
- Use the default
- end enumerate
- item
- file{content.xml} that will be used
- in the final output.
- node Creating one-off styles
- enumerate
- samp{odt:...} markup. For example, to highlight a region of text do
- the following:
- end example
- file{styles.xml} (
- samp{Highlight} style as shown below.
- end example
- code{#+ODT:}
- directive. For example, to force a page break do the following:
- end example
- file{styles.xml} (
- samp{PageBreak} style as shown below.
- end example
- code{#+BEGIN_EXPORT
- odt}code{#+END_EXPORT} construct.
- For example, to create a one-off paragraph that uses bold text, do the
- following:
- end example
- node Customizing tables in ODT export
- cindex tables, in ODT export
- code{#+ATTR_ODT} line. For a discussion on default
- formatting of tables
- footnote{
- vindex org-odt-table-styles
- To have a quick preview of this feature, install the below setting and
- export the table that follows:
- end lisp
- end example
- In the above example, you used a template named
- samp{TableWithHeaderRowAndColumn} and
- strong{Important:} The OpenDocument
- styles needed for producing the above template have been pre-defined for
- you. These styles are available under the section marked
- file{OrgOdtContentTemplate.xml}
- (
- enumerate
- footnote{See the
- samp{table-cell} and
- itemize
- item Body
- item Last column
- item Last row
- item Odd row
- item Odd Column
- samp{Custom}, the needed style names are listed in
- the following table.
- headitem Table cell type
- code{table-cell} style
- code{paragraph} style
- tab
- item Body
- samp{CustomTableCell}
- samp{CustomTableParagraph}
- tab
- tab
- item Last column
- samp{CustomLastColumnTableCell}
- samp{CustomLastColumnTableParagraph}
- tab
- tab
- item Last row
- samp{CustomLastRowTableCell}
- samp{CustomLastRowTableParagraph}
- tab
- tab
- item Odd row
- samp{CustomOddRowTableCell}
- samp{CustomOddRowTableParagraph}
- tab
- tab
- item Odd column
- samp{CustomOddColumnTableCell}
- samp{CustomOddColumnTableParagraph}
- samp{Custom}, define the above
- styles in the
- code{</office:automatic-styles>} element
- of the content template file (
- item
- Define a table stylecode{table:template-name},
- code{table:use-last-row-styles},
- code{table:use-last-column-styles},
- code{table:use-banding-column-styles} of the
- vindex org-odt-table-styles
- To define a table style, create an entry for the style in the variable
- itemize
- item the name of the table template created in step (1)
- end itemize
- For example, the entry below defines two different table styles
- samp{TableWithFirstRowandLastRow}
- based on the same template
- lisp
- (setq org-odt-table-styles
- (append org-odt-table-styles
- '(("TableWithHeaderRowAndColumn" "Custom"
- ((use-first-row-styles . t)
- (use-first-column-styles . t)))
- ("TableWithFirstRowandLastRow" "Custom"
- ((use-first-row-styles . t)
- (use-last-row-styles . t))))))
- item
- Associate a table with the table style
- To do this, specify the table style created in step (2) as part of
- the
- example
- #+ATTR_ODT: :style "TableWithHeaderRowAndColumn"
- | Name | Phone | Age |
- | Peter | 1234 | 17 |
- | Anna | 4321 | 25 |
- end enumerate
- subsubheading Validating OpenDocument XML
- Occasionally, you will discover that the document created by the
- ODT exporter cannot be opened by your favorite application. One of
- the common reasons for this is that the
- file{.odt} filefile{.odt} files are
- nothing but inforef{File Archives,,emacs}. For
- general help with validation (and schema-sensitive editing) of XML files:
- vindex org-odt-schema-dir
- If you have ready access to OpenDocument
- code{org-odt-schema-dir} to point to that directory. The ODT exporter
- will take care of updating the
- c end opendocument
- section Org export
- code{org} export back-end creates a normalized version of the Org document
- in current buffer. In particular, it evaluates Babel code (
- subheading Org export commands
- kbd
- file{myfile.org}, the resulting
- file will be
- orgcmd{C-c C-e O O,org-org-export-as-org}
- Export to a temporary buffer. Do not create a file.
- end table
- section Texinfo export
- samp{texinfo} export back-end generates Texinfo code and can compile it into
- an Info file.
- samp{Top} node:: Installing a manual in Info Top node
- * Headings and sectioning structure:: Building document structure
- * Indices:: Creating indices
- * Quoting Texinfo code:: Incorporating literal Texinfo code
- * Plain lists in Texinfo export:: Specific attributes for plain lists
- * Tables in Texinfo export:: Specific attributes for tables
- * Images in Texinfo export:: Specific attributes for images
- * Special blocks in Texinfo export:: Specific attributes for special blocks
- * A Texinfo example:: Illustrating Org to Texinfo process
- node Texinfo export commands
- vindex org-texinfo-info-process
- kbd
- file{myfile.org}, the resulting
- file will be
- orgcmd{C-c C-e i i,org-texinfo-export-to-info}
- Export to Texinfo and then process to an Info file
- code{org-texinfo-info-process}, it is possible to generate other formats,
- including DocBook.}.
- node Texinfo specific export settings
- ref{Export settings}.
- samp
- cindex #+SUBTITLE (Texinfo)
- The document subtitle.
- cindex #+SUBAUTHOR
- The document subauthor.
- cindex #+TEXINFO_FILENAME
- The Texinfo filename.
- cindex #+TEXINFO_CLASS
- code{org-texinfo-default-class}). This must be a
- member of
- item TEXINFO_HEADER
- item TEXINFO_POST_HEADER
- item TEXINFO_DIR_CATEGORY
- item TEXINFO_DIR_TITLE
- item TEXINFO_DIR_DESC
- item TEXINFO_PRINTED_TITLE
- end table
- subsection Texinfo file header
- code{#+TEXINFO_FILENAME} keyword to override the default
- destination.
- vindex org-texinfo-classes
- cindex #+TEXINFO_CLASS
- Along with the output file name, the header contains information about the
- language (footnote{See
- code{#+TEXINFO_HEADER} keyword for each additional command needed, e.g.,
- code}.
- If you happen to regularly install the same set of commands, it may be easier
- to define your own class in
- code{#+TEXINFO_CLASS} keyword accordingly in your document to activate it.
- subsection Texinfo title and copyright page
- code{#+TITLE} and pxref{Export settings}). It is
- also possible to print a different, more specific, title with
- code{#+SUBTITLE} keyword. Both expect raw Texinfo code in their value.
- code{#+AUTHOR} may not be enough. You can
- include other authors with several
- example
- #+AUTHOR: Jane Smith
- #+SUBAUTHOR: John Doe
- #+TEXINFO_PRINTED_TITLE: This Long Titleinlinefmt} Is Broken in TeX}
- cindex property, COPYING
- Copying material is defined in a dedicated headline with a non-
- code{:COPYING:} property. The contents are inserted within
- a
- example
- * Copying
- :PROPERTIES:
- :COPYING: t
- :END:
- This is a short example of a complete Texinfo file, version 1.0.
- Copyright \copy 2016 Free Software Foundation, Inc.
- node Texinfo
- subsection Texinfo
- cindex #+TEXINFO_DIR_CATEGORY
- cindex #+TEXINFO_DIR_DESC
- You may ultimately want to install your new Info file in your system. You
- can write an appropriate entry in the top level directory specifying its
- category and title with, respectively,
- code{#+TEXINFO_DIR_TITLE}. Optionally, you can add a short description
- using
- samp{Top} node.
- end example
- subsection Headings and sectioning structure
- vindex org-texinfo-default-class
- samp{texinfo} uses a pre-defined scheme, or class, to convert headlines into
- Texinfo structuring commands. For example, a top level headline appears as
- code{unnumbered}
- otherwise. If you need to use a different set of commands, e.g., to start
- with code{chapter}, install a new class in
- code{#+TEXINFO_CLASS}
- keyword. Export process defaults to
- pxref{Export settings}), that headline becomes a list
- in Texinfo output.
- code{nil}
- cindex property, DESCRIPTION
- Each regular sectioning structure creates a menu entry, named after the
- heading. You can provide a different, e.g., shorter, title in
- pxref{Table of contents}). Optionally, you can
- specify a description for the item in
- example
- * Controlling Screen Display
- :PROPERTIES:
- :ALT_TITLE: Display
- :DESCRIPTION: Controlling Screen Display
- :END:
- node Indices
- cindex #+CINDEX
- cindex #+KINDEX
- cindex #+TINDEX
- samp{texinfo} back-end
- provides one for each predefined type: code{#+FINDEX},
- code{#+PINDEX}, code{#+VINDEX}. For
- custom indices, you can write raw Texinfo code (
- example
- #+CINDEX: Defining indexing entries
- cindex property, INDEX
- To generate an index, you need to set the
- samp{cp} or
- example
- * Concept Index
- :PROPERTIES:
- :INDEX: cp
- :END:
- node Quoting Texinfo code
- cindex #+TEXINFO
- example
- Richard texinfo:sc} commence' GNU.
- #+TEXINFO: need800
- This paragraph is preceded by...
- #+BEGIN_EXPORT texinfo
- auindex Johnson, Mark
- auindex Lakoff, George
- #+END_EXPORT
- node Plain lists in Texinfo export
- cindex #+ATTR_TEXINFO, in plain lists
- In Texinfo output, description lists appear as two-column tables, using the
- default command code{ftable} or
- footnote{For more information,
- code{:table-type} attribute.
- code{:indic} attribute. If you do not,
- it defaults to the value stored in
- example
- #+ATTR_TEXINFO: :indic asis
- - foo :: This is the text for /foo/, with no highlighting.
- node Tables in Texinfo export
- cindex #+ATTR_TEXINFO, in tables
- When exporting a table, column widths are deduced from the longest cell in
- each column. You can also define them explicitly as fractions of the line
- length, using
- example
- #+ATTR_TEXINFO: :columns .5 .5
- | a cell | another cell |
- node Images in Texinfo export
- cindex #+ATTR_TEXINFO, in images
- Images are links to files with a supported image extension and no
- description. Image scaling is set with code{:height}
- attributes. You can also use
- example
- #+ATTR_TEXINFO: :width 1in :alt Alternate i}
- [[ridt.pdf]]
- node Special blocks in Texinfo export
- cindex #+ATTR_TEXINFO, in special blocks
- In Texinfo output, special blocks become commands of the same name. Value of
- example
- #+attr_texinfo: :options org-org-export-to-org ...
- #+begin_defun
- A somewhat obsessive function.
- #+end_defun
- noindent
- becomes
- end example
- subsection A Texinfo example
- Here is a thorough example.
- example
- #+MACRO: version 2.0
- #+MACRO: updated last updated 4 March 2014
- #+OPTIONS: ':t toc:t author:t email:t
- #+TITLE: GNU Sample {}}
- #+AUTHOR: A.U. Thor
- #+EMAIL: bug-samplegnu.org
- #+LANGUAGE: en
- #+TEXINFO_FILENAME: sample.info
- #+TEXINFO_HEADER: syncodeindex pg cp
- #+TEXINFO_DIR_CATEGORY: Texinfo documentation system
- #+TEXINFO_DIR_TITLE: sample: (sample)
- #+TEXINFO_DIR_DESC: Invoking sample
- #+TEXINFO_PRINTED_TITLE: GNU Sample
- #+SUBTITLE: for version {}}, {}}
- * Copying
- :PROPERTIES:
- :COPYING: t
- :END:
- This manual is for GNU Sample (version {}},
- {}}), which is an example in the Texinfo documentation.
- Copyright texinfo:copyright} 2013 Free Software Foundation,
- Inc.
- #+BEGIN_QUOTE
- Permission is granted to copy, distribute and/or modify this
- document under the terms of the GNU Free Documentation License,
- Version 1.3 or any later version published by the Free Software
- Foundation; with no Invariant Sections, with no Front-Cover Texts,
- and with no Back-Cover Texts. A copy of the license is included in
- the section entitled "GNU Free Documentation License".
- #+END_QUOTE
- * Invoking sample
- #+PINDEX: sample
- #+CINDEX: invoking command}
- This is a sample manual. There is no sample program to invoke, but
- if there were, you could see its basic usage and command line
- options here.
- * GNU Free Documentation License
- :PROPERTIES:
- :APPENDIX: t
- :END:
- #+TEXINFO: include fdl.texi
- * Index
- :PROPERTIES:
- :INDEX: cp
- :END:
- node iCalendar export
- cindex iCalendar export
- vindex org-icalendar-use-deadline
- vindex org-icalendar-categories
- code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT,
- and TODO items as VTODO
- footnote{See the variables
- code{org-icalendar-use-scheduled}.}.
- As categories, it will use the tags locally defined in the heading, and the
- file/tree category
- code{org-icalendar-categories}.}. See the variable
- vindex org-icalendar-store-UID
- code{org-icalendar-store-UID}, the UID will be stored in the
- table
- orgcmd{C-c C-e c f,org-icalendar-export-to-ics}
- Create iCalendar entries for the current buffer and store them in the same
- directory, using a file extension
- orgcmd{C-c C-e c a, org-icalendar-export-agenda-files}
- kbd{C-c C-e c f}, but do this for all files in
- orgcmd{C-c C-e c c,org-icalendar-combine-agenda-files}
- code{org-agenda-files} and write it to the file given by
- end table
- vindex org-icalendar-include-body
- cindex property, DESCRIPTION
- footnote{The LOCATION
- property can be inherited from higher in the hierarchy if you configure
- code{org-icalendar-include-body} characters).
- How this calendar is best read and updated, depends on the application
- you are using. The FAQ covers this issue.
- section Other built-in back-ends
- vindex org-export-backends
- On top of the aforementioned back-ends, Org comes with other built-in ones:
- item
- end itemize
- To activate these export back-end, customize
- code{(require 'ox-man)}. This will add new
- keys in the export dispatcher (
- node Advanced configuration
- subheading Hooks
- vindex org-export-before-parsing-hook
- Two hooks are run during the first steps of the export process. The first
- one,
- code{org-export-before-parsing-hook}, as its name suggests, happens just
- before parsing the buffer. Their main use is for heavy duties, that is
- duties involving structural modifications of the document. For example, one
- may want to remove every headline in the buffer during export. The following
- code can achieve this:
- group
- (defun my-headline-removal (backend)
- "Remove all headlines in the current buffer.
- BACKEND is the export back-end being used, as a symbol."
- (org-map-entries
- (lambda () (delete-region (point) (progn (forward-line) (point))))))
- (add-hook 'org-export-before-parsing-hook 'my-headline-removal)
- end lisp
- Note that functions used in these hooks require a mandatory argument,
- a symbol representing the back-end used.
- cindex Filters, exporting
- Filters are lists of functions applied on a specific part of the output from
- a given back-end. More explicitly, each time a back-end transforms an Org
- object or element into another language, all functions within a given filter
- type are called in turn on the string produced. The string returned by the
- last function will be the one used in the final output.
- There are filter sets for each type of element or object, for plain text,
- for the parse tree, for the export options and for the final output. They
- are all named after the same scheme:
- code{TYPE} is the type targeted by the filter. Valid types are:
- columnfractions .33 .33 .33
- tab bold
- item center-block
- tab code
- tab drawer
- item entity
- tab export-block
- tab final-output
- item footnote-definition
- tab headline
- tab inline-babel-call
- item inlinetask
- tab item
- tab latex-environment
- item line-break
- tab node-property
- tab paragraph
- item plain-list
- tab planning
- tab quote-block
- item section
- tab src-block
- tab strike-through
- item superscript
- tab table-cell
- tab target
- item underline
- tab verse-block
- LaTeX{} without using the
- code{_} stands for the non-breaking space):
- group
- (defun my-latex-filter-nobreaks (text backend info)
- "Ensure \"_\" are properly handled in LaTeX export."
- (when (org-export-derived-backend-p backend 'latex)
- (replace-regexp-in-string "_" "~" text)))
- (add-to-list 'org-export-filter-plain-text-functions
- 'my-latex-filter-nobreaks)
- end lisp
- Three arguments must be provided to a filter: the code being changed, the
- back-end used, and some information about the export process. You can safely
- ignore the third argument for most purposes. Note the use of
- code{latex} back-end or any other back-end derived
- from it (e.g.,
- subheading Defining filters for individual files
- You can customize the export for just a specific file by binding export
- filter variables using
- example
- #+BIND: org-export-filter-timestamp-functions (tmp-f-timestamp)
- #+BIND: org-export-filter-strike-through-functions (tmp-f-strike-through)
- #+begin_src emacs-lisp :exports results :results none
- (defun tmp-f-timestamp (s backend info)
- (replace-regexp-in-string "&[lg]t;\\|[][]" "" s))
- (defun tmp-f-strike-through (s backend info) "")
- #+end_src
- subheading Extending an existing back-end
- This is obviously the most powerful customization, since the changes happen
- at the parser level. Indeed, some export back-ends are built as extensions
- of other ones (e.g., Markdown back-end an extension of HTML back-end).
- Extending a back-end means that if an element type is not transcoded by the
- new back-end, it will be handled by the original one. Hence you can extend
- specific parts of a back-end without too much work.
- As an example, imagine we want the
- code{nil}, like the following:
- end example
- Because that back-end is lacking in that area, we are going to create a new
- back-end,
- lisp
- end group
- code{my-ascii-src-block} function looks at the attribute above the
- element. If it isn't true, it gives hand to the
- code{src-block} type element. Now, all it takes to use the new
- back-end is calling the following from an Org buffer:
- end smalllisp
- It is obviously possible to write an interactive function for this, install
- it in the export dispatcher menu, and so on.
- section Export in foreign buffers
- Most built-in back-ends come with a command to convert the selected region
- into a selected format and replace this region by the exported output. Here
- is a list of such conversion commands:
- code
- item org-latex-convert-region-to-latex
- Convert the selected region into
- item org-texinfo-convert-region-to-texinfo
- Convert the selected region into
- item org-md-convert-region-to-md
- Convert the selected region into
- end table
- This is particularly useful for converting tables and lists in foreign
- buffers. E.g., in an HTML buffer, you can turn on
- code{M-x org-html-convert-region-to-html RET}.
- chapter Publishing
- emph{projects} composed of interlinked org
- files. You can also configure Org to automatically upload your exported HTML
- pages and related attachments, such as images and source code files, to a web
- server.
- You can also use Org to convert files into PDF, or even combine HTML and PDF
- conversion so that files are available in both formats on the server.
- Publishing has been contributed to Org by David O'Toole.
- end menu
- section Configuration
- Publishing needs significant configuration to specify files, destination
- and many other properties of a project.
- LaTeX{} export
- * Publishing links:: Which links keep working after publishing?
- * Sitemap:: Generating a list of all pages
- * Generating an index:: An index that reaches across pages
- node Project alist
- code{org-publish-project-alist}
- cindex projects, for publishing
- code{org-publish-project-alist}. Each element of the list
- configures one project, and may be in one of the two following forms:
- r{i.e., a well-formed property list with alternating keys and values}
- end lisp
- In both cases, projects are configured by specifying property values. A
- project defines the set of files that will be published, as well as the
- publishing configuration to use when publishing those files. When a project
- takes the second form listed above, the individual members of the
- node Sources and destinations
- cindex directories, for publishing
- Most properties are optional, but some should always be set. In
- particular, Org needs to know where to look for source files,
- and where to put published files.
- columnfractions 0.3 0.7
- code{:base-directory}
- item
- tab Directory where output files will be published. You can directly
- publish to a web server using a file name syntax appropriate for
- the Emacs
- pxref{Uploading files}).
- code{:preparation-function}
- code{make} for updating files to be
- published. Each preparation function is called with a single argument, the
- project property list.
- code{:completion-function}
- end multitable
- node Selecting files
- cindex files, selecting for publishing
- By default, all files with extension
- multitable
- item
- tab Extension (without the dot!) of source files. This actually is a
- regular expression. Set this to the symbol
- code{:base-directory}, even without extension.
- code{:exclude}
- item
- tab List of files to be included regardless of
- code{:exclude}.
- code{:recursive}
- code{nil} means, check base-directory recursively for files to publish.
- node Publishing action
- cindex action, for publishing
- Publishing means that a file is copied to the destination directory and
- possibly transformed in the process. The default transformation is to export
- Org files as HTML files, and this is done by the function
- pxref{HTML
- export}). But you also can publish your content as PDF files using
- code{ascii},
- code{.org} file but with the
- i{commented} and
- code{org-org-publish-to-org}. This will produce
- code{:htmlized-source} to
- file{file.org.html} in the publishing directory
- file{file.org}
- will be exported as
- code{org-publish-attachment}. For non-org files, you
- always need to specify the publishing function:
- columnfractions 0.3 0.7
- code{:publishing-function}
- item
- tab non-
- end multitable
- The function must accept three arguments: a property list containing at least
- a
- node Publishing options
- cindex options, for publishing
- The property list can be used to set export options during the publishing
- process. In most cases, these properties correspond to user variables in
- Org. While some properties are available for all export back-ends, most of
- them are back-end specific. The following sections list properties along
- with the variable they belong to. See the documentation string of these
- options for details.
- code{org-publish-project-alist}, its
- setting overrides the value of the corresponding user variable (if any)
- during publishing. Options set within a file (
- subsubheading Generic properties
- code{:with-sub-superscript}} {
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- end multitable
- multitable {code{org-ascii-table-keep-all-vertical-lines}}
- code{:ascii-bullets} code{org-ascii-bullets}
- code{:ascii-caption-above} code{org-ascii-caption-above}
- code{:ascii-charset} code{org-ascii-charset}
- code{:ascii-global-margin} code{org-ascii-global-margin}
- code{:ascii-format-drawer-function} code{org-ascii-format-drawer-function}
- code{:ascii-format-inlinetask-function} code{org-ascii-format-inlinetask-function}
- code{:ascii-headline-spacing} code{org-ascii-headline-spacing}
- code{:ascii-indented-line-width} code{org-ascii-indented-line-width}
- code{:ascii-inlinetask-width} code{org-ascii-inlinetask-width}
- code{:ascii-inner-margin} code{org-ascii-inner-margin}
- code{:ascii-links-to-notes} code{org-ascii-links-to-notes}
- code{:ascii-list-margin} code{org-ascii-list-margin}
- code{:ascii-paragraph-spacing} code{org-ascii-paragraph-spacing}
- code{:ascii-quote-margin} code{org-ascii-quote-margin}
- code{:ascii-table-keep-all-vertical-lines} code{org-ascii-table-keep-all-vertical-lines}
- code{:ascii-table-use-ascii-art} code{org-ascii-table-use-ascii-art}
- code{:ascii-table-widen-columns} code{org-ascii-table-widen-columns}
- code{:ascii-text-width} code{org-ascii-text-width}
- code{:ascii-underline} code{org-ascii-underline}
- code{:ascii-verbatim-format} code{org-ascii-verbatim-format}
- subsubheading Beamer specific properties
- code{:beamer-frame-default-options}} {
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- end multitable
- multitable {code{org-html-table-use-header-tags-for-first-column}}
- code{:html-allow-name-attribute-in-anchors} code{org-html-allow-name-attribute-in-anchors}
- code{:html-checkbox-type} code{org-html-checkbox-type}
- code{:html-container} code{org-html-container-element}
- code{:html-divs} code{org-html-divs}
- code{:html-doctype} code{org-html-doctype}
- code{:html-extension} code{org-html-extension}
- code{:html-footnote-format} code{org-html-footnote-format}
- code{:html-footnote-separator} code{org-html-footnote-separator}
- code{:html-footnotes-section} code{org-html-footnotes-section}
- code{:html-format-drawer-function} code{org-html-format-drawer-function}
- code{:html-format-headline-function} code{org-html-format-headline-function}
- code{:html-format-inlinetask-function} code{org-html-format-inlinetask-function}
- code{:html-head-extra} code{org-html-head-extra}
- code{:html-head-include-default-style} code{org-html-head-include-default-style}
- code{:html-head-include-scripts} code{org-html-head-include-scripts}
- code{:html-head} code{org-html-head}
- code{:html-home/up-format} code{org-html-home/up-format}
- code{:html-html5-fancy} code{org-html-html5-fancy}
- code{:html-indent} code{org-html-indent}
- code{:html-infojs-options} code{org-html-infojs-options}
- code{:html-infojs-template} code{org-html-infojs-template}
- code{:html-inline-image-rules} code{org-html-inline-image-rules}
- code{:html-inline-images} code{org-html-inline-images}
- code{:html-link-home} code{org-html-link-home}
- code{:html-link-org-files-as-html} code{org-html-link-org-files-as-html}
- code{:html-link-up} code{org-html-link-up}
- code{:html-link-use-abs-url} code{org-html-link-use-abs-url}
- code{:html-mathjax-options} code{org-html-mathjax-options}
- code{:html-mathjax-template} code{org-html-mathjax-template}
- code{:html-metadata-timestamp-format} code{org-html-metadata-timestamp-format}
- code{:html-postamble-format} code{org-html-postamble-format}
- code{:html-postamble} code{org-html-postamble}
- code{:html-preamble-format} code{org-html-preamble-format}
- code{:html-preamble} code{org-html-preamble}
- code{:html-table-align-individual-fields} code{org-html-table-align-individual-fields}
- code{:html-table-attributes} code{org-html-table-default-attributes}
- code{:html-table-caption-above} code{org-html-table-caption-above}
- code{:html-table-data-tags} code{org-html-table-data-tags}
- code{:html-table-header-tags} code{org-html-table-header-tags}
- code{:html-table-row-tags} code{org-html-table-row-tags}
- code{:html-table-use-header-tags-for-first-column} code{org-html-table-use-header-tags-for-first-column}
- code{:html-tag-class-prefix} code{org-html-tag-class-prefix}
- code{:html-text-markup-alist} code{org-html-text-markup-alist}
- code{:html-todo-kwd-class-prefix} code{org-html-todo-kwd-class-prefix}
- code{:html-toplevel-hlevel} code{org-html-toplevel-hlevel}
- code{:html-use-infojs} code{org-html-use-infojs}
- code{:html-validation-link} code{org-html-validation-link}
- code{:html-viewport} code{org-html-viewport}
- code{:html-xml-declaration} code{org-html-xml-declaration}
- subsubheading
- multitable {code{org-latex-link-with-unknown-path-format}}
- code{:latex-active-timestamp-format} code{org-latex-active-timestamp-format}
- code{:latex-caption-above} code{org-latex-caption-above}
- code{:latex-classes} code{org-latex-classes}
- code{:latex-class} code{org-latex-default-class}
- code{:latex-compiler} code{org-latex-compiler}
- code{:latex-default-figure-position} code{org-latex-default-figure-position}
- code{:latex-default-table-environment} code{org-latex-default-table-environment}
- code{:latex-default-table-mode} code{org-latex-default-table-mode}
- code{:latex-diary-timestamp-format} code{org-latex-diary-timestamp-format}
- code{:latex-footnote-defined-format} code{org-latex-footnote-defined-format}
- code{:latex-footnote-separator} code{org-latex-footnote-separator}
- code{:latex-format-drawer-function} code{org-latex-format-drawer-function}
- code{:latex-format-headline-function} code{org-latex-format-headline-function}
- code{:latex-format-inlinetask-function} code{org-latex-format-inlinetask-function}
- code{:latex-hyperref-template} code{org-latex-hyperref-template}
- code{:latex-image-default-height} code{org-latex-image-default-height}
- code{:latex-image-default-option} code{org-latex-image-default-option}
- code{:latex-image-default-width} code{org-latex-image-default-width}
- code{:latex-images-centered} code{org-latex-images-centered}
- code{:latex-inactive-timestamp-format} code{org-latex-inactive-timestamp-format}
- code{:latex-inline-image-rules} code{org-latex-inline-image-rules}
- code{:latex-link-with-unknown-path-format} code{org-latex-link-with-unknown-path-format}
- code{:latex-listings-langs} code{org-latex-listings-langs}
- code{:latex-listings-options} code{org-latex-listings-options}
- code{:latex-listings} code{org-latex-listings}
- code{:latex-minted-langs} code{org-latex-minted-langs}
- code{:latex-minted-options} code{org-latex-minted-options}
- code{:latex-prefer-user-labels} code{org-latex-prefer-user-labels}
- code{:latex-subtitle-format} code{org-latex-subtitle-format}
- code{:latex-subtitle-separate} code{org-latex-subtitle-separate}
- code{:latex-table-scientific-notation} code{org-latex-table-scientific-notation}
- code{:latex-tables-booktabs} code{org-latex-tables-booktabs}
- code{:latex-tables-centered} code{org-latex-tables-centered}
- code{:latex-text-markup-alist} code{org-latex-text-markup-alist}
- code{:latex-title-command} code{org-latex-title-command}
- code{:latex-toc-command} code{org-latex-toc-command}
- subsubheading Markdown specific properties
- code{:md-footnotes-section}} {
- item tab
- item tab
- item tab
- end multitable
- multitable {code{org-odt-format-inlinetask-function}}
- code{:odt-content-template-file} code{org-odt-content-template-file}
- code{:odt-display-outline-level} code{org-odt-display-outline-level}
- code{:odt-fontify-srcblocks} code{org-odt-fontify-srcblocks}
- code{:odt-format-drawer-function} code{org-odt-format-drawer-function}
- code{:odt-format-headline-function} code{org-odt-format-headline-function}
- code{:odt-format-inlinetask-function} code{org-odt-format-inlinetask-function}
- code{:odt-inline-formula-rules} code{org-odt-inline-formula-rules}
- code{:odt-inline-image-rules} code{org-odt-inline-image-rules}
- code{:odt-pixels-per-inch} code{org-odt-pixels-per-inch}
- code{:odt-styles-file} code{org-odt-styles-file}
- code{:odt-table-styles} code{org-odt-table-styles}
- code{:odt-use-date-fields} code{org-odt-use-date-fields}
- subsubheading Texinfo specific properties
- code{:texinfo-link-with-unknown-path-format}} {
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- end multitable
- subsection Links between published files
- samp{[[file:foo.org][The foo]]} or simply
- pxref{External links}). When published, this link becomes a link to
- code{http:} link instead of a code{file:} links
- are converted to link to the corresponding
- ref{Complex example}, for
- an example of this usage.
- Eventually, links between published documents can contain some search options
- (
- file{foo.html}.
- end example
- subsection Generating a sitemap
- multitable
- item
- tab When non-code{org-publish-current-project}
- or
- item
- tab Filename for output of sitemap. Defaults to
- file{sitemap.html}).
- code{:sitemap-title}
- item
- tab With this option one can tell how a site-map entry is formatted in the
- site-map. It is a function called with three arguments: the file or
- directory name relative to base directory of the project, the site-map style
- and the current project. It is expected to return a string. Default value
- turns file names into links and use document titles as descriptions. For
- specific formatting needs, one can use
- code{org-publish-find-title} and
- item
- tab Plug-in function to use for generation of the sitemap. It is called
- with two arguments: the title of the site-map and a representation of the
- files and directories involved in the project as a radio list (
- code{org-list-to-generic},
- item
- tab Where folders should appear in the sitemap. Set this to
- code{last} to display folders first or last, respectively.
- When set to
- code{tree}.
- code{:sitemap-sort-files}
- code{alphabetically} (default),
- code{anti-chronologically}.
- code{anti-chronologically} sorts the files with newer
- date first.
- code{org-publish-find-date}.
- code{:sitemap-ignore-case}
- code{nil}.
- code{:sitemap-date-format}
- code{format-time-string} function that tells how
- a sitemap entry's date is to be formatted. This property bypasses
- code{%Y-%m-%d}.
- node Generating an index
- cindex index, in a publishing project
- Org mode can generate an index across the files of a publishing project.
- columnfractions 0.25 0.75
- code{:makeindex}
- code{nil}, generate in index in the file
- file{theindex.html}.
- code{:makeindex} set. The file only contains a statement
- cindex #+INDEX
- Index entries are specified with
- example
- * Curriculum Vitae
- #+INDEX: CV
- #+INDEX: Application!CV
- node Uploading files
- cindex rsync
- command{rsync} or
- i{remote} publishing facilities of Org mode which rely heavily on
- Tramp. Tramp, while very useful and powerful, tends not to be
- so efficient for multiple file transfer and has been known to cause problems
- under heavy usage.
- Specialized synchronization utilities offer several advantages. In addition
- to timestamp comparison, they also do content and permissions/attribute
- checks. For this reason you might prefer to publish your web to a local
- directory (possibly even
- file{unison} or
- code{org-publish} and let the synchronization tool do the rest.
- You do not need, in this scenario, to include attachments such as
- file{css} or
- code{org-publish-use-timestamps-flag} to
- code{#+INCLUDE:}. The timestamp mechanism in
- Org is not smart enough to detect if included files have been modified.
- section Sample configuration
- Below we provide two example configurations. The first one is a simple
- project publishing only a set of Org files. The second example is
- more complex, with a multi-component project.
- end menu
- subsection Example: simple publishing configuration
- This example publishes a set of Org files to the
- lisp
- (setq org-publish-project-alist
- '(("org"
- :base-directory "~/org/"
- :publishing-directory "~/public_html"
- :section-numbers nil
- :with-toc nil
- :html-head "<link rel=\"stylesheet\"
- href=\"../other/mystyle.css\"
- type=\"text/css\"/>")))
- node Complex example
- file{~/org} and your
- publishable images in
- c
- end example
- lisp
- (setq org-publish-project-alist
- '(("orgfiles"
- :base-directory "~/org/"
- :base-extension "org"
- :publishing-directory "/ssh:user@@host:~/html/notebook/"
- :publishing-function org-html-publish-to-html
- :exclude "PrivatePage.org" ;; regexp
- :headline-levels 3
- :section-numbers nil
- :with-toc nil
- :html-head "<link rel=\"stylesheet\"
- href=\"../other/mystyle.css\" type=\"text/css\"/>"
- :html-preamble t)
- ("images"
- :base-directory "~/images/"
- :base-extension "jpg\\|gif\\|png"
- :publishing-directory "/ssh:user@@host:~/html/images/"
- :publishing-function org-publish-attachment)
- ("other"
- :base-directory "~/other/"
- :base-extension "css\\|el"
- :publishing-directory "/ssh:user@@host:~/html/other/"
- :publishing-function org-publish-attachment)
- ("website" :components ("orgfiles" "images" "other"))))
- node Triggering publication
- table
- orgcmd{C-c C-e P x,org-publish}
- Prompt for a specific project and publish all files that belong to it.
- orgcmd{C-c C-e P f,org-publish-current-file}
- Publish only the current file.
- end table
- code{org-publish-use-timestamps-flag}.
- This may be necessary in particular if files include other files via
- code{#+INCLUDE:}.
- chapter Working with source code
- cindex Davison, Dan
- samp{src} code blocks are not restricted to the preamble or
- the end of an Org document; they can go anywhere---with a few exceptions,
- such as not inside comments and fixed width areas. Here's a sample
- example
- #+BEGIN_SRC emacs-lisp
- (defun org-xor (a b)
- "Exclusive or."
- (if a (not b) b))
- #+END_SRC
- samp{#+BEGIN_SRC} and
- samp{live code} blocks (as compared to the static text and
- documentation around it). Users can control how
- samp{src} code block type is one of many block types, such as quote,
- export, verse, latex, example, and verbatim. This section pertains to
- samp{#+BEGIN_SRC} and
- samp{src} code blocks, Org provides native Emacs major-modes.
- That leverages the latest Emacs features for that source code language mode.
- For exporting, Org can then extract
- dfn{tangling} in literate
- programming terminology).
- For publishing, Org's back-ends can handle the
- samp{src} code blocks, Org provides
- facilities that glue the tasks of compiling, collecting the results of the
- execution, and inserting them back to the Org file. Besides text output,
- results may include links to other data types that Emacs can handle: audio,
- video, and graphics.
- An important feature of Org's execution of the
- samp{src} blocks. Such
- interoperability uses a common syntax even if these
- samp{src} code block in the Org
- file. That should partly explain why this functionality by the original
- contributors, Eric Schulte and Dan Davison, was called
- samp{src} code blocks.
- Org mode fulfills the promise of easy verification and maintenance of
- publishing reproducible research by keeping all these in the same file: text,
- data, code, configuration settings of the execution environment, the results
- of the execution, and associated narratives, claims, references, and internal
- and external links.
- Details of Org's facilities for working with source code are shown next.
- end menu
- section Structure of code blocks
- cindex source code, block structure
- cindex #+BEGIN_SRC
- Org offers two ways to structure source code in Org documents: in a
- samp{src} block conforms to this structure:
- end example
- Org mode's templates system (
- samp{src} code blocks with just three keystrokes. Do not be put-off by
- having to remember the source block syntax. Org also works with other
- completion systems in Emacs, some of which predate Org and have custom
- domain-specific languages for defining templates. Regular use of templates
- reduces errors, increases accuracy, and maintains consistency.
- example
- src_<language>}
- example
- src_<language>[<header arguments>]}
- table
- item #+NAME: <name>
- Optional. Names the
- samp{src} blocks or inline blocks to evaluate or to capture the
- results. Code from other blocks, other files, and from table formulas
- (samp{src} block.
- This naming serves the same purpose as naming Org tables. Org mode requires
- unique names. For duplicate names, Org mode's behavior is undefined.
- item #+BEGIN_SRC
- code{#+BEGIN_SRC} line takes additional arguments, as described next.
- item <language>
- Mandatory for live code blocks. It is the identifier of the source code
- language in the block.
- cindex source code, language
- ref{Literal examples})
- item <header arguments>
- Optional. Heading arguments control many aspects of evaluation, export and
- tangling of code blocks (
- item source code, header arguments
- end table
- section Editing source code
- cindex source code, editing
- vindex org-edit-src-turn-on-auto-save
- kbd{C-c '} for editing the current code block. It opens a new major-mode
- edit buffer containing the body of the
- kbd{C-c '} again to close the buffer and return to the Org buffer.
- code{org-edit-src-auto-save-idle-delay} to save the base buffer after
- a certain idle delay time.
- Set
- code{auto-save-mode}.
- code{org-src-mode}
- minor mode remains active. It provides these customization variables as
- described below. For even more variables, look in the customization
- group
- table
- item org-src-lang-modes
- If an Emacs major-mode named code{<lang>}
- is the language identifier from code block's header line, then the edit
- buffer uses that major-mode. Use this variable to arbitrarily map language
- identifiers to major modes.
- item org-src-preserve-indentation
- code{nil}. Source code is indented. This indentation applies
- during export or tangling, and depending on the context, may alter leading
- spaces and tabs. When non-
- item org-src-ask-before-returning-to-edit-buffer
- When
- end table
- Set code{nil} to turn on native code
- fontification in the samp{src} code
- blocks can give visual separation of text and code on the display page. To
- further customize the appearance of
- code{org-src-block-faces}. The following example shades the
- background of regular blocks, and colors source blocks only for Python and
- Emacs-Lisp languages.
- end lisp
- section Exporting code blocks
- cindex source code, exporting
- Org can flexibly export just the
- emph{results} of evaluation of the code block,
- emph{none}. Org defaults to
- exporting
- code{ditaa}, Org defaults to
- pxref{Literal examples}. To selectively export sub-trees of
- an Org document,
- code{:exports} header arguments control exporting code blocks only and
- not inline code:
- table
- cindex
- item :exports code
- This is the default for most languages where the body of the code block is
- exported. See
- item :exports results
- On export, Org includes only the results and not the code block. After each
- evaluation, Org inserts the results after the end of code block in the Org
- buffer. By default, Org replaces any previous results. Org can also append
- results.
- item :exports none
- Org does not export the code block nor the results.
- vindex org-export-use-babel
- To stop Org from evaluating code blocks during export, set
- code{nil}.
- Turning off evaluation comes in handy when batch processing. For example,
- markup languages for wikis, which have a high risk of untrusted code.
- Stopping code block evaluation also stops evaluation of all header arguments
- of the code block. This may not be desirable in some circumstances. So
- during export, to allow evaluation of just the header arguments but not any
- code evaluation in the source block, set
- pxref{eval}).
- To evaluate just the inline code blocks, set
- code{inline-only}. Isolating the option to allow inline evaluations
- separate from
- pxref{Comment lines}). On the other hand, Org does evaluate code blocks in
- sub-trees excluded from export (
- node Extracting source code
- cindex tangling
- cindex code block, extracting source code
- Extracting source code from code blocks is a basic task in literate
- programming. Org has features to make this easy. In literate programming
- parlance, documents on creation are
- emph{tangled} for execution by a computer. Org
- facilitates weaving and tangling for producing, maintaining, sharing, and
- exporting literate programming documents. Org provides extensive
- customization options for extracting source code.
- When Org tangles
- emph{tangling} process, Org
- expands variables in the source code, and resolves any ``noweb'' style
- references (
- subsubheading Header arguments
- code
- code{:tangle}, src header argument
- samp{src} code block on export.
- samp{src} code block.
- end table
- subsubheading Functions
- code
- kbd{C-c C-v t}.
- With prefix argument only tangle the current
- item org-babel-tangle-file
- Choose a file to tangle. Bound to
- end table
- table
- item org-babel-post-tangle-hook
- This hook runs from within code tangled by
- end table
- code{org-babel-tangle-jump-to-org} function with two additional source code
- block header arguments: One, set pxref{padline}) to true
- (the default setting). Two, set pxref{comments}) to
- node Evaluating code blocks
- cindex code block, evaluating
- cindex #+RESULTS
- A note about security: With code evaluation comes the risk of harm. Org
- safeguards by prompting for user's permission before executing any code in
- the source block. To customize this safeguard (or disable it) see
- samp{src} code block evaluation and inserts
- them in the Org file, right after the
- code{#+RESULTS} label. Org creates the
- code{emacs-lisp}
- ref{Languages} for identifiers to enable other languages.
- samp{src} code blocks.
- kbd{C-c C-v e} with the point on a footnote{The option
- kbd{C-c C-c} key binding.} calls the
- cindex #+CALL
- By calling a named code block
- {
- code{#+KEYWORD:},
- samp{src} code
- blocks from the current Org mode buffer or from the ``Library of Babel''
- (code{#+CALL:}
- syntax is used, the result is wrapped based on the variable
- code{"=%s="}
- to produce verbatim text suitable for markup.
- The syntax for
- example
- #+CALL: <name>(<arguments>)
- #+CALL: <name>[<inside header arguments>](<arguments>) <end header arguments>
- example
- ... call_<name>(<arguments>) ...
- ... call_<name>[<inside header arguments>](<arguments>)[<end header arguments>] ...
- table
- item <name>
- This is the name of the code block to be evaluated (
- item <arguments>
- Org passes arguments to the code block using standard function call syntax.
- For example, a samp{4} to a code block named
- code{:var n=2}, would be
- written as
- item <inside header arguments>
- Org passes inside header arguments to the named
- code{[:results output]} collects results printed
- to
- item <end header arguments>
- End header arguments affect the results returned by the code block. For
- example, code{BEGIN_EXPORT html}
- block before inserting the results in the Org buffer.
- For more examples of header arguments for
- pxref{Arguments in function calls}.
- node Library of Babel
- cindex babel, library of
- cindex code block, library
- The ``Library of Babel'' is a collection of code blocks. Like a function
- library, these code blocks can be called from other Org files. This
- collection is in a repository file in Org mode format in the
- pxref{Evaluating code blocks}.
- samp{src} code blocks of an Org file, and then load the Org file with
- kbd{C-c C-v i}.
- section Languages
- cindex source code, languages
- samp{src} code blocks:
- columnfractions 0.25 0.25 0.25 0.25
- b{Language} b{Identifier} b{Language} b{Identifier}
- tab asymptote tab awk
- tab C tab C++
- tab clojure tab css
- tab d tab ditaa
- tab dot tab calc
- tab emacs-lisp tab fortran
- tab gnuplot tab haskell
- tab java tab js
- tab latex tab ledger
- tab lisp tab lilypond
- tab lua tab matlab
- tab mscgen tab ocaml
- tab octave tab org
- tab oz tab perl
- tab plantuml tab processing
- tab python tab R
- tab ruby tab sass
- tab scheme tab screen
- tab sed tab sh
- tab sql tab sqlite
- uref{http://orgmode.org/worg/org-contrib/babel/languages.html}.
- By default, only
- code{org-babel-load-languages}
- variable either through the Emacs customization interface, or by adding code
- to the init file as shown next:
- In this example, evaluation is disabled for
- code{R}.
- end lisp
- Note that this is not the only way to enable a language. Org also enables
- languages when loaded with
- code{clojure} code blocks:
- end lisp
- section Header arguments
- cindex source code, block header arguments
- Details of configuring header arguments are shown here.
- end menu
- subsection Using header arguments
- Since header arguments can be set in several ways, Org prioritizes them in
- case of overlaps or conflicts by giving local settings a higher priority.
- Header values in function calls, for example, override header values from
- global defaults.
- end menu
- subsubheading System-wide header arguments
- code{org-babel-default-header-args} variable:
- code{:session}, src header argument
- code{:results}, src header argument
- code{:exports}, src header argument
- code{:cache}, src header argument
- code{:noweb}, src header argument
- end example
- This example sets code{yes}, which makes
- Org expand
- lisp
- (setq org-babel-default-header-args
- (cons '(:noweb . "yes")
- (assq-delete-all :noweb org-babel-default-header-args)))
- node Language-specific header arguments
- code{org-babel-default-header-args:<lang>}, where
- uref{http://orgmode.org/worg/org-contrib/babel}.
- subsubheading Header arguments in Org mode properties
- For header arguments applicable to the buffer, use
- pxref{Property syntax}).
- The following example sets only for code{session},
- making all the
- code{results} to
- samp{R} code blocks; no results inserted for any block.
- end example
- pxref{Property syntax})
- apply at the sub-tree level on down. Since these property drawers can appear
- anywhere in the file hierarchy, Org uses outermost call or source block to
- resolve the values. Org ignores
- code{:cache} defaults to
- samp{sample header}.
- end example
- vindex org-babel-default-header-args
- Properties defined through
- kbd{C-c C-x p}, apply to all active languages. They override properties set
- in
- node Language-specific mode properties
- code{header-args:<lang>} where
- example
- * Heading
- :PROPERTIES:
- :header-args:clojure: :session *clojure-1*
- :header-args:R: :session *R*
- :END:
- ** Subheading
- :PROPERTIES:
- :header-args:clojure: :session *clojure-2*
- :END:
- samp{R} blocks. Blocks in Subheading
- inherit settings from Heading.
- subsubheading Code block specific header arguments
- Header arguments are most commonly set at the
- code{#+BEGIN_SRC} line. Arguments set at this level take precedence
- over those set in the
- code{results} to
- code{:exports} to
- samp{src} code block to HTML or
- example
- #+NAME: factorial
- #+BEGIN_SRC haskell :results silent :exports code :var n=0
- fac 0 = 1
- fac n = n * fac (n-1)
- #+END_SRC
- samp{src} code block:
- {fac 5
- end example
- Code block header arguments can span multiple lines using
- code{#+HEADER:} only as a convenience for backward-compatibility. It may be
- removed at some point.
- samp{src} code block:
- end example
- Multi-line header arguments on a named
- example
- #+NAME: named-block
- #+HEADER: :var data=2
- #+BEGIN_SRC emacs-lisp
- (message "data:%S" data)
- #+END_SRC
- #+RESULTS: named-block
- : data:2
- node Arguments in function calls
- code{#+CALL:} examples are shown below. For the complete syntax of
- ref{Evaluating code blocks}.
- In this example,
- code{#+CALL:} line.
- end example
- In this example,
- code{factorial} code block.
- end example
- subsection Specific header arguments
- Org comes with many header arguments common to all languages. New header
- arguments are added for specific languages as they become available for use
- in
- menu
- * var:: Pass arguments to
- end menu
- For language-specific header arguments, see
- node var
- code{:var}
- code{:var}, src header argument
- Use samp{src} code blocks. The
- specifics of variables in
- code{:var}, however, is the same for all languages. This includes declaring
- a variable, and assigning a default value.
- Arguments can take values as literals, or as references, or even as Emacs
- Lisp code (
- code{#+NAME:} or
- code{#+BEGIN_EXAMPLE} blocks,
- other types of
- samp{src} code blocks.
- For better performance, Org can cache results of evaluations. But caching
- comes with severe limitations (
- pxref{var, Indexable variable
- values}).
- The following syntax is used to pass arguments to
- code{:var} header argument.
- end example
- The samp{"string"}, a
- number
- table
- item table
- an Org mode table named with either a
- example
- #+NAME: example-table
- | 1 |
- | 2 |
- | 3 |
- | 4 |
- #+NAME: table-length
- #+BEGIN_SRC emacs-lisp :var table=example-table
- (length table)
- #+END_SRC
- #+RESULTS: table-length
- : 4
- item list
- a simple list named with a
- example
- #+NAME: example-list
- - simple
- - not
- - nested
- - list
- #+BEGIN_SRC emacs-lisp :var x=example-list
- (print x)
- #+END_SRC
- #+RESULTS:
- | simple | list |
- item code block without arguments
- a code block name (from the example above), as assigned by
- example
- #+BEGIN_SRC emacs-lisp :var length=table-length()
- (* 2 length)
- #+END_SRC
- #+RESULTS:
- : 8
- item code block with arguments
- a code{#+NAME:}, followed by
- parentheses and optional arguments passed within the parentheses following
- the
- example
- #+NAME: double
- #+BEGIN_SRC emacs-lisp :var input=8
- (* 2 input)
- #+END_SRC
- #+RESULTS: double
- : 16
- #+NAME: squared
- #+BEGIN_SRC emacs-lisp :var input=double(input=2)
- (* input input)
- #+END_SRC
- #+RESULTS: squared
- : 4
- item literal example
- a literal example block named with a
- example
- #+NAME: literal-example
- #+BEGIN_EXAMPLE
- A literal example
- on two lines
- #+END_EXAMPLE
- #+NAME: read-literal-example
- #+BEGIN_SRC emacs-lisp :var x=literal-example
- (concatenate 'string x " for you.")
- #+END_SRC
- #+RESULTS: read-literal-example
- : A literal example
- : on two lines for you.
- end table
- code{,}s then each subsequent section will index as
- the next dimension. Note that this indexing occurs
- code{:hlines},
- code{:rownames}. The following example assigns the
- last cell of the first row the table
- code{data}:
- end example
- Ranges of variable values can be referenced using two integers separated by a
- code{example-table}
- to
- example
- #+NAME: example-table
- | 1 | a |
- | 2 | b |
- | 3 | c |
- | 4 | d |
- | 5 | 3 |
- #+BEGIN_SRC emacs-lisp :var data=example-table[1:3]
- data
- #+END_SRC
- #+RESULTS:
- | 2 | b |
- | 3 | c |
- | 4 | d |
- code{*}.
- example
- #+NAME: example-table
- | 1 | a |
- | 2 | b |
- | 3 | c |
- | 4 | d |
- #+BEGIN_SRC emacs-lisp :var data=example-table[,0]
- data
- #+END_SRC
- #+RESULTS:
- | 1 | 2 | 3 | 4 |
- example
- #+NAME: 3D
- #+BEGIN_SRC emacs-lisp
- '(((1 2 3) (4 5 6) (7 8 9))
- ((10 11 12) (13 14 15) (16 17 18))
- ((19 20 21) (22 23 24) (25 26 27)))
- #+END_SRC
- #+BEGIN_SRC emacs-lisp :var data=3D[1,,1]
- data
- #+END_SRC
- #+RESULTS:
- | 11 | 14 | 17 |
- subsubheading Emacs Lisp evaluation of variables
- Emacs lisp code can set the values for variables. To differentiate a value
- from lisp code, Org interprets any value starting with code{[},
- code{`} as Emacs Lisp code. The result of evaluating that code
- is then assigned to the value of that variable. The following example shows
- how to reliably query and pass file name of the Org mode buffer to a code
- block using headers. We need reliability here because the file's name could
- change once the code in the block starts executing.
- end example
- Note that values read from tables and lists will not be mistakenly evaluated
- as Emacs Lisp code, as illustrated in the following example.
- end example
- subsubsection
- cindex
- code{:results} header arguments. Each
- itemize
- item
- samp{src}
- code block
- b{type} for which type of result the code block will return; affects how Org
- processes and inserts results in the Org buffer
- b{format} for the result; affects how Org processes and inserts results in
- the Org buffer
- b{handling} for processing results after evaluation of the
- end itemize
- itemize
- item
- samp{src} code block. Languages like Python may require an
- explicit samp{src} code block. Usage
- example:
- item
- samp{src} code block. Usage example:
- end itemize
- itemize
- item code{vector}
- Interpret the results as an Org table. If the result is a single value,
- create a table with one row and one column. Usage example:
- item
- item code{verbatim}
- Interpret literally and insert as quoted text. Do not create a table. Usage
- example:
- item
- code{:results value file}.
- subsubheading Format
- Format pertains to the type of the result returned by the
- itemize
- item
- code{:results value raw}.
- code{org}
- Results enclosed in a
- kbd{TAB} in the block, or export the file. Usage example:
- item
- code{BEGIN_EXPORT html} block. Usage example:
- item
- code{BEGIN_EXPORT latex} block. Usage example:
- item
- samp{src} code block. Useful for parsing. Usage
- example:
- item
- samp{src} code
- block. Languages supported: Emacs Lisp, Python, and Ruby. Usage example:
- item
- code{raw} or
- code{:results value drawer}.
- subsubheading Handling
- Handling options after collecting the results.
- bullet
- code{silent}
- Do not insert results in the Org mode buffer, but echo them in the
- minibuffer. Usage example:
- item
- code{:results output replace}.
- code{append}
- Append results to the Org buffer. Latest results are at the bottom. Does
- not remove previous results. Usage example:
- item
- code{:results output prepend}.
- node file
- code{:file}
- code{:file}, src header argument
- An external
- code{:file} is either a file name or two strings, where the
- first is the file name and the second is the description. A link to the file
- is inserted. It uses an Org mode style pxref{Link
- format}). Some languages, such as samp{dot},
- samp{gnuplot}, automatically wrap the source code in additional boilerplate
- code. Such code wrapping helps recreate the output, especially graphics
- output, by executing just the
- node file-desc
- code{:file-desc}
- A description of the results file. Org uses this description for the link
- (see code{:file-desc}
- has no value, Org will use file name for both the ``link'' and the
- ``description'' portion of the Org mode link.
- subsubsection
- cindex
- code{:file-ext},
- ref{output-dir} header argument. To override this
- auto generated file name, use the
- node output-dir
- code{:output-dir}
- code{:output-dir}, src header argument
- Specifies the
- code{/}) or a relative directory (without
- code{#+NAME:} of the source block
- and ref{file-ext} header arguments.
- subsubsection
- cindex
- code{:file} header argument can be used to specify the path to the
- output file, samp{src}
- code block execution. If it is absent, then the directory associated with
- the current buffer is used. In other words, supplying
- kbd{M-x cd path RET}, and then not supplying
- code{:dir} simply sets the value of the Emacs variable
- code{:dir}, relative paths (for example,
- code{:file results/myfile.jpg}) become relative to the default directory.
- For example, to save the plot file in the
- example
- #+BEGIN_SRC R :file myplot.png :dir ~/Work
- matplot(matrix(rnorm(100), 10), type="l")
- #+END_SRC
- subsubheading Remote execution
- To evaluate the
- samp{Tramp} syntax. For example:
- end example
- Org first captures the text results as usual for insertion in the Org file.
- Then Org also inserts a link to the remote file, thanks to Emacs
- code{:dir} and
- example
- [[file:/scp:dandyakuba.princeton.edu:/home/dand/plot.png][plot.png]]
- subsubheading Some more warnings
- bullet
- code{:dir} is used with
- item
- Do not use code{:exports results} or with
- code{default directory} to avoid some underlying
- portability issues.
- node exports
- code{:exports}
- code{:exports}, src header argument
- The
- LaTeX{} formats. Note that
- samp{src} code blocks and not inline code.
- bullet
- code{code}
- The default. The body of code is included into the exported file. Example:
- item
- code{:exports results}.
- code{both}
- Both the code and results of evaluation are included in the exported file.
- Example:
- item
- code{:exports none}.
- node tangle
- code{:tangle}
- code{:tangle}, src header argument
- The samp{src} code block is
- exported to source file(s).
- bullet
- code{tangle}
- Export the
- code{:tangle
- yes}.
- code{no}
- The default. Do not extract the code a source code file. Example:
- item other
- Export the
- code{:tangle} header argument. Org derives
- the file name as being relative to the directory of the Org file's location.
- Example:
- end itemize
- subsubsection
- cindex
- code{:mkdirp} header argument creates parent directories for tangled
- files if the directory does not exist.
- code{no} inhibits directory creation.
- subsubsection
- cindex
- samp{src} code block.
- bullet
- code{no}
- The default. Do not insert any extra comments during tangling.
- code{link}
- Wrap the
- item
- item
- item
- item
- samp{src} code block.
- node padline
- code{:padline}
- code{:padline}, src header argument
- Control insertion of newlines to pad
- itemize
- item
- samp{src} code block in the
- tangled file.
- code{no}
- Do not insert newlines to pad the tangled
- end itemize
- subsubsection
- cindex
- samp{src} code blocks during tangling. The
- code{org-babel-expand-src-block} also assigns
- values to pxref{var}) variables. Expansions also replace
- ``noweb'' references with their targets (
- samp{src} code blocks for execution have to be expanded
- anyway.
- subsubsection
- cindex
- code{:session} header argument is for running multiple source code
- blocks under one session. Org runs
- itemize
- item
- samp{src} code block gets a new interpreter process to
- execute. The process terminates once the block is evaluated.
- code{other}
- Any string besides
- code{:session mysession} names it
- code{:session} has no argument, then the session name is derived from the
- source language identifier. Subsequent blocks with the same source code
- language use the same session. Depending on the language, state variables,
- code from other blocks, and the overall interpreted environment may be
- shared. Some interpreted languages support concurrent sessions when
- subsequent source code language blocks change session names.
- node noweb
- code{:noweb}
- code{:noweb}, src header argument
- The
- pxref{Noweb reference syntax}). Expansions occur when source
- code blocks are evaluated, tangled, or exported.
- bullet
- code{no}
- Default. No expansion of ``Noweb'' syntax references in the body of the code
- when evaluating, tangling, or exporting.
- code{yes}
- Expansion of ``Noweb'' syntax references in the body of the
- item
- samp{src} code
- block when tangling. No expansion when evaluating or exporting.
- code{no-export}
- Expansion of ``Noweb'' syntax references in the body of the
- item
- samp{src} code
- block when expanding prior to evaluating or tangling. Removes ``noweb''
- syntax references when exporting.
- code{eval}
- Expansion of ``Noweb'' syntax references in the body of the
- end itemize
- code{<<reference>>}. This behavior is illustrated in the following example.
- Because the
- samp{src} code block:
- end example
- expands to:
- end example
- Since this change will not affect noweb replacement text without newlines in
- them, inline noweb references are acceptable.
- subsubsection
- cindex
- samp{src} code
- blocks by matching the reference name to either the block name or the
- code{:noweb-ref} header argument at the
- sub-tree or file level. In the example Org file shown next, the body of the
- source code in each block is extracted for concatenation to a pure code
- file
- code{noweb-ref},
- example
- #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh
- <<fullest-disk>>
- #+END_SRC
- * the mount point of the fullest disk
- :PROPERTIES:
- :noweb-ref: fullest-disk
- :END:
- ** query all mounted disks
- #+BEGIN_SRC sh
- df \
- #+END_SRC
- ** strip the header row
- #+BEGIN_SRC sh
- |sed '1d' \
- #+END_SRC
- ** sort by the percent full
- #+BEGIN_SRC sh
- |awk '}'|sort -n |tail -1 \
- #+END_SRC
- ** extract the mount point
- #+BEGIN_SRC sh
- |awk '}'
- #+END_SRC
- node noweb-sep
- code{:noweb-sep}
- code{:noweb-sep}, src header argument
- By default a newline separates each noweb reference concatenation. To change
- this newline separator, edit the pxref{noweb-sep}) header
- argument.
- subsubsection
- cindex
- code{:cache} header argument is for caching results of evaluating code
- blocks. Caching results can avoid re-evaluating
- code{:var} references) nor the text of the block itself has changed since
- the result was last computed. This feature greatly helps avoid long-running
- calculations. For some edge cases, however, the cached results may not be
- reliable.
- The caching feature is best for when
- pxref{var}), and that do not have side effects, and do not rely on external
- variables other than the input arguments. Functions that depend on a timer,
- file system objects, and random number generators are clearly unsuitable for
- caching.
- A note of warning: when code{:session}, caching
- may cause unexpected results.
- When the caching mechanism tests for any source code changes, it will not
- expand ``noweb'' style references (
- uref{http://thread.gmane.org/gmane.emacs.orgmode/79046}.
- The code{yes} or
- itemize
- item
- samp{src} code block evaluated every time.
- code{yes}
- Whether to run the code or return the cached results is determined by
- comparing the SHA1 hash value of the combined
- code{#+RESULTS:}
- line from previous evaluation. When hash values match, Org does not evaluate
- the
- samp{src} code block, inserts the results, recalculates the hash value, and
- updates
- end itemize
- In this example, both functions are cached. But
- code{random} has changed since the last run.
- end example
- subsubsection
- cindex
- code{:sep} header argument is the delimiter for saving results as tables
- to files (
- code{org-open-at-point}, which is bound to
- code{:sep} for opening tabular results.
- subsubsection
- cindex
- code{:hlines}
- argument with the value
- code{no}.
- bullet
- code{no}
- Strips horizontal lines from the input table. For most code, this is
- desirable, or else those
- code{:hlines no}. The example shows hlines removed from the
- input table.
- end example
- code{yes}
- For
- example
- #+NAME: many-cols
- | a | b | c |
- |---+---+---|
- | d | e | f |
- |---+---+---|
- | g | h | i |
- #+NAME: echo-table
- #+BEGIN_SRC python :var tab=many-cols :hlines yes
- return tab
- #+END_SRC
- #+RESULTS: echo-table
- | a | b | c |
- |---+---+---|
- | d | e | f |
- |---+---+---|
- | g | h | i |
- end itemize
- subsubsection
- cindex
- code{:colnames} header argument accepts code{no}, or
- code{nil}, which is unassigned.
- But this header argument behaves differently depending on the source code
- language.
- bullet
- code{nil}
- If an input table has column names (because the second row is an hline), then
- Org removes the column names, processes the table, puts back the column
- names, and then writes the table to the results block.
- end example
- Note that column names have to accounted for when using variable indexing
- (
- item
- item
- code{nil}
- value. That is, Org removes the column names, processes the table, puts back
- the column names, and then writes the table to the results block.
- node rownames
- code{:rownames}
- code{:rownames}, src header argument
- The code{yes} or
- code{no}. Note that
- code{:rownames} header argument because of the ease of
- table-handling in Emacs.
- bullet
- code{no}
- Org will not pre-process row names.
- code{yes}
- If an input table has row names, then Org removes the row names, processes
- the table, puts back the row names, and then writes the table to the results
- block.
- end example
- Note that row names have to accounted for when using variable indexing
- (
- end itemize
- subsubsection
- cindex
- code{:shebang} header argument to a string value (for example,
- samp{src} code block is extracted to. Org then
- turns on the tangled file's executable permission.
- subsubsection
- cindex
- code{tangle-mode} header argument specifies what permissions to set for
- tangled files by
- code{:tangle-mode (identity #o444)}. To make it
- executable, use
- samp{src} code blocks with pxref{shebang}) header
- argument, Org will automatically set the tangled file to executable
- permissions. But this can be overridden with custom permissions using
- samp{src} code blocks tangle to a single file with different
- and conflicting
- node eval
- code{:eval}
- code{:eval}, src header argument
- The
- samp{src}
- code blocks by prompting for a confirmation. This protection is independent
- of the
- table
- item never or no
- Org will never evaluate this
- item query
- Org prompts the user for permission to evaluate this
- item never-export or no-export
- Org will not evaluate this
- item query-export
- Org prompts the user for permission to export this
- end table
- If
- code{org-confirm-babel-evaluate}
- variable (
- node wrap
- code{:wrap}
- code{:wrap}, src header argument
- The
- code{#+BEGIN_} and
- code{#+BEGIN/END_RESULTS} block.
- subsubsection
- cindex
- code{:post} header argument is for post-processing results from
- code{:post} has any value, Org binds the
- results to ref{var} header
- argument specifications. That makes results available to other
- code{:post} header argument in action.
- The first one shows how to attach
- code{:post}.
- {
- a -> b;
- b -> c;
- c -> a;
-
- end example
- The second example shows use of code{:post} to pass
- data between
- example
- #+name: round-tbl
- #+begin_src emacs-lisp :var tbl="" fmt="%.3f"
- (mapcar (lambda (row)
- (mapcar (lambda (cell)
- (if (numberp cell)
- (format fmt cell)
- cell))
- row))
- tbl)
- #+end_src
- #+begin_src R :colnames yes :post round-tbl[:colnames yes](*this*)
- set.seed(42)
- data.frame(foo=rnorm(1))
- #+end_src
- #+RESULTS:
- | foo |
- |-------|
- | 1.371 |
- node prologue
- code{:prologue}
- code{:prologue}, src header argument
- The
- samp{src} code block. A samp{gnuplot}:
- ref{epilogue}.
- end lisp
- subsubsection
- cindex
- code{epilogue} header argument is for appending to the end
- of the code block for execution. See also
- node Results of evaluation
- cindex code block, results of evaluation
- ref{results}.
- The primary determinant is the execution context. Is it in a
- code{:results
- value} or
- samp{src} code block's evaluation.
- columnfractions 0.26 0.33 0.41
- tab tab
- item tab value of last expression
- item tab contents of STDOUT
- end multitable
- For code{:results value} turns the
- results into an Org mode table format. Single values are wrapped in a one
- dimensional vector. Rows and columns of a table are wrapped in a
- two-dimensional vector.
- subsubsection
- cindex
- samp{src} block. That is why when using
- code{return} statement is mandatory when
- using
- subsubsection
- cindex
- code{:results output}, the code is passed to an external process running
- the interpreter. Org returns the contents of the standard output stream as
- as text results.
- subsubsection
- cindex
- code{:results value} from a
- samp{C} and
- samp{Python} and
- samp{src} code blocks running in a
- code{_} in samp{Ruby}, and the
- value of samp{R}).
- code{:results output}
- code{:results}, src header argument
- For
- code{STDOUT} of a
- non-interactive interpreter running as an external process. Compare for
- example these two blocks:
- end example
- In the above non-session mode, the ``2'' is not printed; so does not appear
- in results.
- end example
- In the above
- node Noweb reference syntax
- cindex code block, noweb reference
- cindex source code, noweb reference
- Org supports named blocks in ``noweb'' style syntax. For ``noweb'' literate
- programming details, see
- example
- <<code-block-name>>
- code{:noweb yes}, Org expands ``noweb'' style
- references in the
- code{:noweb no}, Org does not expand ``noweb'' style
- references in the
- code{:noweb no}.
- Org offers a more flexible way to resolve ``noweb'' style references
- (
- emph{results} block, rather than the body of the
- example
- <<code-block-name(optional arguments)>>
- code{:noweb no} so as not to cause errors in languages
- such as
- code{<<arg>>}. Change Org's default to
- code{org-babel-use-quick-and-dirty-noweb-expansion} variable to
- code{:noweb-ref} header argument.
- section Key bindings and useful functions
- multitable
- kindex C-c C-c
- kbd{C-c C-c} code{org-babel-execute-src-block}
- item tab
- kindex M-up
- kbd{M-tab
- kindex M-down
- kbd{M-tab
- end multitable
- Active key bindings in Org mode buffer:
- columnfractions 0.45 0.55
- kindex C-c C-v C-p
- kbd{C-c C-v p} kbd{C-c C-v C-p} code{org-babel-previous-src-block}
- kindex C-c C-v C-n
- kbd{C-c C-v n} kbd{C-c C-v C-n} code{org-babel-next-src-block}
- kindex C-c C-v C-e
- kbd{C-c C-v e} kbd{C-c C-v C-e} code{org-babel-execute-maybe}
- kindex C-c C-v C-o
- kbd{C-c C-v o} kbd{C-c C-v C-o} code{org-babel-open-src-block-result}
- kindex C-c C-v C-v
- kbd{C-c C-v v} kbd{C-c C-v C-v} code{org-babel-expand-src-block}
- kindex C-c C-v C-u
- kbd{C-c C-v u} kbd{C-c C-v C-u} code{org-babel-goto-src-block-head}
- kindex C-c C-v C-g
- kbd{C-c C-v g} kbd{C-c C-v C-g} code{org-babel-goto-named-src-block}
- kindex C-c C-v C-r
- kbd{C-c C-v r} kbd{C-c C-v C-r} code{org-babel-goto-named-result}
- kindex C-c C-v C-b
- kbd{C-c C-v b} kbd{C-c C-v C-b} code{org-babel-execute-buffer}
- kindex C-c C-v C-s
- kbd{C-c C-v s} kbd{C-c C-v C-s} code{org-babel-execute-subtree}
- kindex C-c C-v C-d
- kbd{C-c C-v d} kbd{C-c C-v C-d} code{org-babel-demarcate-block}
- kindex C-c C-v C-t
- kbd{C-c C-v t} kbd{C-c C-v C-t} code{org-babel-tangle}
- kindex C-c C-v C-f
- kbd{C-c C-v f} kbd{C-c C-v C-f} code{org-babel-tangle-file}
- kindex C-c C-v C-c
- kbd{C-c C-v c} kbd{C-c C-v C-c} code{org-babel-check-src-block}
- kindex C-c C-v C-j
- kbd{C-c C-v j} kbd{C-c C-v C-j} code{org-babel-insert-header-arg}
- kindex C-c C-v C-l
- kbd{C-c C-v l} kbd{C-c C-v C-l} code{org-babel-load-in-session}
- kindex C-c C-v C-i
- kbd{C-c C-v i} kbd{C-c C-v C-i} code{org-babel-lob-ingest}
- kindex C-c C-v C-I
- kbd{C-c C-v I} kbd{C-c C-v C-I} code{org-babel-view-src-block-info}
- kindex C-c C-v C-z
- kbd{C-c C-v z} kbd{C-c C-v C-z} code{org-babel-switch-to-session-with-code}
- kindex C-c C-v C-a
- kbd{C-c C-v a} kbd{C-c C-v C-a} code{org-babel-sha1-hash}
- kindex C-c C-v C-h
- kbd{C-c C-v h} kbd{C-c C-v C-h} code{org-babel-describe-bindings}
- kindex C-c C-v C-x
- kbd{C-c C-v x} kbd{C-c C-v C-x} code{org-babel-do-key-sequence-in-edit-buffer}
- c Extended key bindings when control key is kept pressed:
- multitable
- c kbd{C-c C-v C-a} code{org-babel-sha1-hash}
- item tab
- c kbd{C-c C-v C-f} code{org-babel-tangle-file}
- item tab
- c kbd{C-c C-v C-p} code{org-babel-expand-src-block}
- item tab
- c kbd{C-c C-v C-t} code{org-babel-tangle}
- item tab
- c
- node Batch execution
- cindex code block, batch execution
- code{org-babel-tangle}.
- end example
- chapter Miscellaneous
- end menu
- section Completion
- TeX{} symbols
- cindex completion, of dictionary words
- cindex completion, of tags
- cindex completion, of link abbreviations
- TeX{} symbol completion
- cindex dictionary word completion
- cindex tag completion
- table
- kindex M-
- item M-
- itemize
- item
- At the beginning of a headline, complete TODO keywords.
- samp{\}, complete
- item
- After
- samp{[[*find this headline]]}.
- samp{:} in a headline, complete tags. The list of tags is taken
- from the variable
- samp{#+TAGS} in-buffer option,
- item
- After
- item
- After pxref{Link abbreviations}).
- samp{#+}, complete the special keywords like
- samp{OPTIONS}. After option keyword is complete, pressing
- key{TAB}} again will insert example settings for that option.
- samp{#+STARTUP: }, complete startup keywords.
- end itemize
- node Easy templates
- cindex template insertion
- code{#+BEGIN_SRC} and
- file{yasnippet} and other Emacs template expansion packages.
- key{<}} key{s}} key{TAB}} completes the
- kbd{<} kbd{
- multitable
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- item tab
- end multitable
- More templates can added by customizing the variable
- node Speed keys
- cindex speed keys
- vindex org-speed-commands-user
- Single keystrokes can execute custom commands in an Org file when the cursor
- is on a headline. Without the extra burden of a meta or modifier key, Speed
- Keys can speed navigation or execute custom commands. Besides faster
- navigation, Speed Keys may come in handy on small mobile devices that do not
- have full keyboards. Speed Keys may also work on TTY devices known for their
- problems when entering Emacs keychords.
- By default, Org has Speed Keys disabled. To activate Speed Keys, configure
- the variable
- kbd{?} shows currently
- active Speed Keys. To add or modify Speed Keys, customize the variable,
- node Code evaluation security
- samp{src} code block,
- in terms of risk, is equivalent to an executable file. Org therefore puts a
- few confirmation prompts by default. This is to alert the casual user from
- accidentally running untrusted code.
- For users who do not run code blocks or write code regularly, Org's default
- settings should suffice. However, some users may want to tweak the prompts
- for fewer interruptions. To weigh the risks of automatic execution of code
- blocks, here are some details about code evaluation.
- Org evaluates code in the following circumstances:
- i
- samp{src} code blocks in an Org file during export. Org also
- evaluates a kbd{C-c C-c} key chord. Users
- exporting or running code blocks must load files only from trusted sources.
- Be weary of customizing variables that remove or alter default security
- measures.
- code{t}, Org prompts the user for confirmation before executing each
- code block. When
- code{t} or
- end defopt
- For example, this function enables execution of
- lisp
- (defun my-org-confirm-babel-evaluate (lang body)
- (not (string= lang "ditaa"))) ; don't ask for ditaa
- (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
- item Following code{elisp} links
- Org has two link types that can also directly evaluate code (
- defopt org-confirm-shell-link-function
- Function that prompts the user before executing a shell link.
- defopt org-confirm-elisp-link-function
- Function that prompts the user before executing an Emacs Lisp link.
- item Formulas in tables
- Org executes formulas in tables (
- emph{calc} or the
- end table
- section Customization
- cindex options, for customization
- kbd{M-x org-customize RET} command. Or through the Org
- menu,
- pxref{In-buffer settings}).
- section Summary of in-buffer settings
- cindex special keywords
- In-buffer settings start with
- kbd{C-c C-c} activates any changes to the in-buffer settings. Closing and
- reopening the Org file in Emacs also activates the changes.
- table
- item #+ARCHIVE: %s_done::
- Sets the archive location of the agenda file. This location applies to the
- lines until the next
- code{org-archive-location}.
- item #+COLUMNS: %25ITEM ...
- code{COLUMNS} property.
- vindex org-table-formula-constants
- code{org-table-formula-constants-local}. The global
- version of this variable is
- item #+FILETAGS: :tag1:tag2:tag3:
- Set tags that all entries in the file will inherit from here, including the
- top-level entries.
- vindex org-link-abbrev-alist
- Each line specifies one abbreviation for one link. Use multiple
- pxref{Link abbreviations}. The corresponding
- variable is
- item #+PRIORITIES: highest lowest default
- vindex org-lowest-priority
- item #+PROPERTY: Property_Name Value
- This line sets a default inheritance value for entries in the current
- buffer, most useful for specifying the allowed values of a property.
- item #+SETUPFILE: file
- The setup file is for additional in-buffer settings. Org loads this file and
- parses it for any settings in it only when Org opens the main file.
- kbd{C-c '} while the cursor is on the line with the file
- name.
- cindex #+STARTUP
- Startup options Org uses when first visiting a file.
- The first set of options deals with the initial visibility of the outline
- tree. The corresponding variable for global default settings is
- code{t}, which is the same
- as
- vindex org-startup-folded
- code{overview}, STARTUP keyword
- code{content}, STARTUP keyword
- code{showall}, STARTUP keyword
- code{showeverything}, STARTUP keyword
- r{top-level headlines only}
- content
- r{no folding of any entries}
- showeverything
- end example
- cindex
- cindex
- code{org-startup-indented}
- r{start with
- r{start with
- end example
- code{org-startup-align-all-tables} with
- cindex
- cindex
- example
- align
- r{don't align tables on startup}
- vindex org-startup-with-inline-images
- Whether Org should automatically display inline images. The corresponding
- variable is
- code{nil} to avoid delays when visiting a file.
- code{inlineimages}, STARTUP keyword
- code{noinlineimages}, STARTUP keyword
- r{show inline images}
- noinlineimages
- end example
- LaTeX{} fragments to images. The
- variable
- code{nil} by default to avoid startup delays.
- code{latexpreview}, STARTUP keyword
- code{nolatexpreview}, STARTUP keyword
- r{preview
- r{don't preview
- end example
- vindex org-log-note-clock-out
- code{org-log-done},
- code{org-log-repeat})
- code{logdone}, STARTUP keyword
- code{lognotedone}, STARTUP keyword
- code{nologdone}, STARTUP keyword
- code{lognoteclock-out}, STARTUP keyword
- code{nolognoteclock-out}, STARTUP keyword
- code{logrepeat}, STARTUP keyword
- code{lognoterepeat}, STARTUP keyword
- code{nologrepeat}, STARTUP keyword
- code{logreschedule}, STARTUP keyword
- code{lognotereschedule}, STARTUP keyword
- code{nologreschedule}, STARTUP keyword
- code{logredeadline}, STARTUP keyword
- code{lognoteredeadline}, STARTUP keyword
- code{nologredeadline}, STARTUP keyword
- code{logrefile}, STARTUP keyword
- code{lognoterefile}, STARTUP keyword
- code{nologrefile}, STARTUP keyword
- code{logdrawer}, STARTUP keyword
- code{nologdrawer}, STARTUP keyword
- code{logstatesreversed}, STARTUP keyword
- code{nologstatesreversed}, STARTUP keyword
- r{record a timestamp when an item is marked DONE}
- lognotedone
- r{don't record when items are marked DONE}
- logrepeat
- r{record a note when reinstating a repeating item}
- nologrepeat
- r{record a note when clocking out}
- nolognoteclock-out
- r{record a timestamp when scheduling time changes}
- lognotereschedule
- r{do not record when a scheduling date changes}
- logredeadline
- r{record a note when deadline changes}
- nologredeadline
- r{record a timestamp when refiling}
- lognoterefile
- r{do not record when refiling}
- logdrawer
- r{store log outside of drawer}
- logstatesreversed
- r{do not reverse the order of states notes}
- vindex org-hide-leading-stars
- code{org-hide-leading-stars} and
- code{nil}
- (meaning code{oddeven}).
- code{hidestars}, STARTUP keyword
- code{showstars}, STARTUP keyword
- code{odd}, STARTUP keyword
- code{even}, STARTUP keyword
- r{hide all stars on the headline except one.}
- showstars
- r{virtual indents according to the outline level}
- noindent
- r{show odd outline levels only (1,3,...)}
- oddeven
- end example
- vindex org-time-stamp-overlay-formats
- To turn on custom format overlays over timestamps (variables
- code{org-time-stamp-overlay-formats}), use
- code{customtime}, STARTUP keyword
- r{overlay custom time format}
- vindex constants-unit-system
- The following options influence the table spreadsheet (variable
- cindex
- cindex
- example
- constcgs file{constants.el} should use the c-g-s unit system}
- constSI file{constants.el} should use the SI unit system}
- vindex org-footnote-define-inline
- vindex org-footnote-auto-adjust
- For footnote settings, use the following keywords. The corresponding
- variables are
- code{org-footnote-auto-label}, and
- cindex
- cindex
- cindex
- cindex
- cindex
- cindex
- cindex
- cindex
- cindex
- example
- fninline
- r{define footnotes in separate section}
- fnlocal
- r{prompt for footnote labels}
- fnauto code{[fn:1]}-like labels automatically (default)}
- fnconfirm
- r{create
- r{automatically renumber and sort footnotes}
- nofnadjust
- end example
- code{org-hide-block-startup}.
- code{hideblocks}, STARTUP keyword
- code{nohideblocks}, STARTUP keyword
- r{Hide all begin/end blocks on startup}
- nohideblocks
- end example
- code{org-pretty-entities} and the keywords
- code{entitiespretty}, STARTUP keyword
- code{entitiesplain}, STARTUP keyword
- r{Show entities as UTF-8 characters where possible}
- entitiesplain
- end example
- vindex org-tag-alist
- These lines specify valid tags for this file. Org accepts multiple tags
- lines. Tags could correspond to the
- code{org-tag-alist}.
- item #+TBLFM:
- This line is for formulas for the table directly above. A table can have
- multiple
- samp{#+TBLFM:} line. For details see
- ref{Editing and debugging formulas}.
- itemx #+OPTIONS:, #+BIND:,
- ref{Export settings}.
- vindex org-todo-keywords
- These lines set the TODO keywords and their significance to the current file.
- The corresponding variable is
- end table
- section The very busy C-c C-c key
- cindex C-c C-c, overview
- The
- itemize
- item
- If any highlights shown in the buffer from the creation of a sparse tree, or
- from clock display, remove such highlights.
- code{#+KEYWORD} lines, scan the
- buffer for these lines and update the information.
- item
- If the cursor is on a
- item
- If the current buffer is a capture buffer, close the note and file it. With
- a prefix argument, also jump to the target location after saving the note.
- code{<<<target>>>}, update radio targets and
- corresponding links in this buffer.
- item
- If the cursor is at a footnote reference, go to the corresponding
- definition, and
- item
- If the cursor is on a statistics cookie, update it.
- item
- If the cursor is on a numbered item in a plain list, renumber the
- ordered list.
- code{#+BEGIN} line of a dynamic block, the
- block is updated.
- end itemize
- section A cleaner outline view
- cindex dynamic indentation
- cindex clean outline view
- Org's default outline with stars and no indents can become too cluttered for
- short documents. For
- example
- end group
- noindent
- To turn this mode on, use the minor mode,
- footnote{The
- code{wrap-prefix} correctly for indenting and wrapping long lines of
- headlines or text. This minor mode handles
- code{word-wrap}.}.
- To make more horizontal space, the headlines are shifted by two stars. This
- can be configured by the
- code{org-hide} variable.
- Note that turning on
- code{org-hide-leading-stars} to code{org-adapt-indentation} to
- samp{2.} below shows how this works.
- To globally turn on
- code{org-startup-indented}.
- To turn on indenting for individual files, use
- example
- #+STARTUP: indent
- enumerate
- emph{Indentation of text below headlines}
- example
- *** 3rd level
- more text, now indented
- vindex org-adapt-indentation
- Org adapts indentations with paragraph filling, line wrapping, and structure
- editingcode{org-adapt-indentation}.}.
- vindex org-hide-leading-stars
- * Org can make leading stars invisible. For
- global preference, configure the variable
- code{#+STARTUP} options:
- end example
- With stars hidden, the tree is shown as:
- group
- * Top level headline
- * Second level
- * 3rd level
- ...
- end example
- vindex org-hide
- code{org-hide} face may need tweaking to get the effect
- right. For some black and white combinations,
- item
- dots{}, can also clean up the
- clutter. This removes two stars from each level
- samp{LEVEL=2} has 3 stars,
- code{org-odd-levels-only}. To set this per-file, use either
- one of the following lines:
- end example
- To switch between single and double stars layouts, use
- kbd{M-x org-convert-to-oddeven-levels}.
- node TTY keys
- cindex tty key bindings
- Org provides alternative key bindings for TTY and modern mobile devices that
- cannot handle cursor keys and complex modifier key chords. Some of these
- workarounds may be more cumbersome than necessary. Users should look into
- customizing these further based on their usage needs. For example, the
- normal key{cursor}} for editing timestamp might be better with
- multitable
- item tab tab tab
- item key{TAB}} kbd{C-u tab tab
- kbd{M-tab tab tab key{Esc}
- item key{left}} kbd{C-c C-x L} kbd{L}
- item key{right}} kbd{C-c C-x r} kbd{r} kbd{key{right}}
- kbd{M-S-tab tab tab
- kbd{M-tab tab tab key{Esc}
- item key{up}} kbd{C-c C-x U} kbd{U}
- item key{down}} kbd{C-c C-x d} kbd{ } kbd{key{down}}
- kbd{M-S-tab tab tab
- kbd{S-tab tab tab
- kbd{M-tab tab tab key{Esc}
- item key{RET}} kbd{C-c C-x M} kbd{ }
- item key{left}} kbd{C-c tab tab
- kbd{S-tab key{right}} kbd{ }
- item key{up}} kbd{C-c tab tab
- kbd{S-tab key{down}} kbd{ }
- item key{left}} kbd{C-c C-x tab tab
- kbd{C-S-tab key{right}} kbd{ }
- end multitable
- section Interaction with other packages
- menu
- * Cooperation:: Packages Org cooperates with
- * Conflicts:: Packages that lead to conflicts
- node Cooperation
- table
- cindex
- cindex Gillespie, Dave
- file{calc.el} by Dave Gillespie
- Org uses the Calc package for tables to implement spreadsheet functionality
- (
- xref{Embedded Mode, , Embedded Mode, calc, GNU Emacs Calc Manual}.
- file{constants.el} by Carsten Dominik
- file{constants.el}
- vindex org-table-formula-constants
- Org can use names for constants in formulas in tables. Org can also use
- calculation suffixes for units, such as samp{Mega}. For a
- standard collection of such constants, install the
- url{https://staff.fnwi.uva.nl/c.dominik/Tools/}. Org checks if the function
- file{constants.el}.
- file{cdlatex.el} by Carsten Dominik
- file{cdlatex.el}
- LaTeX{} package to efficiently enter
- pxref{CDLaTeX mode}).
- file{imenu.el} by Ake Stenhoff and Lars Lindberg
- file{imenu.el}
- Imenu creates dynamic menus based on an index of items in a file. Org mode
- supports Imenu menus. Enable it with a mode hook as follows:
- end lisp
- code{org-imenu-depth}.
- file{speedbar.el} by Eric M. Ludlam
- file{speedbar.el}
- kbd{<} in the Speedbar frame tweeks the
- agenda commands to that file or to a subtree.
- file{table.el}
- file{table.el} by Takaaki Ota
- cindex table editor,
- cindex
- cindex Ota, Takaaki
- Complex ASCII tables with automatic line wrapping, column- and row-spanning,
- and alignment can be created using the Emacs table package by Takaaki Ota.
- Org mode recognizes such tables and export them properly.
- samp{src} code
- blocks. Because of interference with other Org mode functionality, Takaaki
- Ota tables cannot be edited directly in the Org buffer.
- kbd
- file{table.el} table. Works when the cursor is in a table.el table.
- orgcmd{C-c ~,org-table-create-with-table.el}
- Insert a
- file{table.el} format and the Org mode
- format. See the documentation string of the command
- end table
- node Conflicts
- table
- cindex
- vindex org-support-shift-select
- In Emacs,
- kbd{S-
- kbd{S-
- code{org-support-shift-select} for customization. Org mode
- accommodates shift selection by (i) making it available outside of the
- special contexts where special commands apply, and (ii) extending an
- existing active region even if the cursor moves across a special context.
- file{CUA.el} by Kim. F. Storm
- file{CUA.el}
- vindex org-replace-disputed-keys
- Org key bindings conflict with
- code{org-replace-disputed-keys}. When set, Org moves the following key
- bindings in Org files, and in the agenda buffer (but not during date
- selection).
- result{} M-p S-DOWN
- result{} M-- S-RIGHT
- result{} M-S-- C-S-RIGHT
- end example
- code{org-disputed-keys}.
- file{ecomplete.el} by Lars Magne Ingebrigtsen
- cindex
- emph{not} follow the advice to automagically
- turn on Orgtbl mode in message buffers (see
- item
- cindex
- file{filladapt.el}
- and Org mode, so a safe thing to do is to disable filladapt like this:
- end lisp
- file{yasnippet.el}
- file{yasnippet.el}
- The way Org mode binds the code{[tab]} instead of
- lisp
- (add-hook 'org-mode-hook
- (lambda ()
- (org-set-local 'yas/trigger-key [tab])
- (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
- lisp
- (defun yas/org-very-safe-expand ()
- (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
- lisp
- (add-hook 'org-mode-hook
- (lambda ()
- (make-variable-buffer-local 'yas/trigger-key)
- (setq yas/trigger-key [tab])
- (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
- (define-key yas/keymap [tab] 'yas/next-field)))
- item
- cindex
- kbd{S-<cursor>} keys, so everything written
- in the paragraph above about CUA mode also applies here. If you want make
- the windmove function active in locations where Org mode does not have
- special functionality on key{cursor}}, add this to your
- configuration:
- end lisp
- file{viper.el} by Michael Kifer
- file{viper.el}
- kbd{C-c /} and therefore makes this key not access the
- corresponding Org mode command
- code{viper-vi-global-user-map} with
- end lisp
- node org-crypt
- cindex
- cindex
- samp{:crypt:} tag will be automatically
- be encrypted when the file is saved. To use a different tag, customize the
- lisp
- (require 'org-crypt)
- (org-crypt-use-before-save-magic)
- (setq org-tags-exclude-from-inheritance (quote ("crypt")))
- (setq org-crypt-key nil)
- ;; GPG key to use for encryption
- ;; Either the Key ID or set to nil to use symmetric encryption.
- (setq auto-save-default nil)
- ;; Auto-saving does not cooperate with org-crypt.el: so you need
- ;; to turn it off if you plan to use org-crypt.el quite often.
- ;; Otherwise, you'll get an (annoying) message each time you
- ;; start Org.
- ;; To turn it off only locally, you can insert this:
- ;;
- ;; # -*- buffer-auto-save-file-name: nil; -*-
- node Hacking
- cindex hacking
- This appendix covers some areas where users can extend the functionality of
- Org.
- LaTeX{} and other programs
- * Dynamic blocks:: Automatically filled blocks
- * Special agenda views:: Customized views
- * Speeding up your agendas:: Tips on how to speed up your agendas
- * Extracting agenda information:: Post-processing of agenda information
- * Using the property API:: Writing programs that use entry properties
- * Using the mapping API:: Mapping over all or selected entries
- node Hooks
- cindex hooks
- Org has a large number of hook variables for adding functionality. This
- appendix illustrates using a few. A complete list of hooks with
- documentation is maintained by the Worg project at
- node Add-on packages
- cindex add-on packages
- Various authors wrote a large number of add-on packages for Org.
- These packages are not part of Emacs, but they are distributed as contributed
- packages with the separate release available at
- file{contrib/README} file in the source code directory for a list of
- contributed files. Worg page with more information is at:
- node Adding hyperlink types
- cindex hyperlinks, adding new types
- Org has many built-in hyperlink types (
- file{org-man.el}, shows the
- process of adding Org links to Unix man pages, which look like this:
- lisp
- ;;; org-man.el - Support for links to manpages in Org
- (require 'org)
- (org-add-link-type "man" 'org-man-open)
- (add-hook 'org-store-link-functions 'org-man-store-link)
- (defcustom org-man-command 'man
- "The Emacs command to be used to display a man page."
- :group 'org-link
- :type '(choice (const man) (const woman)))
- (defun org-man-open (path)
- "Visit the manpage on PATH.
- PATH should be a topic that can be thrown at the man command."
- (funcall org-man-command path))
- (defun org-man-store-link ()
- "Store a link to a manpage."
- (when (memq major-mode '(Man-mode woman-mode))
- ;; This is a man page, we do make this link
- (let* ((page (org-man-get-page-name))
- (link (concat "man:" page))
- (description (format "Manpage for %s" page)))
- (org-store-link-props
- :type "man"
- :link link
- :description description))))
- (defun org-man-get-page-name ()
- "Extract the page name from the buffer name."
- ;; This works for both `Man-mode' and `woman-mode'.
- (if (string-match " \\(\\S-+\\)\\*" (buffer-name))
- (match-string 1 (buffer-name))
- (error "Cannot create link to this man page")))
- (provide 'org-man)
- ;;; org-man.el ends here
- noindent
- To activate links to man pages in Org, enter this in the init file:
- end lisp
- file{org-man.el}:
- item
- First, file{org.el} is loaded.
- code{org-add-link-type} defines a new link type with
- item
- code{org-store-link-functions} that records
- a useful link with the command
- end enumerate
- The rest of the file defines necessary variables and functions. First is the
- customization variable
- code{man} and
- code{org-man-command} to display the man page.
- kbd{C-c l} calls the function
- code{major-mode} is appropriate. If check fails, the function
- returns
- samp{man:} prefix with the man topic. The function then calls
- code{:type} and
- code{:description} property is an optional string that is displayed when the
- function inserts the link in the Org buffer.
- kbd{C-c C-l}. This function should not accept any arguments
- but return the appropriate prefix and complete link string.
- section Adding export back-ends
- code{org-export-define-backend} and
- file{ox-latex.el} for an example of defining a new back-end from scratch,
- and
- code{:menu-entry} keyword. For export
- options specific to this back-end, set the
- code{:translate-alist}
- to an alist of export functions. This alist replaces the parent back-end
- functions.
- For complete documentation, see
- node Context-sensitive commands
- cindex context-sensitive commands, hooks
- vindex org-ctrl-c-ctrl-c-hook
- Org has facilities for building context sensitive commands. Authors of Org
- add-ons can tap into this functionality.
- Some Org commands change depending on the context. The most important
- example of this behavior is the pxref{The very busy C-c C-c
- key}). Other examples are kbd{M-S-cursor}.
- These context sensitive commands work by providing a function that detects
- special context for that add-on and executes functionality appropriate for
- that context.
- section Tables and lists in arbitrary syntax
- cindex lists, in other modes
- LaTeX{}. This would be hard to do in a general way
- without complicated customization nightmares. Moreover, that would take Org
- away from its simplicity roots that Orgtbl has proven. There is, however, an
- alternate approach to accomplishing the same.
- This approach involves implementing a custom
- emph{source table} to produce a table in another
- format. This strategy would keep the excellently working Orgtbl simple and
- isolate complications, if any, confined to the translate function. To add
- more alien table formats, we just add more translate functions. Also the
- burden of developing custom translate functions for new table formats will be
- in the hands of those who know those formats best.
- For an example of how this strategy works, see Orgstruct mode. In that mode,
- Bastien added the ability to use Org's facilities to edit and re-structure
- lists. He did by turning
- LaTeX{} or Texinfo.
- LaTeX{} example:: Step by step, almost a tutorial
- * Translator functions:: Copy and modify
- * Radio lists:: Sending and receiving lists
- node Radio tables
- cindex radio tables
- Radio tables are target locations for translated tables that are not near
- their source. Org finds the target location and inserts the translated
- table.
- The key to finding the target location are the magic words
- example
- noindent
- At the location of source, Org needs a special line to direct Orgtbl to
- translate and to find the target for inserting the translated table. For
- example:
- example
- #+ORGTBL: SEND table_name translation_function arguments...
- noindent
- code{translation_function} is the Lisp function that
- translates. This line, in addition, may also contain alternating key and
- value arguments at the end. The translation function gets these values as a
- property list. A few standard parameters are already recognized and acted
- upon before the translation function is called:
- code
- item :skipcols (n1 n2 ...)
- List of columns to be skipped. First Org automatically discards columns with
- calculation marks and then sends the table to the translator function, which
- then skips columns as specified in
- end table
- itemize
- item
- Place the table in a block comment. For example, in C mode you could wrap
- the table between samp{*/} lines.
- samp{END} statement. For example
- TeX{} and {documentLaTeX{}.
- kbd{M-x
- orgtbl-toggle-comment RET} command makes toggling easy.
- node A
- subsection A
- cindex
- LaTeX{}, use the
- file{comment.sty}. To activate it, put
- {comment
- footnote{By default this works only for
- code{orgtbl-radio-table-templates} to
- install templates for other export formats.} with the command
- samp{salesfigures} is the name, the template inserts:
- example
- % BEGIN RECEIVE ORGTBL salesfigures
- % END RECEIVE ORGTBL salesfigures
- \begin}
- #+ORGTBL: SEND salesfigures orgtbl-to-latex
- | | |
- \end}
- noindent
- LaTeX{}-verbatim-environments
- The line
- code{orgtbl-to-latex} to convert the table to
- code{salesfigures}. Now
- the table is ready for data entry. It can even use spreadsheet
- featuressamp{#+TBLFM} line contains an odd number of dollar
- characters, this may cause problems with font-lock in
- code{comment} environment that is used to balance the dollar expressions.
- If you are using AUC
- code{comment} environment to the variable
- example
- % BEGIN RECEIVE ORGTBL salesfigures
- % END RECEIVE ORGTBL salesfigures
- \begin}
- #+ORGTBL: SEND salesfigures orgtbl-to-latex
- | Month | Days | Nr sold | per day |
- |-------+------+---------+---------|
- | Jan | 23 | 55 | 2.4 |
- | Feb | 21 | 16 | 0.8 |
- | March | 22 | 278 | 12.6 |
- #+TBLFM: $4=$3/$2;%.1f
- % $ (optional extra dollar to keep font-lock happy, see footnote)
- \end}
- noindent
- After editing,
- emph{splice} out the
- target table without the header and footer.
- {tabular{lrrr
- {1{c{Days
- {tabular
- {comment
- {comment
- end example
- The code{orgtbl-to-latex} is already part of
- Orgtbl mode and uses
- code{\hline}. For additional
- parameters to control output,
- table
- item :splice nil/t
- When non-
- code{nil}.
- code{%s} for the original
- field value. For example, to wrap each field value in dollar symbol, you
- could use
- code{:fmt (2 "$%s$" 4 "%s\\%%")}.
- In place of a string, a function of one argument can be used; the function
- must return a formatted string.
- code{%s} twice for
- inserting mantissa and exponent, for example {%s
- code{:efmt (2 "$%s\\times10^@{%s@}$" 4 "$%s\\cdot10^@{%s@}$")}. After
- code{fmt} will also be applied.
- Functions with two arguments can be supplied instead of strings. By default,
- no special formatting is applied.
- node Translator functions
- cindex HTML, and Orgtbl mode
- code{orgtbl-to-csv}
- (comma-separated values),
- code{orgtbl-to-latex}, code{orgtbl-to-texinfo},
- code{orgtbl-to-orgtbl}. They use the generic
- translator,
- samp{ORGTBL SEND} line take
- precedence over properties defined inside the function. For example, this
- overrides the default samp{\\}, with
- example
- #+ORGTBL: SEND test orgtbl-to-latex :lend " \\\\[2mm]"
- samp{!BTBL!} and
- samp{!BL!} and
- lisp
- (defun orgtbl-to-language (table params)
- "Convert the orgtbl-mode TABLE to language."
- (orgtbl-to-generic
- table
- (org-combine-plists
- '(:tstart "!BTBL!" :tend "!ETBL!" :lstart "!BL!" :lend "!EL!" :sep "\t")
- params)))
- noindent
- The documentation for the
- code{orgtbl-to-latex},
- code{hline}. The second argument is the property list consisting of
- parameters specified in the
- email{emacs-orgmodegnu.org}.
- subsection Radio lists
- cindex org-list-insert-radio-list
- Call the
- LaTeX{}, and Texinfo mode documents. Sending and
- receiving radio lists works is the same as for radio tables (
- cindex #+ORGLST
- minus
- item
- Use code{ORGTBL}.
- kbd{C-c C-c} works only on the first list item.
- code{org-list-to-latex},
- code{org-list-to-texinfo}. They use the
- LaTeX{} example:
- {comment
- {comment
- end example
- samp{a new house} inserts the translated
- node Dynamic blocks
- cindex dynamic blocks
- Org supports
- samp{src} code block, but the contents
- are updated automatically by a user function. For example,
- pxref{Clocking work
- time}).
- Dynamic blocks can have names and function parameters. The syntax is similar
- to
- cindex #+BEGIN:dynamic block
- end example
- These command update dynamic blocks:
- kbd
- orgkey{C-u C-c C-x C-u}
- Update all dynamic blocks in the current file.
- code{:content}, on the BEGIN line.
- To syntax for calling a writer function with a named block,
- code{org-dblock-write:myblock}. Parameters come from the BEGIN line.
- The following is an example of a dynamic block and a block writer function
- that updates the time when the function was last run:
- end example
- lisp
- (defun org-dblock-write:block-update-time (params)
- (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
- (insert "Last block update at: "
- (format-time-string fmt))))
- code{org-update-all-dblocks} in hook, such as
- code{org-update-all-dblocks} function does not run if the file is not in
- Org mode.
- Dynamic blocks, like any other block, can be narrowed with
- node Special agenda views
- cindex agenda views, user-defined
- vindex org-agenda-skip-function-global
- Org provides a special hook to further limit items in agenda views:
- code{agenda*}code{agenda*} view is the same as
- emph{appointments}, i.e.,
- scheduled and deadline items that have a time specification
- code{todo}, code{tags},
- code{tags-tree}. Specify a custom function that tests
- inclusion of every matched item in the view. This function can also
- skip as much as is needed.
- For a global condition applicable to agenda views, use the
- code{org-agenda-skip-function} for custom searching.
- This example defines a function for a custom view showing TODO items with
- WAITING status. Manually this is a multi step search process, but with a
- custom view, this can be automated as follows:
- The custom function searches the subtree for the WAITING tag and returns
- lisp
- (defun my-skip-unless-waiting ()
- "Skip trees that are not waiting"
- (let ((subtree-end (save-excursion (org-end-of-subtree t))))
- (if (re-search-forward ":waiting:" subtree-end t)
- nil ; tag found, do not skip
- subtree-end))) ; tag not found, continue after end of subtree
- lisp
- (org-add-agenda-custom-command
- '("b" todo "PROJECT"
- ((org-agenda-skip-function 'my-skip-unless-waiting)
- (org-agenda-overriding-header "Projects waiting for something: "))))
- vindex org-agenda-overriding-header
- Note that this also binds
- vindex org-odd-levels-only
- samp{LEVEL>0}
- code{org-odd-levels-only}, a level number corresponds to order in the
- hierarchy, not to the number of stars.}. Then to selectively pick the
- matched entries, use
- code{org-agenda-skip-entry-if} and
- table
- item (org-agenda-skip-entry-if 'scheduled)
- Skip current entry if it has been scheduled.
- item (org-agenda-skip-entry-if 'deadline)
- Skip current entry if it has a deadline.
- item (org-agenda-skip-entry-if 'todo '("TODO" "WAITING"))
- Skip current entry if the TODO keyword is TODO or WAITING.
- item (org-agenda-skip-entry-if 'timestamp)
- Skip current entry if it has any timestamp, may also be deadline or scheduled.
- item (org-agenda-skip-entry-if 'regexp "regular expression")
- Skip current entry if the regular expression matches in the entry.
- item (org-agenda-skip-subtree-if 'regexp "regular expression")
- Same as above, but check and skip the entire subtree.
- samp{WAITING} without the
- special function:
- end lisp
- section Speeding up your agendas
- enumerate
- item
- Reduce the number of
- item
- lisp
- (setq org-agenda-dim-blocked-tasks nil)
- item
- vindex org-agenda-inhibit-startup
- Stop preparing agenda buffers on startup:
- end lisp
- vindex org-agenda-show-inherited-tags
- lisp
- (setq org-agenda-use-tag-inheritance nil)
- end enumerate
- These options can be applied to selected agenda views. For more details
- about generation of agenda views, see the docstrings for the relevant
- variables, and this
- node Extracting agenda information
- cindex agenda, pipe
- vindex org-agenda-custom-commands
- Org provides commands to access agendas through Emacs batch mode. Through
- this command-line interface, agendas are automated for further processing or
- printing.
- code{org-agenda-custom-commands}. These are the same
- ones available through
- example
- emacs -batch -l ~/.emacs -eval '(org-batch-agenda "t")' | lpr
- samp{shop}, but excludes items tagged with
- example
- emacs -batch -l ~/.emacs \
- -eval '(org-batch-agenda "+shop-NewYork")' | lpr
- noindent
- An example showing on-the-fly parameter modifications:
- end example
- file{~/org/projects.org} file.
- For structured processing of agenda output, use
- example
- category
- r{The headline, without TODO keyword, TAGS and PRIORITY}
- type
- r{selected in TODO match}
- tagsmatch
- r{imported from diary}
- deadline
- r{scheduled}
- timestamp
- r{entry was closed on date}
- upcoming-deadline
- r{forwarded scheduled item}
- block
- r{The TODO keyword, if any}
- tags
- r{The relevant date, like 2007-2-14}
- time
- r{String with extra planning info}
- priority-l
- r{The computed numerical priority}
- noindent
- If the selection of the agenda item was based on a timestamp, including those
- items with samp{SCHEDULED} keywords, then Org includes
- date and time in the output.
- If the selection of the agenda item was based on a timestamp (or
- deadline/scheduled), then Org includes date and time in the output.
- Here is an example of a post-processing script in Perl. It takes the CSV
- output from Emacs and prints with a checkbox:
- {$cmd 2>/dev/null
- {
- # get the individual values
- ($category,$head,$type,$todo,$tags,$date,$time,$extra,
- $priority_l,$priority_n) = split(/,/,$line);
- # process and print
- print "[ ] $head\n";
- end example
- section Using the property API
- cindex properties, API
- Functions for working with properties.
- *
- This includes the TODO keyword, the tags, time strings for deadline,
- scheduled, and clocking, and any additional properties defined in the
- entry. The return value is an alist. Keys may occur multiple times
- if the property key was used several times.
- code{nil}, in which case the current entry is used.
- If WHICH is code{all}, get all properties. If WHICH is
- code{standard}, only get that subclass.
- vindex org-use-property-inheritance
- defun org-entry-get pom property &optional inherit
- Get value of code{POM}
- code{INHERIT} is non-
- code{INHERIT} is the
- symbol
- code{org-use-property-inheritance} selects
- end defun
- code{PROPERTY} from entry at point-or-marker POM.
- defun org-entry-put pom property value
- Set code{VALUE} for entry at point-or-marker POM.
- defun org-buffer-property-keys &optional include-specials
- Get all property keys in the current buffer.
- defun org-insert-property-drawer
- Insert a property drawer for the current entry.
- defun org-entry-put-multivalued-property pom property &rest values
- Set code{POM} to .
- end defun
- code{PROPERTY} as a whitespace-separated
- list of values and return the values as a list of strings.
- defun org-entry-add-to-multivalued-property pom property value
- Treat the value of the property
- code{VALUE} is in this list.
- defun org-entry-remove-from-multivalued-property pom property value
- Treat the value of the property
- code{VALUE} is
- end defun
- code{PROPERTY} as a whitespace-separated
- list of values and check if
- end defun
- samp{:ETC} is one of
- the values, use the values as completion help, but allow also other values
- to be entered. The functions must return
- end defopt
- section Using the mapping API
- cindex mapping entries, API
- Org has sophisticated mapping capabilities for finding entries. Org uses
- this functionality internally for generating agenda views. Org also exposes
- an API for executing arbitrary functions for each selected entry. The API's
- main entry point is:
- samp{FUNC} at each headline selected by code{SCOPE}.
- code{FUNC} in
- save-excursion form. After evaluation, Org moves the cursor to the end of
- the line that was just processed. Search continues from that point forward.
- This may not always work as expected under some conditions, such as if the
- current sub-tree was removed by a previous archiving operation. In such rare
- circumstances, Org skips the next entry entirely when it should not. To stop
- Org from such skips, make
- code{org-map-continue-from} to a specific buffer position.
- code{MATCH} is
- code{t}.
- example
- nil
- r{the subtree started with the entry at point}
- region
- r{the current buffer, without restriction}
- file-with-archives
-
- r{all agenda files}
- agenda-with-archives
-
- r{if this is a list, all files in the list will be scanned}
- noindent
- The remaining args are treated as settings for the scanner's skipping
- facilities. Valid args are:
- example
- archive
- r{skip trees with the COMMENT keyword}
- function or Lisp form
- code{org-agenda-skip-function},}
-
- r{will not be called for that entry and search will}
-
- end example
- pxref{Using the property API}).
- Here are some handy functions:
- code{ARG}.
- defun org-priority &optional action
- Change the priority of the entry. See the docstring of this function for the
- possible values for
- end defun
- code{TAG} in the current entry. Setting
- code{on} or
- end defun
- end defun
- end defun
- This example turns all entries tagged with
- code{UPCOMING}. Org ignores entries in comment trees and
- archive trees.
- end lisp
- The following example counts the number of entries with TODO keyword
- lisp
- (length (org-map-entries t "/+WAITING" 'agenda))
- node MobileOrg
- cindex iPhone
- uref{https://github.com/MobileOrg/, iOS implementation} for the
- uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg
- Android} by Matt Jones. Though the two implementations are not identical,
- they offer similar features.
- This appendix describes Org's support for agenda view formats compatible with
- MobileOrg. It also describes synchronizing changes, such as to notes,
- between MobileOrg and the computer.
- To change tags and TODO states in MobileOrg, first customize the variables
- code{org-tag-alist}. These should cover all
- the important tags and TODO keywords, even if Org files use only some of
- them. Though MobileOrg has in-buffer settings, it understands TODO states
- pxref{Per-file keywords}) and
- pxref{Setting tags}) only for those set in these variables.
- end menu
- section Setting up the staging area
- MobileOrg needs access to a file directory on a server to interact with
- Emacs. With a public server, consider encrypting the files. MobileOrg
- version 1.5 supports encryption for the iPhone. Org also requires
- code{org-mobile-use-encryption}
- code{org-mobile-encryption-password}; please read the docstring of that
- variable.}. Note that even after MobileOrg encrypts the file contents, the
- file names will remain visible on the file systems of the local computer, the
- server, and the mobile device.
- For a server to host files, consider options like
- footnote{An alternative is to
- use webdav server. MobileOrg documentation has details of webdav server
- configuration. Additional help is at
- file{MobileOrg/} on
- Dropbox. Pass its location to Emacs through an init file variable as
- follows:
- end lisp
- Org copies files to the above directory for MobileOrg. Org also uses the
- same directory for sharing notes between Org and MobileOrg.
- section Pushing to MobileOrg
- Org pushes files listed in
- code{org-mobile-directory}. Files include agenda files (as listed in
- code{org-mobile-files} to add other
- files. File names will be staged with paths relative to
- footnote{Symbolic links in
- file{agendas.org} with custom agenda views
- defined by the user
- code{org-mobile-force-id-on-agenda-items} to
- file{index.org}, containing links to other files.
- MobileOrg reads this file first from the server to determine what other files
- to download for agendas. For faster downloads, MobileOrg will read only
- those files whose checksums
- file{checksums.dat}.} have changed.
- section Pulling from MobileOrg
- When MobileOrg synchronizes with the server, it pulls the Org files for
- viewing. It then appends to the file
- enumerate
- file{mobileorg.org}file{mobileorg.org} will be empty after this
- operation.} and appends them to the file pointed to by the variable
- item
- After moving the entries, Org attempts changes to MobileOrg. Some changes
- are applied directly and without user interaction. Examples include changes
- to tags, TODO state, headline and body text. Entries for further action are
- tagged as
- item
- Org generates an agenda view for flagged entries for user intervention to
- clean up. For notes stored in flagged entries, MobileOrg displays them in
- the echo area when the cursor is on the corresponding agenda item.
- kbd
- item ?
- Pressing
- kbd{? z C-y C-c C-c}. Pressing
- code{:FLAGGED:} tag; second, it removes the flagged note from
- the property drawer; third, it signals that manual editing of the flagged
- entry is now finished.
- end enumerate
- kbd{C-c a ?} returns to the agenda view to finish processing flagged
- entries. Note that these entries may not be the most recent since MobileOrg
- searches files that were last pulled. To get an updated agenda view with
- changes since the last pull, pull again.
- appendix History and acknowledgments
- cindex history
- section From Carsten
- Org was born in 2003, out of frustration over the user interface of the Emacs
- Outline mode. I was trying to organize my notes and projects, and using
- Emacs seemed to be the natural way to go. However, having to remember eleven
- different commands with two or three keys per command, only to hide and show
- parts of the outline tree, that seemed entirely unacceptable. Also, when
- using outlines to take notes, I constantly wanted to restructure the tree,
- organizing it paralleling my thoughts and plans.
- emph{structure editing} were originally implemented in the package
- file{org.el}.
- As this environment became comfortable for project planning, the next step
- was adding emph{timestamps}, and
- email{emacs-orgmodegnu.org} have provided a constant stream of bug
- reports, feedback, new ideas, and sometimes patches and add-on code.
- Many thanks to everyone who has helped to improve this package. I am
- trying to keep here a list of the people who had significant influence
- in shaping one or more aspects of Org. The list may not be
- complete, if I have forgotten someone, please accept my apologies and
- let me know.
- Before I get to this list, a few special mentions are in order:
- i
- LaTeX{} exporter and the
- plain list parser. His support during the early days was central to the
- success of this project. Bastien also invented Worg, helped establishing the
- Web presence of Org, and sponsored hosting costs for the orgmode.org website.
- Bastien stepped in as maintainer of Org between 2011 and 2013, at a time when
- I desperately needed a break.
- item John Wiegley
- John has contributed a number of great ideas and patches directly to Org,
- including the attachment system (
- file{org-mac-message.el}), hierarchical dependencies of TODO
- items, habit tracking (
- file{org-crypt.el}). Also, the capture system is really an extended copy
- of his great
- item Sebastian Rose
- Without Sebastian, the HTML/XHTML publishing of Org would be the pitiful work
- of an ignorant amateur. Sebastian has pushed this part of Org onto a much
- higher level. He also wrote
- end table
- section From Bastien
- I (Bastien) have been maintaining Org between 2011 and 2013. This appendix
- would not be complete without adding a few more acknowledgments and thanks.
- I am first grateful to Carsten for his trust while handing me over the
- maintainership of Org. His unremitting support is what really helped me
- getting more confident over time, with both the community and the code.
- When I took over maintainership, I knew I would have to make Org more
- collaborative than ever, as I would have to rely on people that are more
- knowledgeable than I am on many parts of the code. Here is a list of the
- persons I could rely on, they should really be considered co-maintainers,
- either of the code or the community:
- i
- item Nicolas Goaziou
- Nicolas is maintaining the consistency of the deepest parts of Org. His work
- on file{ox.el} has been outstanding, and it opened
- the doors for many new ideas and features. He rewrote many of the old
- exporters to use the new export engine, and helped with documenting this
- major change. More importantly (if that's possible), he has been more than
- reliable during all the work done for Org 8.0, and always very reactive on
- the mailing list.
- emph{ad hoc} tools
- into a flexible and conceptually clean process. He patiently coped with the
- many hiccups that such a change can create for users.
- end table
- I received support from so many users that it is clearly impossible to be
- fair when shortlisting a few of them, but Org's history would not be
- complete if the ones above were not mentioned in this manual.
- itemize
- item
- item
- item
- file{ox-man.el}.
- i{Thomas Baumann} wrote file{org-mhe.el}.
- i{Michael Brand} helped by reporting many bugs and testing many features.
- He also implemented the distinction between empty fields and 0-value fields
- in Org's spreadsheets.
- i{Christophe Bataillon} created the great unicorn logo that we use on the
- Org mode website.
- i{Alex Bochannek} provided a patch for rounding timestamps.
- i{Jan Böcker} wrote
- item
- item
- file{org-choose.el}.
- i{Charles Cave}'s suggestion sparked the implementation of templates
- for Remember, which are now templates for capture.
- i{Pavel Chalmoviansky} influenced the agenda treatment of items with
- specified time.
- i{Gregory Chernov} patched support for Lisp forms into table
- calculations and improved XEmacs compatibility, in particular by porting
- item
- item
- item
- file{.texi}
- file to DocBook using
- item
- item
- item
- item
- item
- item
- file{org-taskjuggler.el}, which has been rewritten by Nicolas Goaziou as
- item
- item
- item
- item
- item
- item
- file{org-git-line.el}.
- i{Mikael Fornius} works as a mailing list moderator.
- i{Austin Frank} works as a mailing list moderator.
- i{Eric Fraga} drove the development of BEAMER export with ideas and
- testing.
- i{Barry Gidden} did proofreading the manual in preparation for the book
- publication through Network Theory Ltd.
- i{Niels Giesen} had the idea to automatically archive DONE trees.
- i{Nicolas Goaziou} rewrote much of the plain list code. He also wrote
- file{org-export.el}, which was a huge step forward
- in implementing a clean framework for Org exporters.
- i{Kai Grossjohann} pointed out key-binding conflicts with other packages.
- i{Brian Gough} of Network Theory Ltd publishes the Org mode manual as a
- book.
- i{Bernt Hansen} has driven much of the support for auto-repeating tasks,
- task state change logging, and the clocktable. His clear explanations have
- been critical when we started to adopt the Git version control system.
- i{Manuel Hermenegildo} has contributed various ideas, small fixes and
- patches.
- i{Phil Jackson} wrote
- item
- item
- i{MobileOrg Android}.
- i{Tokuya Kameshima} wrote file{org-mew.el}.
- i{Jonathan Leech-Pepin} wrote
- item
- LaTeX{} and tested it. He also
- provided frequent feedback and some patches.
- i{Matt Lundin} has proposed last-row references for table formulas and named
- invisible anchors. He has also worked a lot on the FAQ.
- i{David Maus} wrote
- item
- item
- item
- item
- item
- item
- item
- item
- item
- item
- file{orgcard2ref.pl}, a Perl program to create a text
- version of the reference card.
- i{Takeshi Okano} translated the manual and David O'Toole's tutorial
- into Japanese.
- i{Oliver Oppitz} suggested multi-state TODO items.
- i{Scott Otterson} sparked the introduction of descriptive text for
- links, among other things.
- i{Pete Phillips} helped during the development of the TAGS feature, and
- provided frequent feedback.
- i{Francesco Pizzolante} provided patches that helped speeding up the agenda
- generation.
- i{Martin Pohlack} provided the code snippet to bundle character insertion
- into bundles of 20 for undo.
- i{Rackspace.com} is hosting our website for free. Thank you Rackspace!
- i{T.V. Raman} reported bugs and suggested improvements.
- i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality
- control.
- i{Paul Rivier} provided the basic implementation of named footnotes. He
- also acted as mailing list moderator for some time.
- i{Kevin Rogers} contributed code to access VM files on remote hosts.
- i{Frank Ruell} solved the mystery of the
- file{allout.el}.
- i{Jason Riedy} generalized the send-receive mechanism for Orgtbl tables with
- extensive patches.
- i{Philip Rooke} created the Org reference card, provided lots
- of feedback, developed and applied standards to the Org documentation.
- i{Christian Schlauer} proposed angular brackets around links, among
- other things.
- i{Christopher Schmidt} reworked
- item
- file{org-ctags.el}.
- i{Tom Shannon}'s
- item
- item
- file{ditaa.jar} ASCII to PNG converter that is
- now packaged into Org's
- item
- item
- item
- item
- item
- LaTeX{}, UTF-8, Latin-1 and ASCII.
- i{Andy Stewart} contributed code to
- item
- file{org-publish.el} and drafted the manual
- chapter about publishing.
- i{Jambunathan K} contributed the ODT exporter and rewrote the HTML exporter.
- i{Sebastien Vauban} reported many issues with
- item
- item
- item
- item
- samp{QUOTE}
- keyword.
- i{David Wainberg} suggested archiving, and improvements to the linking
- system.
- i{Carsten Wimmer} suggested some changes and helped fix a bug in
- linking to Gnus.
- i{Roland Winkler} requested additional key bindings to make Org
- work on a tty.
- i{Piotr Zielinski} wrote
- item
- file{org-eww.el}.
- node GNU Free Documentation License
- include doclicense.texi
- unnumbered Concept index
- node Key Index
- printindex ky
- unnumbered Command and function index
- node Variable Index
- kbd{M-x org-customize
- printindex vr
- c Local variables:
- c indent-tabs-mode: nil
- [a-zA-Z]*[ \n]\\|^
- c paragraph-separate: "\\|^@[a-zA-Z]*[ \n]\\|^@x?org\\(key\\|cmd\\)\\|[ \f]*$"
- c LocalWords: webdavhost pre
|