#+HTML_HEAD <link rel=”stylesheet” type=”text/css” href=”stylesheet.css” />
C-c C-n
Next headingC-c C-p
Previous headingC-c C-u
backward to a higher level headingC-c C-j
org-goto…it is super nice!!
Org mode has some VERY handy ways of keeping track of todo items.
When point is on a heading, pressing “C-c C-t” when insert a TODO at the begining of the line, indicatating that it is an item that needs to be completed. Pressing “C-c C-t” changes the TODO “DONE”. You can change the default values as well.
- State “TODO” from [2015-10-31 Sat 20:20]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “DONE” from “TODO” [2015-10-31 Sat 20:22]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “DONE” from “TODO” [2015-10-31 Sat 20:21]
- State “TODO” from [2015-10-31 Sat 20:21]
- State “DONE” from [2015-10-31 Sat 20:22]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “DONE” from “TODO” [2015-10-31 Sat 20:21]
- State “TODO” from [2015-10-31 Sat 20:21]
- State “TODO” from [2015-10-31 Sat 20:21]
- State “TODO” from [2015-10-31 Sat 20:22]
- State “DONE” from “TODO” [2015-10-31 Sat 20:22]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “TODO” from [2015-10-31 Sat 20:20]
- State “DONE” from [2015-10-31 Sat 20:23]
- State “STARTED” from [2015-10-31 Sat 20:23]
- State “TODO” from [2015-10-31 Sat 20:24]
- [ ] pickles
- [X] onions
- [X] lettuce
v d
ord
shows’ today’s agendav w
orw
shows this week’s agendav m
view this month’s agendav t
shows the fortnight.
goto today’s agendaj
goto a specified dateJ
goto the currently clocked in taskv c
shows you overlapping clock entriesr
redraw the agenda bufferC-k
kill the current agenda item in the agenda buffer and in the fileC-c C-w
refile the entryT
show the tags of an entry:
set the tags for the current entry,
set the priority of the itemP
show the priority of the item+
Increase its priority-
minus its priorityz
add a note to the entry>
change the timestamp with that entryI
clock in on an entryO
clockout on an entryX
cancel the current running clockm
mark the entry at pointu
undo the marked pointU
unmark all marked entries%
mark via regexp
- (org-agenda-log-mode) enteries that were marked done while logging was on, are shone in hte agenda, as are entries that have been clocked today.
- (org-agenda-clockreport-mode) the agenda view will show a table with all your currently clocked time on tasks.
- (org-agenda-entry-text-mode)
In an org buffer type C-c C-e and org-mode will open a buffer that will prompt you for how you would like to export your document.
info:org#Export settings Export options can be set globally with variables, but its much easier to specify your export options in your org buffer
For example
#+OPTIONS: toc:nil DATE:<2015-11-20 Fri>
will not export your table of contents and specifies an export date
+TOC:nil
does nothing
- = Trees with the tag
:noexport:
means they won’t be exported
- An sql example
:PROPERTIES:
:engine: mysql
:dbhost: localhost
:dbuser: root
:dbpassword: <your password here>
:database: usbc
:END:
SELECT first, last FROM users WHERE last = 'Branson' limit 5
first | last |
---|---|
Joshua | Branson |
Joshua | Branson |
Joshua | Branson |
Joshua | Branson |
That “my_query” block can be passed as input to the following code block
(print x)
One can also tell emacs NOT to export the results of a code execution via
This just mean that when you export the document to html, pdf, .odt, etc., then you will not see that code block’s source code or results.
- A gnu plot example
set title "My First Plot"; plot 'data'; print "all done!"
fsolve (x*2 + 4 = 5, x)
fsolve([x + y = a, x - y = b],[x,y])
integ (x**2,x)
plot x**2 with lines
ls
double pi = 4*atan(1);
double r, theta, phi;
r = sqrt(x*x+y*y+z*z);
theta = acos(z/r) * 180.0/pi;
phi = atan2(y,x) * 180.0/pi;
printf("%f %f %f", r, theta, phi);
10.816654 22.406871 75.963757
To include multiple C header files
Sometimes you may need to generate org-mode source code inside your document for exporting. So to do that you do:
print "foo"
#+END_SRC
2*3
6
(mapcar (lambda (el) (* el el)) (append '(1 7 3 4) (list n)))
1 | 49 | 9 | 16 | 25 |
1 |
2 |
3 |
(+ 1 (length lst))
4
*
echo "This file takes up `du -h org-babel.org |sed 's/\([0-9k]*\)[ ]*org-babel.org/\1/'`"
pacman -Q firefox
This program lists duplicate files. It runs md5sum on the files to find the duplicates https://www.maketecheasier.com/remove-duplicate-files-linux/
find -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
In this example both the lisp code and the results will be exported:
(print "hello")
hello
So, we make a named code block in the si.org file called “figure-1”. Then we call it like this:
#+call: si.org:figure-1() :wrap html
ob-http mode
GET https://api.github.com/repos/zweifisch/ob-http/languages
Accept: application/vnd.github.moondragon+json
:var [<variable name>=<[ literal_value | #+table_name ]>] [<variable name>=<[ literal_value | #+table_name ]>] …
x + y + z
1.89
5 gallons of gas costs
5 * gas
ls | grep -m 5 -e ".*org" -
:exports [both | results | code | none]
Export specifies what needs to be saved when you export the document
groceries | 50 |
rent | 800 |
debt | 500 |
electric | 100 |
---|
for output in $name; do
echo $name
done
2+a*x**y
Money I earn in a month | Expenses | Expenses$ | Total |
---|---|---|---|
2000 | groceries | 500 | |
100 | gas | 200 | |
700 |
One refers to a specific table in org, @ROW$COLUMN. Sometimes its hard to see the column and row values. To show these, anywhere in the table type C-c }
. Typing C-c }
again, will turn hide the row and column values. You can add columns fairly easily. For example, let’s sum my expenses for the month: at the bottom of my expenses row, type in =@2$3 + @3$3
But let’s say that you have lots of expenses. How can I add a range of values? in the total section under expenses type:
=vsum(@2$3..@5$3)
Money I earn in a month | Expenses | Expenses$ | Total |
---|---|---|---|
2000 | groceries | 500 | |
100 | gas | 200 | |
800 | rent | 450 | |
20 | entertainment | 20 | |
1170 |
C-c *
recalculates that table rowC-}
toggles showing the row and column numbersC-{
toggles formula debuggingC-c |
convert the active region to a tableTAB
moves you to the next columnS-TAB
takes you back to the last columnorg-table-delete-column
deletes the column point is inC-c -
insert a horizontal line below pointC-c SPC
blank the field at pointM-left
move column to the leftM-right
move column to the rightC-c '
edit the field in a seperate window=C-c SPC
blank the field at pointC-c <RET>
insert a horizontal row below pointC-c ^
sort the current table, by the column that point is in alphabetically or numerically SUPER COOL.
When in an org file, you can change the file to column view. You can define a custom column format for the whole file with:
#+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
You can define a column view for a specific subtree with
** Top node for columns view
:PROPERTIES:
:COLUMNS: %25ITEM %TAGS %PRIORITY %TODO
:END:
* hello there you cool people
* hello C-RET will make a new item in this list
* here is that new item!
When you have a list like the one above, to add to it just type C-RET, but when you have a list like the one below, you need to type M-RET.
1) tahsetnhaentuh
2) snthaoentuhesntuh
3)
4)
5)
6)
This paragraph would mess up your list. If you try to start a new list here, org will assume that it should start at "1)". To fix it, you have to include the =[@<number>] text [@<number>]=.
7) [@7] sntahenusth [@7]
8)
\[ \hat{F}(ν) = \frac{G(ν)}{H(ν)}. \]
There are other ways that I’m supposed to be able to make latex fragments
If
\begin{equation} x=\sqrt{b} \end{equation}
org-preview latex fragment with “C-c C-x C-l”
\begin{equation} R=-µ\fraq{dux}{dy} \end{equation}
You can specify entries that will be used for generating an index during publishing. This is done by lines starting with `#+INDEX’. An entry the contains an exclamation mark will create a sub item. See *note Generating an index:: for more information.
- Curriculum Vitae
A
redraw the agenda view and prompt for how you want itd
show the day’s vieww
show the week’s viewf
go forward in timeb
go backward in timej
jump to a specific date.
jump to todayD
toggle inclusion of diary entriesvl
toggle logbook mode.vR
will toggle clockreport mode. You will see a table showing you the total amount of timevc
show overlaping clock entries, clocking gaps, or other clocking problems. Then press l to return to the normal agenda viewG
toggle displaying of the time grid in the viewg/r
redraw the agenda buffer/
filter by tag\
narrow the agenda buffer further by another tag=
filter the agenda view by regexp|
remove all filters on the agenda viewa
archive the item at pointT
show the tags associated with the current item:
set the tags for the current item,
set the priority of the itemz
add a note to this entryC-c C-s
attach an item to this itemI
clock inm
mark the agenda itemu
unmark the itemU
unmark all items%
mark all entries via a regexpB
do a bulk action on the marked items in the agenda
When inside the calendar/agenda
i
insert a new entry into the diaryM
show the date phases of the moonS
show sunrise and sunset timesH
show upcoming Holidays- =
bbdb:Nathaniel Simone How cool is that?
To do this “C-c I” bbdb RET <name of person>
To do this “C-c I” mailto RET <email address>
Org mode supports insertion of empty structural elements (like #+BEGIN_SRC and #+END_SRC pairs) with just a few key strokes. This is achieved through a native template expansion mechanism. Note that Emacs has several other template mechanisms which could be used in a similar way, for example yasnippet.
To insert a structural element, type a ‘<’, followed by a template selector and <TAB>. Completion takes effect only when the above keystrokes are typed on a line by itself.
The following template selectors are currently supported.
- s #+BEGIN_SRC … \ #+END_SRC
- e #+BEGIN_EXAMPLE … \ #+END_EXAMPLE
- q #+BEGIN_QUOTE … \ #+END_QUOTE
- v #+BEGIN_VERSE … \ #+END_VERSE
- c #+BEGIN_CENTER … \ #+END_CENTER
- l #+BEGIN_LaTeX … \ #+END_LaTeX
- L #+LaTeX:
- h #+BEGIN_HTML … \ #+END_HTML
- H #+HTML:
- a #+BEGIN_ASCII … \ #+END_ASCII
- A #+ASCII:
- i #+INDEX: line
- I #+INCLUDE: line
For example, on an empty line, typing “<e” and then pressing TAB, will expand into a complete EXAMPLE template.
You can install additional templates by customizing the variable org-structure-template-alist. See the docstring of the variable for additional details.
I can specify Categories to show up nicely in the agenda buffer Right under a tree item, I can say
* Good Jokes
:PROPERTIES:
:CATEGORY: Projects
:END:
** One time this farmer
Scheduling involves creating timestamps. An active timestamp is enclosed by “<” and “>”, and it will cause the heading it’s in, to show up in the agenda buffer. An inactive timestamp is enclosed by “[” “]” and it will not show up in the agenda buffer. You can schedule to begin working on a TODO item by typing C-c C-s. You can schedule a deadline for a TODO item by typing C-c C-d.
The result is this
* TODO Walk the dog
SCHEDULED: <2015-11-23 Mon>
You can also make items repeatable like so. This tasks repeats everyday and lets you know if you miss it.
* TODO Walk the dog
SCHEDULED: <2015-11-23 Mon +1d>
However the above is not satisfactory. Org-mode provides two nice extensions to this.
The below reminds you to take out your trash once a week. BUT if you forget to do it, it’ll still make you take it out on Monday. The + sign is a precise mathematical operation. It precisely remembers the day to do this task.
* TODO Take out the trash
SCHEDULED: <2015-11-23 Mon ++1w>
The below reminds you to brush your teeth. BUT if you forget to do it, it’ll still tell you do it the next 3rd day. The . is a regexp symbol that can is a variable. In the same way, the day that you do this task is variable.
* TODO Work out
SCHEDULED: <2015-11-23 Mon .+3d>
You can also say that you want to do something at least every third day but at most every fourth day like this
* TODO workout
SCHEDULED: <2015-11-26 Thu .+3d/4d>
To mark a task with a repeater as `DONE’, use `C– 1 C-c C-t’ (i.e., `org-todo’ with a numeric prefix argument of -1.)
Org scheduling will only get you so far. Org timestamps cannot plan things like “The 2nd Thursday of the Month”, but the Emacs Diary Sexp Entries can!
For example, suppose your local bowling team goes bowling on the 3rd Tuesday of every month. Here is how you can schedule that task:
* Go Bowling with the Gents
<%%(diary-float t 2 3)>
If you would like to know more, the documentation for the function “diary-float”, is quite sufficient.