org mode teaser

Upload: aaadevil

Post on 13-Oct-2015

24 views

Category:

Documents


0 download

DESCRIPTION

Org Mode Teaser

TRANSCRIPT

ORG-MODE TEASER DEMOKarl Voit2013-10-06 SunTable of Contents1 Org-mode by Examples.. 1.1 activating Org-mode.. 1.2 Org-mode documentation..... 1.2.1 In case of Org-mode documentation does not work.. 1.3 text formatting syntax [(docu)]..... 1.3.1 COMMENT: no exported either.. 1.4 outlining ([docu])..... 1.4.1 Creating..... 1.4.2 Using..... 1.4.3 encryption..... 1.4.4 time stamps when taking notes ([docu]).. 1.5 sparse trees ([docu]).. 1.6 lists [(docu)]..... 1.6.1 examples..... 1.6.2 Simple..... 1.6.3 Checklists..... 1.6.4 Headings with TODO items..... 1.6.5 Taking notes during a meeting or similar ([docu]).. 1.7 drawers, properties, columns ([docu])..... 1.7.1 NEXT Test with category property.. 1.8 blocks ([docu])..... 1.8.1 examples for non-source-code blocks.. 1.9 links [(docu)]..... 1.9.1 heading with PROPERTIES drawer containing ID.. 1.10 states; TODO items ([docu])..... 1.10.1 making dependencies explicit..... 1.10.2 logging state changes ([docu])..... 1.10.3 habits ([docu])..... 1.10.4 priorities ([docu])..... 1.10.5 breaking down in subtasks ([docu]).. 1.11 tags [(docu)]..... 1.11.1 example..... 1.11.2 Tag groups ([docu]).. 1.12 tables simple [(docu)].. 1.13 tables complex ([docu], [tutorial])..... 1.13.1 referencing example with detailed explanation.. 1.14 column view ([docu])..... 1.14.1 example sub-item..... 1.14.2 NEXT another example.. 1.15 capture, refile, archive ([docu]).. 1.16 attachments ([docu]).. 1.17 dates & time ([docu]).. 1.18 agenda ([docu]).. 1.19 clocking time ([docu])..... 1.19.1 example sub-hierarchy with report.. 1.20 dynamic blocks with ELISP ([docu])

.. 1.21 source code ([docu]).. 1.22 babel ([docu])..... 1.22.1 babel simple ([doc])..... 1.22.2 babel advanced.. 1.23 LaTeX ([docu]).. 1.24 export formats ([docu])..... 1.24.1 Export options ([docu]).. 1.25 Mobile-org ([docu]).. 1.26 many many many many more features!.. 1.27 customization per 2 Still Missing Topics1 Org-mode by Examples This is a subset(!) of Org-mode basics to demonstrate the mainfeatures (sometimes probably more) of this wonderful tool Find the newest version of this document on[https://github.com/novoid/org-mode-workshop]*key* *description*MMeta (often: Alt)CCtrlSShiftTABTabulatorRETReturn, Enter, CRLFUParrow: upDOWN arrow: downLEFT arrow: leftRIGHT arrow: rightSPCSpace1.1 activating Org-mode [http://orgmode.org/org.html#Activation] [http://orgmode.org/worg/org-configs/org-customization-guide.html][Activation of Org-mode (external Tutorial)]: (require 'org-install) (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) (setq org-log-done t) Org-mode *minor mode* (structure editing and lists) `orgstruct-mode'([docu])[Activation of Org-mode (external Tutorial)]http://orgmode.org/worg/org-tutorials/orgtutorial_dto.html#sec-1-2

[docu] http://orgmode.org/org.html#Orgstruct-mode1.2 Org-mode documentation [http://orgmode.org/org.html] is up to date `C-h i' (while being in an Org-mode file) gives you a local version:-)1.2.1 In case of Org-mode documentation does not workFor using Org-mode from a local git repository: add following to yourconfiguration: (add-to-list 'Info-additional-directory-list "~/.emacs.d//org-mode/doc/")OR: install Org-mode documentation to your system with: cd $ORGMODEDIRECTORY && sudo make install-info1.3 text formatting syntax [(docu)]

*bold*/italic/_underline_+strike through+`code'`commands'[http://orgmode.org]

small example1.3.1 COMMENT: no exported eitherfoo bar1.4 outlining ([docu]) headlines start with asterisks levels visibility `TAB' *visibility cycling* `S-TAB' change buffer visibility

`C-c C-r' *reveal context* per-file visibility `#+STARTUP: overview' and so on: ([docu])motion `C-c C-n' *next heading* `C-c C-p' *previous heading* `C-c C-u' one level up `C-c C-j' jump (goto) `C-c C-f' forward same level `C-c C-b' backward same level `M-x org-goto' nifty inerface for searching within an Org-modebuffercreate basic elements `C-RET' *new heading* belowmove elements `M-UP/DOWN' *move up/down* with subitems `M-LEFT' *promote* `M-RIGHT' *demote* `M-S-LEFT/RIGHT' promote/demote with subitems`C-c C-c' *toggle/modify* things ([docu]) checkbox: activate/deactivate, heading: tags, tables:re-calculate, jump footnote and back, update tables, updateTODO-count,

[docu] http://orgmode.org/org.html#Visibility-cycling[docu] http://orgmode.org/org.html#The-very-busy-C_002dc-C_002dc-key1.4.1 Creating DEMO: create headings1.4.2 Using DEMO: visibility cycling DEMO: move headingsThis is a quite boring text just to show some body content. 1.4.2.1 This is the 1st headingThis is a quite boring text just to show some body content. 1.4.2.1.1 Sub-heading 1This is a quite boring text just to show some body content. 1.4.2.2 This is another headingThis is a quite boring text just to show some body content. 1.4.2.2.1 Sub-heading 2

This is a quite boring text just to show some body content. 1.4.2.3 This is yet another heading 1.4.2.4 OK, now this is getting boring :-)1.4.3 encryption whole Org-mode files selective headlines using :crypt: `org-decrypt-entry'1.4.4 time stamps when taking notes ([docu])

`C-c C-x .' start timer`C-c C-x -' insert list item with time`M-' insert heading with time~C-c C-x ,~ toggle timer pause~C-u C-c C-x ,~ stop timer

also handy: `C-c C-x ;' set countdown1.5 sparse trees ([docu]) Filtering `C-c /' Filter in *sparse trees* `C-c / r' Filter using *Regular Expressions* Moving in results `M-g n' goto next match `M-g o' goto previous match [docu: property search] `C-c a L' time sorted view of buffer[docu: property search] http://orgmode.org/org.html#Property-searches1.6 lists [(docu)]

`M-RET' *new list item*`M-S-RET' create checkbox`M-LEFT/RIGHT/UP/DOWN' move item`C-c -' cycle item type OR turn into list item

