Do you ever get the feeling that you achieved nothing today, but when you take a closer look, you actually did a number of things? Writing down what you achieved on a daily basis can help you stay motivated, even if it isn't crossing an item off of a to-do list, but writing it down after the fact. In this post, I will show how I have integrated such a log in my workflow featuring Orgzly for Android and org-agenda in Org Mode.
This guide covers both repeating and close-once items.
Setting up Orgzly
I use Orgzly with WebDAV via Nextcloud.
To have logging of repeated items, enable Notes & Notebooks > Note > Log to drawer on time shift
.
Set property on time shift
is not necessary for what this setup uses, but ensures consistency with Org's behaviour of setting the LAST_REPEAT
property which cannot be modified beyond simply not logging as far as I can tell.
Marking a close-once item as done will turn
1* TODO Apply for postal voting
into
1* DONE Apply for postal voting
2CLOSED: [2025-02-01 Sat 13:41]
Marking a repeating item as done will turn
1* TODO Vacuuming
2SCHEDULED: <2025-02-01 Sat .+1w>
3:PROPERTIES:
4:LAST_REPEAT: [2025-01-25 Sat 14:35]
5:END:
6:LOGBOOK:
7- State "DONE" from "TODO" [2025-01-25 Sat 14:35]
8:END:
into
1* TODO Vacuuming
2SCHEDULED: <2025-02-08 Sat .+1w>
3:PROPERTIES:
4:LAST_REPEAT: [2025-02-01 Sat 11:28]
5:END:
6:LOGBOOK:
7- State "DONE" from "TODO" [2025-02-01 Sat 11:28]
8- State "DONE" from "TODO" [2025-01-25 Sat 14:35]
9:END:
Orgzly unified agenda and TODO
Orgzly has an agenda view, but I prefer a unified view.
The search I use is (s.2d or d.4w or s.no d.no i.todo) o.c o.s o.d o.p o.b o.t
.
1(s.2d or // Scheduled in the next two days
2 d.4w or // Deadlined in the next four weeks
3 s.no d.no i.todo) // TODO, but not scheduled or deadlined
4o.c // Order by time closed
5o.s o.d // Order by time scheduled and deadlined
6o.p // Order by priority
7o.b o.t // Order by notebook and title
Quirks
Avoiding typing unscheduled tasks every time
There are things I do on a regular basis and want to see in the log, but that I do not schedule onto a date or time.
To avoid having to type them out every time, I use a small hack:
They are scheduled onto a date in the far future, and unlike most repeating tasks, which I schedule with .+
, they are scheduled with just the +
repeater.
Marking them as done, incurring a log entry, is then two taps in Orgzly or C-c C-t
in Org Mode.
Occasionally, I may also mark such an item as “definitely still want to do today”. Use a sufficiently long repeater to avoid the item from cluttering your agenda.
Scheduled tasks too small for the log
Some tasks I need a reminder for, but they are too trivial for the log.
They are given the :nolog:
tag.
Tags have inheritance, so you can also set one for a tree.
Archiving done tasks
For a better overview, use this function to archive done tasks.
Putting it all together
1(setq
2 ; File wildcard. I put all TODO items in files ending in `todo`,
3 ; and limit the output as such here to avoid opening too many buffers.
4 ; The trailing wildcard is important to also match archives.
5 org-agenda-files (file-expand-wildcards "~/org/*todo.org*")
6
7 ; Log close-once
8 org-log-done 'time
9 ; Log repeating
10 org-log-into-drawer t
11
12 ; Do not show a time grid
13 org-agenda-use-time-grid nil
14
15 ; Show next three days
16 org-agenda-span 3
17 ; Always start today
18 org-agenda-start-on-weekday nil
19
20 ; Don't let daily tasks clutter your agenda. Show them once.
21 org-agenda-show-future-repeats 'next
22
23 ; The heart of the setup: custom agenda commands.
24 org-agenda-custom-commands
25 '(( ; Key
26 "n"
27 ; Title
28 "Agenda & TODOs"
29 ; Groups: scheduled/deadline and other TODO items
30 ((agenda) (todo))
31 ; View-specific settings
32 ( ; Do not show scheduled items in TODO section.
33 ; Useful for repeating tasks.
34 (org-agenda-todo-ignore-deadlines 'all)
35 (org-agenda-todo-ignore-scheduled 'all)
36 ; Do not show done items.
37 ; Useful for keeping an overview.
38 (org-agenda-skip-deadline-if-done t)
39 (org-agenda-skip-scheduled-if-done t)))
40 ("r" "Review" ((agenda))
41 ; Headline
42 ((org-agenda-overriding-header "Done:")
43 ; Days log reaches back.
44 ; Set to one less than org-agenda-span.
45 (org-agenda-start-day "-2d")
46 ; Show only the log
47 (org-agenda-start-with-log-mode 'only)
48 ; Log items that are closed or have a state change.
49 ; Can also use clock if you track time.
50 (org-agenda-log-mode-items '(closed state))
51 ; Exclude items marked :nolog:
52 (org-agenda-tag-filter-preset '("-nolog"))))))
53
54; The usual agenda shortcut. Press e.g. `C-c a n` for agenda.
55(global-set-key (kbd "C-c a") 'org-agenda)
C-c a
with the entries above before marking:
C-c r
with the entries above after marking:
Future work
The log can only be viewed from org-agenda on a desktop (or the Emacs Android app if you insist). It would be nicer to view it from Orgzly too, which would require a patch to Orgzly at least for viewing logbook entries 😉