I use org-mode since 2012. I recently adopted the org-mode clocking work time capabilities and thus have created the following org-capture-template:
(setq org-capture-templates '("j" "Journal" entry (file (concat
org-directory "/journal.org")) "* %?\n%u\n" :clock-in t :clock-resume t))
(define-key global-map "\C-cr" 'org-capture)
When I start working on something (eg. Project A), I press C-c r j
and the timer starts. When I finish, I press C-c C-c
. In this simple scenario, everything works fine.
However, there are occasions where I get interrupted during Project A, without time for any key press. For example, the phone rings and I discuss an urgent issue for 10 minutes. Before I return to what I was doing before the phone call, I want to keep log of the phone call.
| time | event |
|-------+------------------------------|
| 10:00 | Clock-in |
| 10:15 | Interrupt |
| 10:25 | RETI (return from interrupt) |
|-------+------------------------------|
It is now 10:25
and the corresponding entry in journal.org
is:
* Project A
:LOGBOOK:
CLOCK: [2016-09-27 Tue 10:00]
:END:
[2016-09-27 Tue]
Which is the best/recommended/straightforward way to achieve the following result?
* Phone call
:LOGBOOK:
CLOCK: [2016-09-27 Tue 10:15]--[2016-09-27 Tue 10:25] => 0:10
:END:
[2016-09-27 Tue]
* Project A
:LOGBOOK:
CLOCK: [2016-09-27 Tue 10:25]
CLOCK: [2016-09-27 Tue 10:00]--[2016-09-27 Tue 10:15] => 0:15
:END:
[2016-09-27 Tue]
What is shown here is:
a) The phone call has been clocked from 10:15 - 10:25
b) The Project A has been clocked from 10:00 - 10:15
c) The Project A clock has resumed from 10:25