In this fourth post of the series “Building a Second Brain with Emacs and Obsidian” I’m going to present the key aspects of my minimalist approach to handle actionable items in GNU Emacs.
Managing notes with Denote
We could say that it all starts with Denote. You can see the configuration I have in my personal git repository, or my previous publication on the subject, but it would probably be more practical to see the specific section in my GitHub, so from now on I will only redirect to the specific sections I’m referring to (in GitHub).
I started by creating this note called
Organizer, which functions are (i) to receive the captured information, and (ii) to show the PARA structure (see the picture below). The project heading property
:Visibility: was set to
children, so I am sure to see the projects I am actively working on right now in front of me every time I access the
Here I have 5 active projects (second level heading under «Projects»). The first one, which is writing this series of posts for the blog, has various tasks (third level heading under «Blog Series - …»).
Then the third and fourth projects are Denote links to other notes I already had here in Emacs, and keep maintaining till these projects are finished. These notes contain a mixture of actionable and non-actionable items for the moment, because rearranging it all would be too much time consuming. But this lead us to a question: How to manage actionable items which are not in the
Here is where the magic of Emacs enters into play. To manage actionable items in different files I defined that all notes with a
_project tag in their name will be added to the
org-agenda-files list, together with the
Organizer, meaning that the Org Mode Agenda will show all tasks and projects inside those files. Of course this is possible to keep consistent because of the naming scheme Denote allows to maintain, but similar results can be obtained with Org-roam as exposed by Boris Buliga.
The way the Agenda View is organized is defined by my customization of the variable
org-agenda-custom-commands. There I use the tag
@project to differentiate between projects and tasks: we don’t want projects mixed with the tasks in the Agenda View, and the use of this tag allow me to separate them. For example
will take all headings marked with a
TODO state, except those with a
@project tag. This is precisely what we search for when listing all TODOs we have in our projects.
Arranging the Agenda View the way it fits our need is really awesome. In my case it shows a daily (hit
d), or weekly (hit
w) agenda at the top, a list of tasks I am currently working, the next actions, the to-do-s, the captured items I need to refile to their corresponding project, the list of stuck projects, and the items to archive (see the picture below).
The stuck projects are any to-do headline fulfilling the following conditions:
- It’s marked with the
- It’s still an active project: it has neither
- It’s a project without next actions: it doesn’t have any sub-task with
- It’s not planed to be done someday: it’s not marked with the
This can be achieved with the following snippet in the configuration file:
One important observation here is that the headline needs to have a
TODO (or any other un-done) status. Therefore, in the picture showing my
Organizer file above the third and fourth projects would never be listed as stuck, even if I added the
@project tag, because they are not a task-like heading.
_project files added when the session starts
As explained before, when Emacs starts it adds the
Organizer file and all those containing a
_project tag in their name to the
org-agenda-files variable, so all actionable items can be accessed from the Agenda no matter where they are. This has a small limitation, if we create a new note with the
_project tag it will not be part of the agenda until we start Emacs again.
I think dynamically adding the files to the agenda would be the perfect solution, but it would require some time I am not willing to spend to configure it. For the moment I have never had the need for this feature, and you will even need it less if you put everything in the
Excluding projects tags from inheritance
Finally, as you may have noticed, we need to remove inheritance from all the tags identifying a project, otherwise all sub-tasks of a project would inherit
@project from his parent. This can be done with the following line
Capture, Refile, and Archive
Ok, at this point we have our
Organizer file with the structure of PARA. We can create notes with Denote, link them, etc. (but that is preferably done in Obsidian, as concluded in the previous post of the series). Also, we have an Agenda View showing all projects, tasks, and blocked time on the calendar. Great!
Now that we are all set, it’s time to start using it. To do that we can capture something we found interesting with
C-c c. This will popup a new buffer where we can write whatever we found, then hit
C-c C-c and it will be saved to the
Inbox heading of the
Organizer file. Of course this needs some customization, but it is possible to invoke the capture templates with attachments associated, to invoke it from anywhere in the system, and a lot of cool stuffs more. Once more, you can choose to keep it simple, and manage all reference material (non-actionable) with Obsidian.
So we have gone during the week capturing information we liked, and now it’s time to organize it. We can open the
Inbox heading and find there everything we saved in Emacs (of course). Now, we don’t need to copy it and go to the heading where we want to pout it or open another file, for that we can use Refile. Hitting
C-c C-w it will ask us where in all our agenda files we want to put this item, even under which heading of all these agenda files. Select the correct one, and it’s done. Isn’t it awesome?
Finally we have seen this item marked as
DONE and we would like to Archive it. We have two options here:
- We archive it internally with
C-c C-x a(
org-toggle-archive-tag), and then refile it to the Archives heading of the PARA structure. This will add a special tag (
:ARCHIVE:) to the heading and will act as if it were not there (increases the speed of loading the agenda, etc).
- We archive it externally with
C-c C-x C-a(
org-archive-subtree-default). This will put the entire headline in a file with exactly the same name that the current one, but adding
_archiveto the very end.
Note that, because of the definition of the
org-agenda-file-regexp in my configuration these external archives will not be added to the agenda files, which is really convenient.
Tracking time and habits
But now we are going to start working in this task we are really excited about, we have estimated it would take us 2 hours to complete, and we would like to know if that’s what approximation is correct (for further reference in similar projects), that is, clocking work time. We hit
C-c C-x C-i (
org-clock-in), time starts to count and we to work, when we finished we hit
C-c C-x C-o (
org-clock-out), and Org Mode will log all this time. Even from the Agenda View we can start and end a clock.
We can repeat this process as many times as needed, all the logs will be there and will add to the total time of the task. Additionally, if we were working and went away without stopping the clock, Emacs will recognize the inactivity and will popup a buffer where we have many options to choose from to remove or keep that inactive time when we come back, even between sessions.
Furthermore, we may want to make the weekly review of the
Inbox a habit to keep track of. That’s also possible to do here, with the Tracking your habits functionality. Each time you change the status of this headline to done, it will record that date, and then in the agenda buffer will display in a colored bar your consistency (using colors).
Everything in plain text. How amazing is that?
Analysis tools for time tracked
So we tracked the time we spent in the tasks of the projects when we were doing them, but how can we use that data. There are probably 100 different ways to use this data, but the two I use are Column View and The Clock Table.
We can configure the Column View as we want, in my case I have set it to
in the heading section of the
Organizer file, and also in the
org-columns-default-format-for-agenda variable. This way, when I hit
C-c C-x C-c (
org-columns) in the
Organizer something like the following picture appears. There we can see the effort we planed for each task, how much time have we employed today, and the total time we have dedicated to each task and project.
As you can see I have underestimated, by far, the amount of time to write these posts. Initially I though that 2 hours would be enough, but it turn out I have employed a lot more for each of them. Something similar can be seen in the archives: a monstrous underestimation from my part. Now I know how much time I spend in some tasks, and can block time for them more accurately.
The Clock Table
This is yet another way to obtain similar information, but being more specific about time ranges, include other files, etc. To use The Clock Table we specify all the options we want for it to render, and then from its headline hit
C-c C-c. In my case, I am including all the agenda files so any items clocked there will appear here too, I have set it to go just 3 level down (all subsequents will be added to the parents), I have set it to limit the search to items done the current week, and some other options I liked.
The following picture would be an example for the output to the current week
Now I know this week I have just worked in this project, and probably need to dedicate some time to others in the coming one. How cool is that?
Tracking all the time
In my case I am just interested in tracking certain projects and tasks times, but you can extend it and use it all day long. The insights will be more helpful for sure.
And so much more…
At this point I have presented some very basic usages of Emacs to manage tasks, projects, track time, and take linked notes. But of course there is so much more to explore and do with it. Just the Org Mode manual is quite extent, and this is just a mode for Emacs, there are thousands of packages out there that a lot of people share. A great source to keep up to date is the Emacs News weekly posts by Sacha Chua.
You can literally live your life in plain text using Emacs and Org Mode, but you can find a drawback in the time required to learn all of this. It is, however, the absolute winner of the best, not just note taking, but application out there.
In the next posts I will try to describe then how to organize the non-actionable items in Obsidian. Stay tuned.
Thanks for reading the post! Do not hesitate to write me an email, and share your point of view 😉: firstname.lastname@example.org