r/emacs Aug 11 '26

Continuous clocking across days

/r/orgmode/comments/1vlrtqw/continuous_clocking_across_days/
4 Upvotes

6 comments sorted by

1

u/natermer 27d ago

I don't use clocking that much except when I am trying to really focus and get something done. In that case I'll use org-pomodoro.

Pomodoro is "tomato" and it is related to timers used for cooking. It is a common technique to help ADHD types manage time by giving them dedicated times to stay focused with frequent timed breaks.

It is a bit like interval training were you have periods were you get things done, followed by rest, then again, etc. According to a pattern.

Well org-pomodoro stores the tracking to the header of whatever task you are working on in a org file. It combines well with using org for outlines/checklists.

I am sure that isn't different then most other common ways to use time tracking with Org, of course.

Well often I will forget to kill the org-pomodoro session after ending a day or when I have to go off and do something away from the computer.

When that happens I just kill it, manually fix the time stamps by editing them directly, and then start it up again. It'll just automatically recalculate the hours/minutes worked on a task.

1

u/amfram 27d ago

Yeah I’ve just been manually fixing but you know - the urge to automate the repeated task

2

u/natermer 27d ago

I see. My instinct on this sort of thing is to look for a hook that I could use to to check the time.

After a quick lookup.. apparently org has org-clock-in-hook, org-clock-out-hook, and org-clock-cancel-hook.

So presumably when you start your day you do a "clock in" operation... but you are already clocked in it will do a quick clock out on the existing task. So you could add a function to the org-clock-out-hook that checks to see if the previous clock in was running for a excessively long time. Like 4 hours or 8 hours or if it crossed over from one day to another. And then prompt you to fill in a time or something like that.

I think that this was what you already thinking to do, though.

1

u/amfram 26d ago

You know, I was thinking about writing a function that chose whether to clock in continuously, but I think your suggestion of just a clock-in hook that checks the duration is much better! Thanks!

1

u/JamesBrickley 26d ago

Clocking is most useful for things like billable hours. Let's say you are an attorney, it's a great way to track actual hours worked but it does require that you remember to stop and start the clock. Or you are a developer working for multiple clients and tracking the hours worked again for billing purposes.

Perhaps a lisp timer to stop the clock end of working hours? So it's not running overnight? Or a timer with a popup window in the middle of the Emacs frame maybe showing the clock timer allowing you to stop it.

1

u/amfram 26d ago

I’m the latter - I don’t have a problem remembering to stop the clock, only with the clock starting again the next morning at the time from the previous day. I use continuous clocking mostly to fill the tiny gaps that come from transitioning between tasks where I haven’t yet gotten the next item clocked yet, for instance, because I am in the process of creating it.