Org-Mode

In-Buffer Settings

This is a reasonable header for a file like example.org.

#+STARTUP: showall
#+TITLE: This is the title
#+DATE: [2020-07-02 Thu]

The showall startup option causes all the headings to be expanded when the document opens. Other interesting options include overview (default), content, indent, and hidestars.

See https://orgmode.org/manual/In_002dbuffer-Settings.html for more.

Timestamps

Insert short timestamp [2020-07-02 Thu] C-c !
Insert long timestamp [2020-07-02 Thu 18:34] C-u C-c !

Outlining (document structure & navigation)

Level 1 heading *
Level 2 heading **
Level 3 heading ***
Unordered list - or +
Ordered list 1., 2., …
Cycle heading subtree visibility TAB
Move heading up (reorder siblings) ESC UP
Move heading down ESC DOWN
Promote heading (one less *) ESC LEFT
Demote heading (one more *) ESC RIGHT

Agenda, Diary, and Calendar

View calendar M-x calendar RET
Close calendar q
.emacs config to enable C-c a shortcut (global-set-key (kbd "C-c a") 'org-agenda)
View agenda and all todos C-c a n
Insert diary entry (edit diary) i (with point on relevant day)
Save and close diary file C-x C-s C-x k RET
Add a todo (edit agenda file) RET (with point on todo list)
Cycle todo status of heading SHIFT-RIGHT or SHIFT-LEFT
Save and close agenda file C-x C-s C-x k RET
Close agenda and todos view q

Useful .emacs custom variables to hide various types of holidays and control how the diary view looks:

'(diary-list-include-blanks t)
'(holiday-bahai-holidays nil)
'(holiday-hebrew-holidays nil)
'(holiday-islamic-holidays nil)
'(org-agenda-include-diary t)
'(org-agenda-start-on-weekday nil)
'(org-agenda-use-time-grid nil)

Tables & Formulas

ACNH Turnip tracking example

* Turnip purchase on [2020-06-28 Sun]
| round | turnips | price each |   bells |
|-------+---------+------------+---------|
|     1 |    2000 |         95 |  190000 |
|     2 |    2200 |         95 |  209000 |
|     3 |    2500 |         95 |  237500 |
|     4 |    1910 |         95 |  181450 |
|     5 |    1920 |         95 |  182400 |
|-------+---------+------------+---------|
|       |   10530 |            | 1000350 |
#+TBLFM: @7$2=vsum(@2..@6)::@7$4=vsum(@2..@6)

* Turnip Prices (small spike)
| Time                        | Bells |  Δ |
|-----------------------------+-------+----|
| [2020-06-29 Mon 10:35]      |    71 |  0 |
| [2020-06-29 Mon 17:58]      |    67 | -4 |
| [2020-06-30 Tue 09:33]      |    88 | 21 |
| [2020-06-30 Tue 13:15]      |   105 | 17 |
| [2020-07-01 Wed 11:08] sold |   103 | -2 |
| [2020-07-01 Wed 12:01] oops |   127 | 24 |
|-----------------------------+-------+----|
#+TBLFM: @3$3..@7$3=$-1-@-1$-1

* Sold Wednesday Morning: profit = 84,240 Bells
| Batch |   Bells |
|-------+---------|
|     1 |  268830 |
|     2 |  278100 |
|     3 |  278100 |
|     4 |  259560 |
|-------+---------|
| total | 1084590 |
#+TBLFM: @6$2=vsum(@2..@5)

Example table with row and column number display turned on

Toggle display of row and column numbers C-c }
Column prefix $
Row prefix @
Range for the 4 cells in the Bells column ($2) @2..@5
   1| Batch |   Bells |
I*1 |$1-----+$2-------|
   2|     1 |  268830 |
   3|     2 |  278100 |
   4|     3 |  278100 |
   5|     4 |  259560 |
I*2 |$1-----+$2-------|
   6| total | 1084590 |
#+TBLFM: @6$2=vsum(@2..@5)

7/2/2020