Welcome back to the tutorial series on Org Mode! This time we’re going to go over basic usage for handling TODO tasks. This is essentially anything you want to do in the future.

Each headline in this tutorial links directly to the official documentation for that concept.

Introduction

This tutorial will be covering a few basic concepts. These are: document structure, dates, scheduling, deadlines, TODO, tags, properties, and agenda. Let’s define these terms before we jump into sections describing how to use them.

  • Document Structure
    How to make an org mode file “work”. Org files follow a very simple structure that allows org mode to give you all the fancy features it has. This also includes basic date formatting for this tutorial.
  • Dates
    How else are you going to know when or how often something happens?
  • Scheduling
    Something that is scheduled occurs on the day it is scheduled, and no other time. A doctor’s appointment is scheduled.
  • Deadlines
    Deadlines are a tasks that can be completed anytime before a specific date. A credit card bill would have a deadline
  • TODO
    This is how we tell org mode if something needs to be done, or is done. You can create your own custom TODO types to do things from assigning a task to someone, to triggering actions like note logging on complete/cancel or logging completion time.
  • Tags
    Just like tagging on a website like flickr. These are words that are related to the entry. Tags are great for organization and searching. They allow you to intelligently narrow down things for custom agenda views by using searches.
  • Properties
    A property is a specific attribute relative to the entry. If you have a task that repeats every week, there may be a LASTREPEAT property that stores the last time you completed that task. Properties are also used for setting specific flags that control how/where/when an entry will appear, and for exporting to another format.
  • Agenda
    The agenda is where you view all the tasks that meet a specific criteria. We will be using Agenda List for this, which will show you all your deadlines and what is scheduled for today.

Document Structure

Org files are generally a tree of entries. The level of the entry is determined by asterisks (*). Everything below an entry belongs to that entry until you get to an entry at the same or lower level.

Entries are the basic way of store tasks and the information associated with them. An example follows below:

* Workout
** Squats             
** Push Ups           
* Programming
** Web
*** That website
** Local
*** Scripts
* Social
** Hipster Festival

Here we can see that squares and push ups are under workout. As scan down you can see how each entry is organized. We will be extending this template as we cover each new concept.

The basic hotkeys you should know when editing a document structure in emacs are:

M-<return> – New header
M-<left/right> – Promote/Demote current header
<TAB> – Collapse/Expand current header
Shift-<TAB> – Collapse/Expand entire document
M-Shift-<left/right> – Promote/Demote subtree
M-Shift-<up/down> – Move Subtree

I prefer to collapse an entry and use C-k (kill to end of line) to delete or cut it. C-y (yank from kill ring) will put it back where your point (cursor) is located.

Todo

Essentially everything we do in org is going to be a TODO. Let’s go ahead and mark the TODOs in our schedule.

* Workout
** TODO Squats        
** TODO Push Ups              
* Programming
** Web
*** TODO That website
** Local
*** Scripts
* Social
** TODO Hipster Festival

There is a lot more to TODO. You can have multiple steps and types, different setups per file, hotkeys, hooks for changing types, child dependencies, change time logging and more.

For now we will only be working with the basic states of TODO and Done. Another tutorial will cover advanced TODO usage.

Dates

Dates are when things occur. Dates are written using ISO 8601 Format.

There are two basic forms of dates.

  • Active
    Active dates appear in the agenda view and other org functions. The are enclosed in < >
  • Inactive
    Inactive dates do not trigger any org related functions. They are simply there for you to see. They are enclosed in [ ]

Date ranges, times, time ranges and repeaters.

  • Date Ranges
    Date ranges are specified by placing 2 dates with double dashes between them. 1986-06-20 Fri 1986-06-22 Sun
  • Times
    Times are simply inserted in 24 hour format after the day. 1989-01-07 Sat 07:55
  • Time ranges
    Time ranges are indicated with a single dash between times. 1938-10-30 Sun 20:15-21:30
  • Repeaters
    Repeaters cause an entry to repeat when it is marked Done. They are placed at the end of the date 1982-08-15 Sun +1y. There are multiple types, here is a basic overview:

    • A lone + sign repeats by that value absolutely. If you are 6 months out of date on a +1m repeater, completing the task will bring you to 5 months out of date.
      The date will always be in +x increments from the first day. A task started on a Sunday will always be on a sunday.
      You would use this for something like a weekly work report, where backlogs must be completed.

    • A ++ brings the task up to date and puts it forward in time. If you complete a task 7 weeks late with a ++2w repeater, the task will now be due again in 1 week. It was moved far enough in time to be due again in the future.
      The date will always be in ++x increments from the first day. A task started on a Sunday will always be on a sunday.
      You would use this for something like a monthly meeting, where attending past meetings is not possible, but the meeting always happens once a month.

    • A .+ brings the task up to date and puts it forward in time relative to today. If you complete a task that is 4 days late with a +1w repeater, it will be due in 1 week form today.
      The date will always be placed .+x from today. A task completed today will need to be completed again in .+x.
      You would use this for scheduling laundry, or cleaning your rain gutters.

