Chaque titre commence par un ou plusieurs *
Visibility of the headline hierarchy:
- Local visibility cycling with
<TAB>
- Global visibility cycling with
S-<TAB>
Increase or decrease level with S-M RIGHT
or S-M LEFT
Move up/down within a level with S-M UP
or S-M DOWN
Move a headline under another top level headline:
Cursor on the headline and then C-c C-w
Default is TODO and DONE
Cycling through them with S RIGHT
or S LEFT
More keywords can be defined with a line #+SEQ_TODO
:
- Items left of | are TODO items
- Items right of | are DONE items
Activate line with C-c C-c
Get a menu of all keywords: C-c C-t
Scheduling is done with C-c C-s
Deadlines are defined with C-c C-d
Switch to agenda view with C-a a
Follow mode with S-F
Move forward with f
or backward with b
Some tasks occur frequently, so we should schedule them frequently.
To schedule a repeating task you need to modify the timestamp: eg. < 2018-07-04 Mer [REPEAT]>
The term [REPEAT] can be:
+1w
Next occurence in one week. (w=week, d=day, m=month, y=year).++1w
Next occurence on the same day of week, but definitely in the future..+4w
Next occurence 4 weeks after the task is marked as done.
Checklists provide a simple “checkoff” list.
Checklists start with
- [ ] Text for checkitem
New checklist lines can be added with C-c C-x M
(the capital letter ‘M’ not the Meta key)
You can see the completion of the checklist with [/]
or [%]
on the headline
Checkboxes are toggled with C-c C-c
Tags can be added to headlines and are often used as a way to mark GTD contexts.
Tags can be predefined with a line #+TAGS: PHONE(o)......
at the beginning of the file.
To assign a tag to a headline use C-c C-q
If you have predefined tags with keys assigned, you see a menu, but you still can enter free tags by
pressing <TAB>
. Finish definition with Enter
.
In the agenda view:
Key | Function |
---|---|
A | Agenda for the current week or day |
S-l | Timeline for current buffer |
t | List of all TODO entries |
S-t | Entries with a special TODO keyword |
m | Match tags / properties / TODO keywords |
S-m | Like before, but only TODO entries |
s | Search for keywords |
From the agenda view:
S-c
Edit custom agenda views
Drawers start with a line :DRAWERNAME:
and end with the next line that says :END:
.
Everything between those lines is hidden when the drawer is closed. Open/close a drawer with <TAB>
.
Reserved drawer names are e.g. :LOGBOOK:
or :PROPERTIES:
Customize org-log-into-drawer
to LOGBOOK.
Take quick notes with C-c C-z
Finish and store the note with C-c C-c
Finished tasks clutter up your org files, so it’s time to move them out the way.
Define a global archive file with #+ARCHIVE: filename.org::
Archive an entry with C-c C-x C-a
Archive a subtree with C-c C-x C-s
Search all subtrees under a headline and see which one can be archived with this keys
C-u C-c C-x C-s
Goal: Get a logbook entry whenever a TODO keyword changes
#+SEQ_TODO: TODO(t@/!)
t
hotkey assigned to that todo keyword@
log a timestamp and a note when this is entered!
log a timestamp when you leave that keyword
Goal: Log a CLOSED
timestamp when something is done
Customize variable org-log-done
Goal: Log a note with a timestamp everytime something is reschedule
Customize variable org-log-reschedule
Goal: Instead of one file for all we want to have one for private things and one for work.
Procedure:
- Customize
org-agenda-files
so that both files are used to generate the agenda views. - Customize refile function (fine tuning)
org-refile-targets
org-refile-use-outline-path
org-refile-allow-creating-parent-nodes
- Move entries with
C-c C-w
- Copy enries with
C-c M-w
Goal: Capturing tasks, ideas and whatever
Procedure:
- Define a capture key in your
.emacs
file:
(global-set-key (kbd "<f6>") 'org-capture)
- Write template files (eg. tpl-todo.txt)
- Press your capture
f6
key andS-c
to configure- Hotkey for capture
- Destination
- Format
- Based on what template file or text
- Start capturing
The :PROPERTIES:
drawer stores task specific settings and used defined attributes.
Important: the :PROPERTIES:
drawer must immediately follow the headline.
Goal: You don’t want to create a log enry every time a task is done.
Recipe: Define a :LOGGING:
property with value nil
.
Matching properties in agenda views is possible too.
Goal: You want to archive your read books in an extra file and not inside the global archive.
Recipe: Define an :ARCHIVE:
property with the target name eg. :ARCHIVE:
track-books::* Read books
Definition is done on the top hierarchy level and then inherited to its children.
Goal: Tasks must be completed one after the other.
Recipe: Define the :ORDERED:
property with value t
.
Toggle the :ORDERED:
property with C-c C-x o
Customizing variables:
'(org-enforce-todo-dependencies t)
'(org-track-ordered-property-with-tag t)
More customization:
org-agenda-dim-blocked-tasks
org-enforce-todo-checkbox-dependencies
Goal: Start a countdown timer.
Recipe: Start it with C-c C-x :
Goal: Start a relative timer
Recipe:
Command | Shortcut |
---|---|
Start timer | C-c C-x 0 |
Start with offset | C-u C-c C-x 0 |
Insert simple time stamp | C-c C-x . |
Insert description time stamp | C-c C-x - |
Pause timer | =C-c C-x ,= |
Start again | =C-c C-x ,= |
Stop with | =C-u C-c C-x ,= |
Goal: Measure how long you need for a task
- Clock in
C-c C-x C-i
- Clock out
C-c C-x C-o
Customization
'(org-clock-into-drawer "CLOCKING")
More key combinations:
Command | shortcut |
---|---|
Restart a clock | C-c C-x C-x |
Restart with menu | C-u C-c C-x C-x |
Jump to clocked task | C-c C-x C-j |
Cancel clock | C-c C-x C-q |
Show times | C-c C-x C-d |
Goal: Show your org file in columns
Recipe: Define columns like that
#+COLUMNS:%7TODO(To Do)%58ITEM(Task)....
Column view can be set locally with the :COLUMNS:
property drawer.
Show column view C-c C-x C-c
Leave view q
Goal: Estimate the effort that you task will need.
Recipe: Effort estimates are stored in a property :Effort:
Easy setup: Define #+PROPERTY:Effort_ALL
and then possible values. Add this to column view with %8Effort(Effort){:}
.
The {:}
means sum up times.
Show column view with C-c C-x C-c
Increase effort: S-rarrow
Decrease effort: S-larrow
Leave view q
Goal: Link to other items in the actual file.
Recipe: A link looks like that
[[target]]
You can also use a description like
[[target][description]]
Targets:
- A headline
- A place in the document with a
#+NAME:
target line - An item with a
:CUSTOM_ID:
property
Special:
- Radio targets that look like this
<<<target>>>
create a link on the fly
Key combinations:
command | shortcut |
---|---|
Edit links with | C-c C-l |
Follow link with | C-c C-o |
Return to previous position | C-c & |
Goal: Link to other items somewhere in the world.
Recipe: A link looks like that:
[[target]]
You can also use a description like
[[target][description]]
Targets: protocol:location
Special: Linking to items with an ID property ID is an UUID that you create with M-x org-id-get-create
Shortcut:
The purpose of this code is that it creates ID properties for every headline (if there isn’t one already) when you save your OrgMode file.
;; Credit: http://stackoverflow.com/questions/13340616/assign-ids-to-every-entry-in-org-mode
(defun my/org-add-ids-to-headlines-in-file ()
"Add ID properties to all headlines in the current file which
do not already have one."
(interactive)
(org-map-entries 'org-id-get-create))
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'before-save-hook 'my/org-add-ids-to-headlines-in-file nil 'local)))
This function is bound to the F5 key. Whenever you press F5 then it takes the ID and copies it to the killring (aka Clipboard). If the headline has no ID property it creates one. In that way, you can easily create links to IDs because copying the ID is just one keystroke.
;; Credit: https://koenig-haunstetten.de/2016/07/09/code-snippet-for-orgmode-e05s02/
(defun my/copy-id-to-clipboard() "Copy the ID property value to killring,
if no ID is there then create a new unique ID.
This function works only in org-mode buffers.
The purpose of this function is to easily construct id:-links to
org-mode items. If its assigned to a key it saves you marking the
text and copying to the killring."
(interactive)
(when (eq major-mode 'org-mode) ; do this only in org-mode buffers
(setq mytmpid (funcall 'org-id-get-create))
(kill-new mytmpid)
(message "Copied %s to killring (clipboard)" mytmpid)
))
(global-set-key (kbd "") 'my/copy-id-to-clipboard)
Customizing: org-id-locations-file
stores in what file orgmode should look for IDs.
Most of these notes comes from Rainer König video serie on OrgMode tutorial.