This is how I imagine diary float entries in Emacs.
Photo courtesy, noah eleazar on Unsplash


I finally went ahead and read about what Emacs Diary S-expressions were.

Going back, a bit.
I make heavy use of Org Mode’s deadline and scheduling features.
I put schedules and deadlines in lots of tasks across my ten or so org files, so that I can look at them every week, to decide what I’ll be doing this week as well as to review at the beginning of every month.
To wit, there are plenty of tasks that repeat on a weekly and monthly cadence, and Org’s repeaters.

But1, there’s one kind of event I have, that Org doesn’t support quite well.
If I want something on, let’s say the second Friday of every month, there’s no easy way to describe / do that with Org.
Org defers to Emacs’ native Diary Mode to do something like this.. Ok, not defers, but it supports Diary expression entries with a few caveats.
Now those were scary when I first saw them, which is why I kicked the can down the road, and decided to just live with manually making entries for the second Friday of every month.
A year of doing this, and I’ve finally had enough. So I finally went ahead and read about what Emacs Diary S-expressions were.


Click the pic to see a larger version of the chicken scratch


Only to realise, that they were not as scary as I feared, after close to a year of messing around with my Emacs config files. They look2 just like Emacs functions with arguments.

I scribbled one out the way, Org needs them written, by referring to the Emacs help.

<%%(diary-float t 5 2)>

I marked the sections out in the scrawly figure above.

  • diary-float seems to be the function that does all the magic and then I have three arguments
  • The first one, refers to the month by number. 8 will mean August. t will make things repeat every month.
  • The second argument is day of week. 0 being Sunday, and 6, Saturday.
  • The third one refers to which week of the month. 2 in my case, means the second week of the month.

So …

* My super important task
  DEADLINE:  <%%(diary-float t 3 2)>

shows up in my agenda as a task for the second Wednesday of every month!

There are a couple of caveats to this approach.

  • This is not as task, even though I write it as one. It behaves more like a calendar entry. It more or less, just shows up in the agenda and I have to look at it.
  • I can’t mark it as done and expect it to repeat, like a normal Org repeater. If I do that, the task is, uh done and then that’s that.

Neither of these things bother me, because of the idiosyncratic way I drive my day.
I normally review my daily agenda, and create a day plan for myself.
Which means that I copy the repeater task into my daily agenda as a single task and mark the repeater as done. So with the weird way I work, writing it out as a diary sexp, actually saves me a step ❤️
And my cranky brain can now heave a sigh of relief.3


Feedback on this post? Mail me at feedback at this domain

P.S. Subscribe to my mailing list!
Forward these posts and letters to your friends and get them to subscribe!
P.P.S. Feed my insatiable reading habit.



  1. old folks know by now, there’s always a “but” or “however” coming ↩︎

  2. and probably are ↩︎

  3. until next time ↩︎