Scheduling

Scheduling is very simple. Add the word ‘SCHEDULED:’ in all caps before an active date. You can also use C-c C-s in Emacs.

Now our outline looks like this:

* Workout
** TODO Squats
   SCHEDULED: <2011-07-27 Wed .+1w>
** TODO Push Ups
   SCHEDULED: <2011-07-29 Fri .+1w>
* Programming
** Web
*** TODO That website
** Local
*** Scripts
* Social
** TODO Hipster Festival
   SCHEDULED: <2011-08-18 Thu 20:00>--<2011-08-22 Mon 05:00>

Deadlines

Deadlines are as easy as scheduled dates. Simply use the word “DEADLINE:” instead. You can also use C-c C-d in Emacs.

Now our outline looks like this:

* Workout
** TODO Squats
   SCHEDULED: <2011-07-27 Wed 08:00 .+1w>
** TODO Push Ups
   SCHEDULED: <2011-07-29 Fri 08:00 .+1w>
* Programming
** Web
*** TODO That website
    DEADLINE: <2011-09-05 Mon>
** Local
*** Scripts
* Social
** TODO Hipster Festival
   SCHEDULED: <2011-08-18 Thu 20:00>--<2011-08-22 Mon 05:00>

Tags

Tags are an easy way to assign identifiers to entries. The syntax is very simple.

To assign a tag to an entry, place any series of words after the headline starting with, separated by and ending with a colon. In emacs we can use C-c C-c when positioned on a headline. Here’s how our outline looks when tagged up:

* Workout                                 :exercise:activity:sweat:
** TODO Squats                            :lowerbody:
   SCHEDULED: <2011-07-27 Wed 08:00 .+1w>
** TODO Push Ups                          :upperbody:
   SCHEDULED: <2011-07-29 Fri 08:00 .+1w>
* Programming
** Web
*** TODO That website                     :annoyance:coding:Herbert:
    DEADLINE: <2011-09-05 Mon>
** Local
*** Scripts
* Social
** TODO Hipster Festival                  :music:social:hipster:
   SCHEDULED: <2011-08-18 Thu 20:00>--<2011-08-22 Mon 05:00>

Properties

Properties allow you to embed specific information into an entry that’s easily accessible from other parts of org mode. They also let you use features like habits, last repeat, per entry TODO keywords, time clocking and even use org as a database.

Properties begin with ‘:PROPERTIES:’ and end with ‘:END:’ key value pairs are in ‘:key: value’ format. You can add them with C-c C-x p in emacs.

Let’s add some properties to our outline.

* Workout                                 :exercise:activity:sweat:
** TODO Squats                            :lowerbody:
   SCHEDULED: <2011-07-27 Wed 08:00 .+1w>
   :PROPERTIES:
   :STYLE: habit
   :END:
** TODO Push Ups                          :upperbody:
   SCHEDULED: <2011-07-29 Fri 08:00 .+1w>
   :PROPERTIES:
   :STYLE: habit
   :END:
* Programming
** Web
*** TODO That website                     :annoyance:coding:Herbert:
    DEADLINE: <2011-09-05 Mon>
** Local
*** Scripts
* Social
** TODO Hipster Festival                  :music:social:hipster:
   SCHEDULED: <2011-08-18 Thu 20:00>--<2011-08-22 Mon 05:00>

The habit property will likely be discussed in another blog entry. You can find more info about it at the manual.

Agenda

The agenda is the place where you’ll spend most of your time. There are a few things to do first to set it up. We need to add files to the agenda list so that org mode knows where to look for scheduling, so add this to your .emacs

 '(org-agenda-files (quote ("~/Documents/org/myfile.org")))

You can also visit the file in emacs and hit C-c [ to add the file and C-c ] to remove it. You only need to do this once. Ideally you will setup your file list once then populate it as needed. Some people even use one monolithic file then use the features of org to easily manage everything.

Once that’s done, go into emacs and hit C-c a a to see your work! You’ll notice when you do C-c a, you’ll see a list of options. I suggest browsing those and seeing what you can do. The manual, as linked in the title is an excellent place to explore and see how you can further refine the agenda view to meet your requirements.

Refine your org files and get to it! It usually will only take an hour or two to setup your basic schedules, and then it’s a very quick and periodic refinement process from there.

We’re done!

That’s it. That’s the intro. Next I will be covering capture mode. Capture mode allows you to quickly add things to your org files. Quickness is the absolute most essential part of organizing yourself. That said, the capture mode tutorial will be coming quick!

Tags : , , , , , , ,

One Response to “Org Mode OS X Series – Basic Usage”

  1. cars Says:

    There are many details that need to be addressed when making an
    auto purchase. If you are unaware of these details, you could find yourself overpaying for the car that is not right for you.
    You will find some great advice in the article that follows that will assist you in purchasing your next car.

Leave a Reply


3 − one =