her.esy.fun/src/drafts/XXXX-org-mode-intro/index.org

8.1 KiB

How I use org-mode

In this article I'll try to give an overview of my current use of org mode. I use org mode for:

  • tasks management & tracking
  • writing documents (articles, book, etc…)
  • note taking ; which I consider slightly different from just writing documents

It took me a few month to discover a few great org-mode features that really changed the way I looked at it. After discovering those it is a real life changer.

I hope that I could help you discover why org mode is so praised and be able to take advantage of its awesomeness faster than I did.

Workflows

Worfklow 1: See Things to do: org-agenda + clock

  1. look at the current tasks planned for today
  2. select a task, clock it
  3. work on the task
  4. back to the task and clock it out.

I work most of my using emacs1. Generally the first thing I do in the morning is opening `org-calendar`. It looks like this:

/yogsototh/her.esy.fun/media/commit/087691b634481e448b7ea8941ea44e6512c48334/src/drafts/XXXX-org-mode-intro/img/org-super-agenda.png

Pretty brutalist interface which is a great thing to me. Distraction free interface going to the essential.

With this view, I see what I planned to do today. I also see a few "Due Soon" tasks in case I have the time to handle those.

When I start working on a task I start a clock on it (I simply type I when my cursor is on the TODO line). When I finished some task I change its status from TODO to something else. Mainly I'm prompted when doing so:

{ [t] TODO   [p] IN-PROGRESS   [h] HOLD   [w] WAITING
  [d] DONE   [c] CANCELLED     [l] HANDLED }

And that's it. The time spent on the task as been clocked I can work on another task.

But generally, I don't use much direct clocking from the agenda. Most of the time I prefer the capture mechanism. Which bring us to "Worfklow 2".

Workflow 2: org-capture/org-refile

Most of the tasks I perform on the day are not planned. I have a generic routine + some prepared events and tasks to performs. But during the day you have multiple interruptions, and part of my job is to write code reviews too. I cannot plan those.

In that case I use org-capture along org-refile. Mainly org-capture helps you create a new TODO entry. And org-refile will help you move that TODO entry to the correct place.

So let say I get a direct message in the chat asking me to do something. I generally start org capture (for me it's SPC X). I am presented with the following choice:

Select a capture template
=========================

[t] todo
[c] chat
[e] email
[m] meeting
[p] pause
[r] review
[w] work
[i] interruption
[f] chore
---------------------------------------------------------------------------
[q] Abort

In my example it was a chat interruption. So I type i that presents me with this

  **** IN-PROGRESS |  :interruption:
  :LOGBOOK:
  [2020-09-23 Wed 08:01]
  ref :: [link-to-where-I-was-in-emacs-when-captured]

My cursor placed where the | is displayed. Here I add the tag chat and a small description, "dm from John about X" for example. Then I type C-c C-c and the TODO is placed in a tracker.org file under a date tree that looks like this:

  * 2020
  ** 2020-W39
  *** 2020-09-21 Monday
  *** 2020-09-22 Tuesday
  *** 2020-09-23 Wednesday
  **** IN-PROGRESS Chat with John about X                          :interruption:chat:
  :LOGBOOK:
  CLOCK: [2020-09-23 Wed 17:58]
  :END:
  [2020-09-23 Wed 17:58]
  ref ::
  ...

So the clock for this task started at the moment at made the capture. In my workflow, I prefer to finish the capture and stop clock later. So after I finished the capture, the clock is still running while the task is put in my tracker file.

Once I finished with that task. I can:

  1. Jump to the tasks with SPC n o (org-clock-goto), and stop the clock SPC m c o (clock-out).
  2. Jump to the task and change its status to DONE which will stop the clock.
  3. Capture another tasks which will stop the clock on the current task and will start on the new one.

By the end of the day, my tracker file will contain a date tree with all the tasks I done in the day. All tasks nicely clocked. I generally create a clock report that look like this:

  #+BEGIN: clocktable :scope subtree :maxlevel 4 :timestamp t
  #+CAPTION: Clock summary at [2020-09-23 Wed 08:20]
  | Timestamp              | Headline                                       | Time   |   |      |      |
  |------------------------+------------------------------------------------+--------+---+------+------|
  |                        | *Total time*                                   | *6:40* |   |      |      |
  |------------------------+------------------------------------------------+--------+---+------+------|
  |                        | \_    2020-09-21 Monday                        |        |   | 6:40 |      |
  | [2020-09-21 Mon 09:00] | \_      check chat                             |        |   |      | 0:06 |
  | [2020-09-21 Mon 09:30] | \_      check reviews                          |        |   |      | 0:11 |
  | [2020-09-21 Mon 10:11] | \_      check emails                           |        |   |      | 0:07 |
  | [2020-09-21 Mon 10:37] | \_      review PR about xxx                    |        |   |      | 0:44 |
  | [2020-09-21 Mon 11:21] | \_      update my PR from feedbacks            |        |   |      | 0:36 |
  | [2020-09-21 Mon 12:08] | \_      review John's PR about Foo             |        |   |      | 0:12 |
  | [2020-09-21 Mon 13:41] | \_      review M's PR about Bar                |        |   |      | 0:11 |
  | [2020-09-21 Mon 13:53] | \_      another thing                          |        |   |      | 0:16 |
  | [2020-09-21 Mon 14:09] | \_      review PR                              |        |   |      | 0:51 |
  | [2020-09-21 Mon 15:00] | \_      work on PR                             |        |   |      | 1:30 |
  | [2020-09-21 Mon 16:49] | \_      check another PR                       |        |   |      | 0:33 |
  | [2020-09-21 Mon 17:03] | \_      answer email                           |        |   |      | 0:55 |
  | [2020-09-21 Mon 17:58] | \_      Chat John about X                      |        |   |      | 0:28 |

Footnotes


1

Short digression: Historically, I coded using different IDEs. Then I worked for a company that forced me to use terrible keyboards and after just a few weeks I started to have serious wrist issues. So to minimize that pain I switched to vim. And it was awesome. Once you're use to the power of vim keybinding forever your soul will bound to them. So learning vim is a bit like learning a new music instrument. You need to construct some muscle memory and integrate one after one new tricks. Once learned your personal editing power start to become overwhelming.

After a few years of vim, I wanted to try to explore new editor tooling. So I switched to emacs using the spacemacs distribution. So mainly it's vim but with even better keybindgs, helpers and within emacs. The main reason for the switch was that vimscript is a really bad language to configure your editor. Emacs use emacs-LISP. For editor customization a LISP looked perfect to me. LISP is still one of the most powerful and easy to use programming language to date.

And recently, as my personal configuration started to grow so much I switched to doom-emacs. I was quite hesitant to do the switch but so far its been a pleasure. IMHO using doom-emacs is a lot better than using my own personal configuration from scratch because I wouldn't be able to end up with so much configuration quality.