How I manage my tasks in LogSeq
Here is an overview of how I manage my tasks/todos in LogSeq. I do use LogSeq to take notes as well, but I'm not gonna go much into that here. I started getting more into LogSeq, like most people, when I got addicted to endlessly watching those non-productive productivity YouTube channels where they switch their note taking app every week and expect to be more productive in the new one just because it has more features.
Jump to the LogSeq task management setup if you just wanna know how I manage my tasks in LogSeq.
History #
Before we go into how I manage tasks in LogSeq, let me give you a quick intro how my task/todo management setup has evolved over time. I initially wrote a long blog post explaining all the things that I tried, what I like about each and how it evolved, but I didn't feel like publishing it. This is a much relatively shorter version of it.
Google Keep - It just works #
I started with Google Keep back in college. Before this it was all physical notebooks. I think most people have used or at least heard about Keep at some point. For those looking for something simple, it is just bloody awesome if you can look past the fact that Google is in control of your data.
After college, I wanted to switch from Google Keep to something else. For one, I spent most of my time on a desktop and Keep only had a web app. I was also really into writing unnecessary bash scripts that I wanted some way that I can access my tasks from a terminal. These reasons, combined with the fact that Google had access to my super secret todo list, I decided to venture out into the wild west of todo/task management apps.
For those who have not looked in there, it is a nightmare. I was not planning on using anything that I had to create an account for and that ruled out most good looking ones. I also wanted something that I can interact with via bash. There are no shortage of todo apps on the Play store, but I had not found anything that worked well for me. I even tried making one, but only built 3 incomplete ones.
Moving to Taskwarrior #
After looking for a while I found out about taskwarrior via YouTube. It felt like everything that I was looking for and more. It is really powerful if you have not tried it.
Taskwarrior also has integrations with most of the things that I wanted, and if anything was missing, it was just a weekend worth of bash hackery. I had found the perfect (at that time) app for managing my todos. I used it quite extensively for a while, but the mobile app integration was a mess. Sure you can use it via Android and sync using a taskwarrior server, but the app was just ugly and unsuable. I remember having to change the orientation to landscape to edit todos. Also, taking notes on task(had a "plugin") felt like a hack.
Even with these limitations, I did use it for quite some time and was managing my tasks within it. This is a great talk in case you are interested in checking it out. I had, around the time also tried out todo.txt. I did use it for a while, but somehow did not stick to it. There was also GitJournal which I tried out for while where it synced through git
.
Why I didn't use org-mode
#
It was around this time that I started to switch to Emacs from Vim/NeoVim. And for anyone who knows about Emacs, I'm sure you also have heard of Org-Mode. The all powerful note taking, task management app. Well, all of that is true, but after all the years of using #
as headings in Markdown, it somehow did not felt right using *
for headings(probably the silliest argument). Besides, the Android app situation was also messy. People were even suggesting to use termux on Android and to use Emacs inside that. Nah bruh, that ain't it. I think the app situation has gotten slightly better now.
We are getting there #
During all of this mess, I organically started evolving a system. It started with me just creating a file in the $HOME
directory called things-for-today
and copying down things that I have to do for that day from taskwarriror in the morning. Initially, I would recreate the file every morning, but after a while I stopped deleting it and started noting down future todos in it as well instead of taskwarriror. I also started sectioning(a line starting with #
followed by something) off items by the date. This evolved into me scheduling items for the near future, again just by creating sections for the day.
After a long time using this, and slowing using taskwarrior less and less, and I created a simple vim plugin (meain/mtodo) to simplify managing tasks and to give it some colors. To use this on the phone, I was just using a simple markdown editor. Here is how it looks in Vim.
After moving to Emacs, I also ported it over to Emacs(obviously) as a major mode called mtodo-mode.el. Here is how it looks like in my current Emacs setup just for completeness.
An added advantage of this system is that I can just create another file, in the root, or even in a project root if I wanted to separate out the tasks. I used it as it is for a really long time. I only had one gripe about it in that adding additional notes to a task felt out of place. While I could add notes on tasks below the task, it somehow felt lacking.
I stuck to this for quite a few years. During this time I was managing my notes separately as markdown files which I dumped into a folder heirarchy. My note taking journey is another giant rabbit hole that I am not gonna go into now. I have written a note taking "app" in at least 6 programming languages with some having multiple implementations. I think I had at least 5 different bash based note taking systems.
Starting to use LogSeq #
Last year around this time, I was introduced to LogSeq during a work meeting. I was initially reluctant(primarily because I am conditioned to hate anything built on top of Electron), but decided to give it a try just for taking notes.
After all the years of building note taking systems, where I had never understood why anyone would need to "link" their notes, I finally understood the power of linking notes. It finally clicked for me and I started using LogSeq more and more for taking notes and generally collecting information.
Just for those who are wondering, I am aware of Obsidian and have tried it, but it never felt right for me (I want to like it, but somehow don't), probably something to do with the kind of note taker that I am. For those who think that was a niche video, you have no idea how deep the rabbit hole goes. This is a beautiful satirical video around the whole deal.
My LogSeq task management setup #
Finally getting to the actual thing that this blog is about, how I manage my tasks in LogSeq. I tried a bunch of stuff. I tried what most people recommend, ie using Journal page to write down all my todos and then writing queries to manage them, but here is what finally worked.
I have a setup similar to the mtodo
plugin ideas where I just have a list of tasks. I maintain a page for each project/area that I working in the format Backlog/<project>
. Instead of using date headings, I set scheduled dates. As for completion dates, I make use of DimitryDushkin/logseq-plugin-task-check-date.
This worked really well for me. It also took care of the problem that I had not being able to take notes on the todos. Now I can do that and also link to my other notes. The only problem that I was having with this method was that the files where getting bigger and bigger and LogSeq is not good at managing large files. That is when I was reminded of the idea in Org about refililng things. There is no need for me to keep both pending and completed tasks.
I knew you could create plugins for LogSeq, but I was not in the mood to write Javascript. Than again, these are just text files on disk. I can write a simple bash script to move completed tasks over. Well, while you can't really do it easily with simple text manipulation tools, using tree-sitter to parse out completed items was really simple. With the help of tree-sitter, I was able to whip up something that does it quite easily. You can find the script here.
After using it for a while, I realized that LogSeq graph goes out of sync when I just edit the files from underneath it. A few months later, I gave up and wrote a LogSeq plugin which does it. You can find it at meain/logseq-plugin-refile. Now that I started writing plugins for LogSeq, I also wrote meain/logseq-plugin-favorite-jump so that I can easily open these backlog files. While I was at it, I also wrote something simple which will play a small sound when you mark something as done. You can find that one at meain/logseq-plugin-noisy.
All of this combined with a few journal page queries to view today's and missed tasks is my entire task management system(for now). I replace the default journal queries with the following ones (you can add these to config.edn
).
:feature/disable-scheduled-and-deadline-query? true,
:default-queries
{:journals
[{:breadcrumb-show? false,
:collapsed? false,
:group-by-page? true,
:inputs [:today],
:query [:find (pull ?b [*]) :in $ ?duetoday :where [?b :block/marker ?m]
[(contains? #{"LATER" "TODO" "DOING" "NOW"} ?m)]
[?b :block/scheduled ?d] [(= ?d ?duetoday)]],
:result-transform
(fn [result] (sort-by (fn [h] (get-in h [:block/scheduled])) result)),
:title "📤 SCHEDULED"}
{:breadcrumb-show? false,
:collapsed? false,
:group-by-page? true,
:inputs [:today],
:query [:find (pull ?b [*]) :in $ ?duetoday :where [?b :block/marker ?m]
[(contains? #{"LATER" "TODO"} ?m)] [?b :block/scheduled ?d]
[(< ?d ?duetoday)]],
:result-transform
(fn [result] (sort-by (fn [h] (get-in h [:block/scheduled])) result)),
:title "🏃 MISSED"}]},
Well, that's about it. I don't know how this will change in the future, but I am really liking the setup so far 🤞🏼.