1.6.1 examples

simple list: Emacs Org-mode Listsenumerate:1. Emacs2. Org-mode3. Listscheck lists:1.6.2 Simple DEMO: create simple lists and move items around1.6.3 Checklists `M-S-RET' new item with checkbox `C-c C-*' checkboxes become TODOs Clean out garage1. get stuff out be careful with that axe, Eugene2. get rid of old stuff using eBay? try to use rubbish as birthday presents for family3. repaint garage4. put stuff back in1.6.4 Headings with TODO items 1.6.4.1 TODO Clean out garage [0/4] 1.6.4.1.1 TODO get stuff out be careful with that axe, Eugene 1.6.4.1.2 TODO get rid of old stuff using eBay? try to use rubbish as birthday presents for family 1.6.4.1.3 TODO repaint garage 1.6.4.1.4 TODO put stuff back in1.6.5 Taking notes during a meeting or similar ([docu])

`C-c C-x .' (re)start a timer `C-c C-x -' or `M-' insert description list item with thecurrent relative time ~C-c C-x ,~ pause/continue ~C-u C-c C-x ,~ stop timerBonus feature: `C-c C-x ;' count down timer1.7 drawers, properties, columns ([docu]) meta-data on headings standard drawers :PROPERTIES: and :LOGBOOK: ends with :END: FIXXME `C-c C-z' timed LOGBOOK entry `:ID: label' define ID in PROPERTIES hint: the property CATEGORY gets inherited and displayed on theagenda:1.7.1 NEXT Test with category property

:mytag:

