I usually write my posts the evening before I publish them but yesterday, as they say, life intervened. I went to a wedding and by the time I got home it was too late and I was too tired to concentrate on writing a post. Therefore, I’m writing this the next morning so things are a bit rushed.
Marcin Borkowski (mbork) has an interesting problem whose solution is harder than you think it would be. The problem is pretty simple: Every Sunday morning when he writes his weekly review, he needs to update all the clock tables in his journal. That usually takes about a minute and mbork had the idea that he could use an idle timer to run the update. Specifically, he reasoned that if Emacs were idle for a minute it probably meant that he was otherwise engaged and that Emacs would be idle for another minute so why not fire off his update?
Of course, he wanted to do this only once a week on Sundays so it was a bit more complex than just setting the idle timer. He came up with the idea of setting a (normal) timer for 3 AM on Sunday that would set the idle timer. That didn’t quite work because of a technical issue but he got things working with yet another timer.
You should read his post for the details. His solution is interesting and shows that sometimes even simple things can be harder than we imagined.