- This is a subset(!) of Org-mode basics to demonstrate the main features (sometimes probably more) of this wonderful tool
- Find the newest version of this document on https://github.com/novoid/org-mode-workshop
key | description |
---|---|
M | Meta (often: Alt) |
C | Ctrl |
S | Shift |
TAB | Tabulator |
RET | Return, Enter, CRLF |
UP | arrow: up |
DOWN | arrow: down |
LEFT | arrow: left |
RIGHT | arrow: right |
SPC | Space |
- http://orgmode.org/org.html#Activation
- http://orgmode.org/worg/org-configs/org-customization-guide.html
Activation of Org-mode (external Tutorial):
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(define-key global-map "\C-ca" 'org-agenda) ;; by convention: "C-c a" opens agenda
(define-key global-map "\C-cc" 'org-capture) ;; by convention: "C-c c" captures stuff
(define-key global-map "\C-cl" 'org-store-link) ;; by convention: "C-c l" stores a link to this heading
(setq org-log-done t) ;; if you want to log DONE-states to the :LOGBOOK:-drawer
- Org-mode minor mode (structure editing and lists)
orgstruct-mode
(docu)
- http://orgmode.org/org.html is up to date
C-h i
(while being in an Org-mode file) gives you a local version :-)
For using Org-mode from a local git repository: add following to your configuration:
(add-to-list 'Info-additional-directory-list "~/.emacs.d/<YOURDIRECTORY>/org-mode/doc/")
OR: install Org-mode documentation to your system with:
cd $ORGMODEDIRECTORY && sudo make install-info
1.3 text formatting syntax (docu)
- bold
- italic
- underline
strike throughcode
commands
- http://orgmode.org
small example
- not (yet) working and edge cases:
- *combination*
- /combination/
- *combination*
- _combination_
*combination*
C:\a\very\old\DOS\path
- http://orgmode.org
- orgmode-Homepage
- *orgmode* /Homepage/
1.4 outlining (docu)
- headlines start with asterisks
- levels
- visibility
TAB
visibility cyclingS-TAB
change buffer visibilityC-c C-r
reveal context- per-file visibility
#+STARTUP: overview
and so on: (docu) C-u C-u TAB
restore startup visibility
- motion
C-c C-n
next headingC-c C-p
previous headingC-c C-u
one level upC-c C-j
jump (goto)C-c C-f
forward same levelC-c C-b
backward same levelM-x org-goto
nifty inerface for searching within an Org-mode buffer
- create basic elements
C-RET
new heading below
- move elements
M-UP/DOWN
move up/down with subitemsM-LEFT
promoteM-RIGHT
demoteM-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, update TODO-count, …
C-c C-x b
open sub-tree in separate buffer (org-tree-to-indirect-buffer)
- [ ] DEMO: create headings
- [ ] DEMO: visibility cycling
- [ ] DEMO: move headings
This is a quite boring text just to show some body content.
This is a quite boring text just to show some body content.
This is a quite boring text just to show some body content.
This is a quite boring text just to show some body content.
This is a quite boring text just to show some body content.
- whole Org-mode files
- selective headlines using :crypt:
org-decrypt-entry
1.4.4 time stamps when taking notes (docu, info:org#Timers)
C-c C-x .
start timerC-c C-x -
insert list item with timeM-<RET>
insert heading with timeC-c C-x ,
toggle timer pauseC-u C-c C-x ,
stop timer- also handy:
C-c C-x ;
set countdown
1.5 sparse trees (docu)
- Filtering
C-c /
Filter in sparse treesC-c / r
Filter using Regular Expressions
- Moving in results
M-g n
goto next matchM-g o
goto previous match
- docu: property search
C-c a L
time sorted view of buffer
1.6 lists (docu)
M-RET
new list itemM-S-RET
create checkboxM-LEFT/RIGHT/UP/DOWN
move itemC-c -
cycle item type OR turn into list item
simple list:
- Emacs
- Org-mode
- Lists
enumerate:
- Emacs
- Org-mode
- Lists
check lists:
- [ ] DEMO: create simple lists and move items around
M-S-RET
new item with checkboxC-c C-*
checkboxes become TODOsC-c C-C
toggle checkboxes between[X]
and[ ]
C-u C-u C-c C-C
toggle checkboxes between[ ]
and[-]
- Clean out garage
- [ ] get stuff out
- [ ] be careful with that axe, Eugene
- [ ] get rid of old stuff
- using eBay?
- try to use rubbish as birthday presents for family
- [ ] repaint garage
- [ ] put stuff back in
- [ ] get stuff out
- be careful with that axe, Eugene
- using eBay?
- try to use rubbish as birthday presents for family
1.6.5 Taking notes during a meeting or similar (docu)
C-c C-x .
(re)start a timerC-c C-x -
orM-<RET>
insert description list item with the current relative timeC-c C-x ,
pause/continueC-u C-c C-x ,
stop timer
Bonus feature:
C-c C-x ;
count down timer
1.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 the agenda:
1.8 blocks (docu)
- encapsulating content with begin…end structure
<s + TAB
easy templates (docu)
Some example from a text file.
- more of it in the Babel section later on
- differences between non-source-code blocks (docu):
type | indendation | blank lines | line breaks | Org syntax | notes |
---|---|---|---|---|---|
example | preserved | preserved | preserved | ignored | like SRC block without a language |
verse | preserved | preserved | preserved | recognized | |
quote | preserved | preserved | not preserved | recognized | for quoting text |
center | not preserved | preserved | not preserved | recognized |
This is a test. Demonstration of long lines within a non-source-code block like this or that or something else which is quite good. Space upfront [[id:foobar]] *bold* /italic/
This is a test.
Demonstration of long lines within a non-source-code block like this or that or something else which is quite good.
Space upfront
id:foobar bold italic
This is a test.
Demonstration of long lines within a non-source-code block like this or that or something else which is quite good.
Space upfront
id:foobar bold italic
1.9 links (docu)
[[link]] [[link][description]]
target:
# <<link>>
- id:myexampleid
- ~/.zshrc.local
- http://orgmode.org
- custom links: contact:John Smith
C-c l
store link (also in many other buffer types: docu)C-c C-l
inserting link (or edit existing link)C-u C-c C-l
file link (shortcut)C-c C-o
open linkC-c C-x C-n
goto next linkC-c C-x C-p
goto previous link- “radio targets” are auto-links created by target like
<<<target name>>>
- all occurrences of “target name” will be links
C-c C-x C-v
toggle show inline imagesC-c %
push position into ringC-c &
goto last saved position in ring- footnotes (docu)
- plain :great content here
- with own label mylabel
- reference myotherlabel 2
C-c C-c
jump between footnote and referenceC-c C-x f
footnote action command (see docu)
myotherlabel This is a footnote from reference above. 2 This is a footnote with a simple number as label.
- many external link types see docu
great content here
foo bar
great content here
1.10 states; TODO items (docu)
C-c C-t
rotate TODO stateC-c / t
sparse tree with TODOsC-c a t
global TODO list in agendaC-S-RET
new TODO heading- per-file keywords
#+TODO: TODO(t) FEEDBACK(f) | DONE(d!) CANCELED(c!@)
!
timestamp@
add note
great content here
- simple, ordered method with PROPERTIES drawer:
:ORDERED: t
C-c C-x o
toggle ORDERED property- see only tasks that are not depending on other open tasks
- see only things that can be done now
- http://orgmode.org/worg/org-contrib/org-depend.html
- to define workflows (see demo below)
- task dependencies with org-depend (docu)
:BLOCKER: an-heading-id another-heading-id
define blocking task:TRIGGER: chain-siblings(NEXT)
define trigger for setting NEXT:TRIGGER: my-heading-id(NEXT)
define trigger for specific heading to set to NEXT
great content here
great content here
great content here
great content here
great content here
great content here
After setting this task to DONE, enjoying new clothes get to state NEXT and looking out for next errands to TODO.
great content here
great content here
I can not finish this task as long as I did not enjoy my new clothes.
great content here
- org-edna: bit more complex syntax compared to org-depend but also more powerful
- same general approach using
:BLOCKER:
and:TRIGGER:
properties - task dependencies with org-edna:
:BLOCKER: ids("an-heading-id" "another-heading-id")
define blocking task:BLOCKER: ids("id:an-heading-id" "another-heading-id")
same example but navigable id:TRIGGER: ids("my-heading-id") todo!(NEXT) scheduled!("++3d")
define trigger for specific heading to set to NEXT and schedule 3 days later
great content here
great content here
After setting this task to DONE, enjoying new clothes get to state NEXT and looking out for next errands to TODO.
great content here
great content here
I can not finish this task as long as I did not enjoy my new clothes.
great content here
1.10.3 logging state changes (docu)
!
in todo state definitionorg-log-into-drawer
for setting default behavior
great content here
1.10.4 habits (docu)
- enable habits module by customizing the variable
org-modules
- TODO items with property STYLE is set to the value
habit
:
:STYLE: habit
** TODO Shave SCHEDULED: <2009-10-17 Sat .+2d/4d> - 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] :PROPERTIES: :STYLE: habit :LAST_REPEAT: [2009-10-19 Mon 00:36] :END:
great content here
1.10.5 priorities (docu)
C-c ,
set prioritiesS-UP/DOWN
change priority- [A], [B], [C]
- no priority is ordered like [B]
great content here
great content here
1.10.6 breaking down in subtasks (docu)
- for TODO-headings: stat cookies
[/]
or[%]
(will be[1/3]
or[33%]
) - also possible:
- for checkboxes
- recursive
- mark entry to DONE if all children are DONE
great content here
great content here
great content here
great content here
great content here
C-c C-x C-v
org-toggle-inline-images
great content here
1.12 tags (docu)
- inherited tags
- per-file definition of tags:
#+TAGS: { @work(w) @home(h) } online(o) kids(k)
- per-file tags for all entries:
#+FILETAGS: :this:that:foo:
C-c C-q
set tagsC-c C-c
set tags if cursor is on a headingC-c / m
search for tags in sparse treeC-c a m
global list of tag matchingC-c a M
same but check only TODO items- syntax (docu)
+boss+urgent
ANDboss|urgent
OR+boss+urgent-project
combination of tagswork+TODO="WAITING"|home+TODO="WAITING"
Waiting tasks both at work and at home
great content here
great content here
1.12.2 Tag groups (docu)
- searching for a group tag return matches of all member tags as well
- example:
(setq org-tag-alist '((:startgroup . nil)
("@read" . nil)
(:grouptags . nil)
("@read_book" . nil)
("@read_ebook" . nil)
(:endgroup . nil)))
- searching for “@read” also returns “@read_book” and “@read_ebook”
great content here
1.13 tables simple (docu)
C-c C-c
update tableTAB
move next fieldRET
next rowM-LEFT/RIGHT/UP/DOWN
moving rows/columnsC-c -
insert vertical bar belowC-c |
convert region into table OR: insert new tableC-c ^
sort lines (in region)- [ ] DEMO: create table
great content here
C-c |
move region into table (see docu)- TABs, CSV, …
C-c +
sum current column (or marked rectangle)=$1+$2
value = sum of 1st and 2nd column:=vsum(@I..@II)
field = sum between 1st and 2nd hlineC-u C-u C-c C-c
recompute table with iterations (docu)#+TBLFM: $3 = $1 + $2
table formula
- ~#+TBLFM: $1 = -1 + 1
- @2$1 = 1~ incremental numbers
org-table-import
import data from CSV fileorg-table-export
export data to CSV file
US-Dollar | EUR | ||
1 | 0.76481836 | ||
When | What | USD | EUR |
---|---|---|---|
2012-02-03 | Taxi Graz-Airport | 18.00 | |
2012-02-03 | Taxi Seattle Airport | 25.00 | 19.12 |
2012-02-13 | Taxi | 7.00 | 5.35 |
2012-02-14 | Taxi | 8.00 | 6.12 |
2012-02-17 | Taxi to Airport SeaTac | 35.00 | 26.77 |
2012-02-22 | Taxi Airport-Graz | 16.00 | |
91.36 |
C-c C-c
update valuesC-c }
visualize rows/columnsC-c '
edit formula in separate bufferC-c C-r
switch between internal references (@3$2) and standard references (B3)S-<up>/<down>/<left>/<right>
shift reference at point
- debugging formulas
- many, many, many more table features in the documentation!
- http://orgmode.org/worg/org-tutorials/index.html#sec-3-2
- http://orgmode.org/worg/org-faq.html#Tables
- http://orgmode.org/worg/org-hacks.html#sec-1-4
- calculations using time, date, hex, GPS, …
great content here
Here is another example working with tables and referencing other tables. I did this example twice: first in a column (vertical) based layout and then the very same example in a row (horizontal) based layout:
great content here
Income May 2012 | Income June 2012 | |
---|---|---|
Joe | 12 | 10 |
Alice | 22 | 24 |
Bob | 16 | 17 |
sum | 50 | 51 |
June 2012 (from above) | plus 20 percent | June 2013 | Difference | |
---|---|---|---|---|
Joe | 10 | 12.0 | 11 | -1.0 |
Alice | 24 | 28.8 | 31 | 2.2 |
Bob | 17 | 20.4 | 21 | 0.6 |
sum | 51 | 1.8 |
- all formulas explained in detail:
@>$5=vsum(@I..@II)
- value:
1.8
- last row (
@>
) of column five ($5
) is the sum of column five between first and second horizontal line (@I..@II
)
- value:
@>$3=string("")
- no value (empty)
- overwrite the last row (
@>
) of column three ($3
) with an empty string - otherwise it would get 1.2 times the value of corresponding column of table Income2012v as well - I chose not to want this sum in this column
$1='(identity remote(Income2012v, @@#$1))
- values:
Joe
untilsum
- copy content of the first column of table “Income2012v”
(Lisp formula
'(identity remote(Income2012v, @@#$1))
) to the first column in this table ($1
) - the “identity” statement prevents calc from interpreting the content
- this is because I am too lazy to enter all names once again :-)
- see also Org-hacks for field formulas
- values:
$2='(identity remote(Income2012v, @@#$3))
- values:
10; 24; 17; 51
- copy the content of the second column of table “Income2012v” to the second column in this table
- you could skip this column and calculate the values of the next
columns with direct references to
remote(Income2012v, @@#$3)
as well. However, it is more easy to compare visually if the values from 2012 are shown here as well (usability/readability) - note: by convention, only the values after the first horizontal line are taken
- values:
$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 third column of table “Income2012v” with one decimal place (;%.1f
) - note: 61.2 (1.2 times 51) is overwritten by formula
@>$3
from above
- values:
$5=$4-$3;%.1f
- values:
-1.0; 2.2; 0.6
- column five (
$5
) is the difference between column four to column three with one decimal place
- values:
Here is another example: how to sum up the numbers of the first column so far:
Numbers | Sum of numbers so far |
---|---|
1 | 1 |
5 | 6 |
10 | 16 |
50 | 66 |
200 | 266 |
1000 | 1266 |
The formular can be simplified even more by using a column formula:
#+TBLFM: $2=vsum(@2$1..$-1)
provides the same result as above.
great content here
Joe | Alice | Bob | sum | |
Income May 2012 | 12 | 22 | 16 | 50 |
Income June 2012 | 10 | 24 | 17 | 51 |
Joe | Alice | Bob | sum | |
Income June 2012 | 10 | 24 | 17 | 51 |
plus 20 percent | 12.0 | 28.8 | 20.4 | 60.0 |
June 2013 | 11 | 31 | 21 | |
Difference | -1.0 | 2.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
) of column two to four of fifth row (@5$2..@5$4
)
- value:
@1$2..@1$4='(identity 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
- values:
@2='(identity remote(Income2012h, @3$$#))
- values:
2012 Income June | 10 | 24 | 17 | 51
- the second row (
@2
) is copied from the corresponding fields of the first row (@1$$#
) of table “Income2012h” - my guess: “2012” is moved to the beginning of the field most probably because it is interpreted as numeric value and not as string
- values:
@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 120 percent of the corresponding values of the third row (@3$$#
) of the table “Income2012h” with one decimal place (;%.1f
)
- values:
@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 the difference of the values in the corresponding values of the fourth row and the third row (@4-@3
) with one decimal place (;%.1f
)
- values:
great content here
1.15 column view (docu)
C-c C-x C-c
activate column viewe
edit valuen/p
next/previous valueq
quit column viewa
edit allowed valuesC-c C-x p
set property
great content here
great content here
great content here
1.16 capture, refile, archive (docu)
C-c c
captureC-c C-w
refileC-c C-x C-a
archiveC-u C-u C-c c
goto last capture#+ARCHIVE: %s_done::
per-file archiveC-c C-x a
toggle ARCHIVE tagC-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 |")
)
)
great content here
1.17 attachments (docu)
C-c C-a
org-attach (menu)i
inherits
set directorya
attach: move file to task directoryc/m/l
attach: copy/move/link file
- much more
great content here
1.18 dates & time (docu)
C-c .
insert active <2012-04-23 Mon> (withC-u
: <2012-04-23 Mon 19:14>)C-c !
insert inactive [2012-04-23 Mon] (withC-u
: [2012-04-23 Mon 19:14])S-RIGHT/LEFT/UP/DOWN
interactively change timestampC-c <
insert todayC-c C-o
open agenda for current timestampC-c C-d
insert DEADLINEC-c C-s
insert SCHEDULEDC-u C-c C-d
removing DEADLINEC-u C-c C-s
removing SCHEDULEDC-c / d
sparse tree with deadlinesDEADLINE <YYYY-MM-DD DoW +2d>
defining repeated events/tasks.+2w
repetition interval starting with last DONE timestamp++3m
never show multiple times even if not DONE.+2d/4d
show up on agenda not earlier as 2 days until 4 days+1w -2d
repeat weekly but show not earlier as two days beforeC-c C-x c
clone (recurring) event with time-shift (org-clone-subtree-with-time-shift
)- good idea: create recurring event and clone it with time-shift
- this way, canceling single events or moving single events is possible
13:00-15:15
or13:00+2:15
time range<2013-11-15 Fri>-<2013-11-17 Sun>
date rangeC-c C-y
return time range between datesUP/DOWN
on time stamp start/end -> toggle active/inactive
Note: please do not use time-stamps prior to UNIX epoch which is 1970-01-01. Some systems do handle those time-stamps fine, others produce errors.
great content here
1.18.1 advanced date/time with sexp (docu)
To do a thing every x days between two dates, put:
%%(and (diary-cyclic x M1 D1 Y1) (diary-block M1 D1 Y1 M2 D2 Y2)) thing
22:00-23:00 The nerd meeting on every 2nd Thursday of the month
<%%(diary-float t 4 2)>
great content here
1.19 agenda (docu)
C-c [
add buffer to agendaC-c ]
remove buffer from agendaC-c a
show agenda command menuC-c a a
invoke agenda viewC-c C-x <
lock agenda to subtreeC-c C-x >
release agenda restriction lock
when being in agenda mode:
q
quit agendaj
jump to date.
goto todayf/b
forward/backv
choose view menud/w
day/week viewv d/w/m
view for day/week/monthr
refreshRET
goto itemSPC
show item<
toggle filter to fileF
toggle follow modeo
delete other window/
filter by tagE
toggle entry textR
toggle clock reportt
change TODO state:
orT
set tagsS-UP/DOWN
set priority,
set priorityS-LEFT/RIGHT
change timestamp day>
change timestamp to todaye
set effortm
marku
unmarkB
bulk actionS
scatter marked TODOs over the next N days
- clocking
I
startO
stopX
cancelJ
jump to running clock entry
- attachments to TODO entries
C-c C-a
attachment menuC-c C-a s
set attachment folderC-c C-a i
inherit attachment folderC-c C-a o
open attachment
- learn how to create your own agenda views:
great content here
1.20 clocking time (docu)
C-c C-x C-i
start clock on itemC-c C-x C-o/x
stop or cancel clock on itemC-c C-x C-d
display total subtree timesC-c C-c
remove displayed timesC-c C-x C-r
insert/update table with report- please do read Irreal: Org Clocking and Idle Time for handling idle time for clocking
great content here
Clock summary at [2012-11-19 Mon 11:17]
Headline | Time |
---|---|
Total time | 27:16 |
great content here
great content here
great content here
1.21 dynamic blocks with ELISP (docu)
- execute ELISP functions in special blocks (see docu)
C-c C-x C-u
update blockC-u C-c C-x C-u
update buffer blocks
great content here
1.22 source code (docu)
- python “Hello World”
C-c '
edit in native mode<s + TAB
easy templates (docu)
def foo(argument):
print ("Hello World")
foo(42)
great content here
1.23 babel (docu)
- http://orgmode.org/org.html#Languages
- 2012-04-23: 35(!) languages
C-c C-c
execute codeC-c C-v j
insert header argument (menu)- many shortcuts for all kind of things
- debugging
- output control
- navigation
- session handling
C-c C-v b
execute babel in bufferC-c C-v s
execute babel in subtree
great content here
1.23.1 babel simple (doc)
- some examples are taken from Worg: Introduction to Babel
great content here
pwd
great content here
require 'date'
"This file was last evaluated on #{Date.today}"
great content here
return 42 + 7
great content here
+---------+
| cBLU |
| |
| +----+
| |cPNK|
| | |
+----+----+
great content here
great content here
cd ~/archive/events_memories && du -sc * |grep -v total
Using result set “directories” from above as “dirs” in R below:
pie(dirs[,1], labels = dirs[,2])
great content here
- Examples in this session is inspired by a great DevOps-demo video by Howard Abrams (Demo material)
Executing shell commands:
echo "Executed by `whoami` on `hostname` in `pwd`"
Doing something as root:
apt-get update
Switching to a remote host:
ssh [email protected] 'echo "Executed by `whoami` on `hostname` in `pwd`"'
great content here
Note: results
, dir
, and session
parameters for babel are placed
in the PROPERTIES
drawer above.
Do stuff remote:
echo "Executed by `whoami` on `hostname` in `pwd`"
date
See interactive shell in buffer: 2015-11-02-ssh-testsession
great content here
time = epoch
import datetime
strtime = str(time)
datetimestamp = datetime.datetime.utcfromtimestamp(int(strtime[:10]))
print(datetimestamp.strftime('[%Y-%m-%d %a %H:%M:%S]'))
UNIX epoch | time-stamp |
---|---|
1262675465119 | [2010-01-05 Tue 07:11] |
1234567890 | [2009-02-13 Fri 23:31] |
1000000000 | [2001-09-09 Sun 01:46] |
great content here
1.24 LaTeX (docu)
C-c '
open block native bufferC-c C-x C-l
preview LaTeX fragmentsC-c C-c
quit previewC-c C-x \
toggle preview TeX characters as UTF-8
Greek characters α β φ \LaTeX{}
M-x org-cdlatex-mode
CDLaTeX minor mode- from http://staff.science.uva.nl/~dominik/Tools/cdlatex/
- similar to AucTeX
C-c {
insert environmentequ TAB
expands equation`
insert math symbols (menu)
great content here
1.25 export formats (docu)
C-c C-e
export menuC-c ;
toggle COMMENT keyword on entry- tag: “noexport”
- ASCII/Latin-1/UTF-8 export
- HTML
- LaTeX
- DocBook
- OpenDocument Text
- TaskJuggler
- Freemind
- XOXO
- iCalendar
- Pandoc
- …
- [ ] DEMO: export this as PDF (plain)
- [ ] DEMO: export this as PDF (beamer)
great content here
1.25.1 Export options (docu)
- per file:
C-c C-e t
(org-insert-export-options-template)
- per heading:
- see properties drawer above
- EXPORT_OPTIONS: see docu
great content here
1.26 MobileOrg (docu)
- great iOS app
- no iOS on my side
- does not seem to be maintained any more :-(
- Android app
- sync via Dropbox, ssh, scp, WEBDAV, gpg encryption, …
;;; http://orgmode.org/org.html#MobileOrg
;;; directory where to store MobileOrg-files
(setq org-mobile-directory "~/share/all/org-mode/mobile-org/")
(setq org-directory "~/share/all/org-mode")
(setq org-mobile-inbox-for-pull "~/share/all/org-mode/inbox.org")
(setq org-mobile-force-id-on-agenda-items nil)
'(org-mobile-files (quote ("~/share/all/org-mode/contacts.org" "~/data/share/all/org-mode/hardware.org" )))
- http://www.orgzly.com/ (since approx. 2015-01)
- promising new app
great content here
- sections above are only a small fraction of the feature-set of Org-mode!
- read the manual or the mailinglist to get inspired :-)
great content here
- per configuration
- per file
- per heading
great content here
Things I did not include yet but are worth mentioning:
- [ ] org-protocol
great content here