1.8 blocks ([docu]) encapsulating content with beginend structure `$5=vsum(@I..@II)' value: `1.8' last row (`@>') of column five (`$5') is the sum of column fivebetween first and second horizontal line (`@I..@II') `@>$3=string("")' no value (empty) overwrite the last row (`@>') of column three (`$3') with anempty string

otherwise it would get 1.2 times the value of correspondingcolumn of table Income2012v as well - I chose not to want thissum in this column`$1=remote(Income2012v, @@#$1)' values: `Joe' until `sum' copy content of the first column of table "Income2012v"(`remote(Income2012v, @@#$1)') to the first column in this table(`$1') this is because I am too lazy to enter all names once again :-) see also [Org-hacks] for field formulas`$2=remote(Income2012v, @@#$3)' values: `10; 24; 17; 51' copy the content of the second column of table "Income2012v" tothe second column in this table you could skip this column and calculate the values of the nextcolumns with direct references to `remote(Income2012v, @@#$3)'as well. However, it is more easy to compare visually if thevalues from 2012 are shown here as well (usability/readability) note: by convention, only the values after the first horizontalline are taken`$3=1.2 * remote(Income2012v, @@#$3);%.1f' values: `12.0; 28.8; 20.4; 61.2' column three (`$3') is 120 percent of the values of the thirdcolumn of table "Income2012v" with one decimal place (`;%.1f') note: 61.2 (1.2 times 51) is overwritten by formula `@>$3' fromabove`$5=$4-$3;%.1f' values: `-1.0; 2.2; 0.6' column five (`$5') is the difference between column four tocolumn three with one decimal place

[Org-hacks]http://orgmode.org/worg/org-hacks.html#field-coordinates-in-formulas 1.13.1.2 row-basedJoe Alice Bob sumIncome May 20121222 16 50Income June 2012 1024 17 51Joe Alice Bob sum2012 Income June10241751plus 20 percent 12.0 28.8 20.4 60.0June 2013113121Difference-1.02.2 0.6 1.8 all formulas explained in detail: `@>$>=vsum(@5$2..@5$4)' value: `1.8' last column in last row (`@>$>') is the vector-sum (`vsum') ofcolumn two to four of fifth row (`@5$2..@5$4') `@1$2..@1$4=remote(Income2012h, @1$$#)' values: `Joe | Alice | Bob | sum' column two to four of first row (`@1$2..@1$4') are copied from

the corresponding fields of the first row (`@1$$#') of table"Income2012h" see also [Org-hacks] for field formulas `@2=remote(Income2012h, @3$$#)' values: `2012 Income June | 10 | 24 | 17 | 51' the second row (`@2') is copied from the corresponding fields ofthe first row (`@1$$#') of table "Income2012h" my guess: "2012" is moved to the beginning of the field mostprobably because it is interpreted as numeric value and not asstring `@3$2..@3$4=1.2 * remote(Income2012h, @3$$#);%.1f' values: `12.0 | 28.8 | 20.4 | 60.0' the columns two to four of the third row (`@3$2..@3$4') is 120percent of the corresponding values of the third row (`@3$$#')of the table "Income2012h" with one decimal place (`;%.1f') `@5$2..@5$4=@4-@3;%.1f' values: `-1.0 | 2.2 | 0.6' the column two to four of the fifth row (`@5$2..@5$4') is thedifference of the values in the corresponding values of thefourth row and the third row (`@4-@3') with one decimal place(`;%.1f')[Org-hacks]http://orgmode.org/worg/org-hacks.html#field-coordinates-in-formulas1.14 column view ([docu])

`C-c C-x C-c' activate column view`e' edit value`n/p' next/previous value`q' quit column view`a' edit allowed values`C-c C-x p' set property

1.14.1 example sub-item

:mytag1:

1.14.2 NEXT another example

:mytag2:

1.15 capture, refile, archive ([docu])

`C-c`C-c`C-c`C-u

c' *capture*C-w' *refile*C-x C-a' *archive*C-u C-c c' *goto last capture*

`#+ARCHIVE: %s_done::' per-file archive `C-c C-x a' toggle ARCHIVE tag `C-u C-c C-x a' check direct children for archiving ;; ######################################################

;; templates for capturing C-c c ;; http://orgmode.org/org.html#Capture-templates (setq org-capture-templates'(("s" "shorts-todo" entry (file+headline "~/share/all/org-mode/misc.org" "shorts")"* NEXT %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("e" "Event" entry (file+headline "~/share/all/org-mode/misc.org" "Events")"* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("i" "IST Templates")("is" "IST shorts" entry (file+headline "~/share/all/org-mode/IST.org""shorts")"* NEXT %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("ie" "IST event" entry (file+headline "~/share/all/org-mode/IST.org""Events")"* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("ii" "IST isst" entry (file+headline "~/share/all/org-mode/IST.org" "Events")"* %? IST isst: \n:PROPERTIES:\n:CREATED: %U\n:END:\n\n- [[contact:Ingo Pill][Ingo Pill]]\n- [[contact:Thomas Quartisch][Thomas Quartisch]]\n\n" :empty-lines 1)("b" "Besorgung" entry (file+headline "~/share/all/org-mode/hardware.org" "Besorgungen")"* TODO %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("C" "Clipboard" entry (file+headline "~/share/all/org-mode/misc.org""shorts")"* TODO %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n%x\n\n" :empty-lines 1)("c" "capture to inbox, refile later" entry (file "~/share/all/org-mode/inbox.org")"\n* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("m" "movie" entry (file+headline "~/share/all/org-mode/movies.org" "inbox")"* TODO %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n" :empty-lines 1)("x" "xlog")("xh" "xlog hometrainer" table-line (id "xlog-hometrainer") "| %T | || |")("xk" "Keyboard Akkus leer" table-line (id "3407c9b7-1b41-443b-9254-32c4af3a54e8") "| %T |")) )1.16 attachments ([docu]) `C-c C-a' *org-attach* (menu) `i' *inherit* `s' *set directory* `a' attach: move file to task directory `c/m/l' attach: copy/move/link file much more1.17 dates & time ([docu]) `C-c .' *insert active* (with `C-u': ) `C-c !' insert inactive [2012-04-23 Mon] (with `C-u': [2012-04-23Mon 19:14]) `S-RIGHT/LEFT/UP/DOWN' interactively change timestamp `C-c ' *release* agenda restriction *lock*when being *in agenda* mode: `q' *quit agenda*

`j' *jump to date*`.' *goto today*`f/b' *forward/back*`v' *choose view menu*`d/w' *day/week view*

`v d/w/m' view for day/week/month `r' *refresh*

`RET' *goto item*`SPC' show item`