Once I wrote about what I called “Org mode burst timer”, another idea occurred to me. That code is good, and may be useful for some people – if it is for you, feel free to use it! But I can do something better for me. Instead of requiring myself to set the burst property manually, I could tie this code to my Emacs Beeminder client. When a clock is started on a beeminded task, it could retrieve the necessary data about the goal associated with the current headline and notify me when I work on it enough.
(Note: the following requires some knowledge about how Beeminder works, and in particular it uses a bit of Beeminder jargon.)
Now, this could work in several ways. The simplest way would be just to notify me after I work on a task for an amount of time equal to my daily goal, no matter how much I have worked on it today. For example, assume that I have my writing goal set up to write for 20 minutes per day, I have one day of buffer, I need to write for 17 minutes to increase the buffer to two days, and I’ve already been writing for 15 minutes today. With this approach the timer would be set to 20 minutes anyway. On the other hand, one could argue that the “correct” way would be to set it to 5 minutes (since I’ve already done 15 today), or even 2 (since this is what I need to increase the safety buffer). It is very tempting to use the first, simplest approach, but I decided to go a bit fancy and use a mixture of the second and third ones. I want to be notified as soon as the amount of time I have worked on a goal today is equal to my daily rate. Additionally, if my goal is on a beemergency, I want to be notified as soon as I did enough to dispatch it.
So, I decided to add such a feature to my Beeminder client. I wrote most of it in 2015 and 2016 when I was a beginning Elisp programmer, and many choices I made back then are… less than ideal, so to speak. (For example, it uses eval in some places.) Coming back to code you wrote 10 years ago is painful in more than one way – not only do you see your stupidity, but you have to collaborate with your stupid self from 10 years ago. But I really want to have this feature, so I did it anyway.
I’ve introduced two options. First of all, beeminder-org-notify-when-enough-p. Setting this to non-nil (which is the default now) will make Emacs notify me when the amount of work I’ve done on the goal is equal to the daily rate. Additionally, there is beeminder-org-notify-when-buffer-increased, firing a notification when I’ve done enough to increase my safety buffer by one day. This can be set to nil (to disable that feature), the symbol beemergency (the default, to enable it only for eep days) or anything else (to always enable it). Finally, I introduced beeminder-org-notification-sound, which has the same semantics as org-clock-sound (and is set to t by default).
And that’s it for today. If you happen to use my Emacs Beeminder client, you can download the newest version from GitHub and start using these options now. (Note that that version also includes a few other minor updates, the most visible being that the “Beeminder goal details” window shows a few aggregates – by default, the sum, median, average and daily average of the displayed datapoints. See beeminder-goal-template-fields-alist if you want to add yours.) At least for me, they seem to be quite helpful (even if a tiny bit distracting). While at that, I fixed some minor issues in the code (mainly adding necessary options to a few defcustoms), so even if you don’t want to use the new features, you might want to upgrade.
CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode