Allow clocking in new tasks inserted before the current clocking task
commit0f301d133be89a33a41794c49842459674694283
authorBernt Hansen <bernt@norang.ca>
Thu, 10 Mar 2011 06:40:21 +0000 (10 06:40 +0000)
committerBastien Guerry <bzg@altern.org>
Thu, 10 Mar 2011 09:21:19 +0000 (10 10:21 +0100)
treeb123ce7ac18c6ac66660947f12e02d09dfa8b928
parentd008facdabd8062ab0fe724aaabd0649be7156da
Allow clocking in new tasks inserted before the current clocking task

* lisp/org-clock.el (org-clock-in): Allow clocking in new tasks inserted
  before the current clocking task

org-clock-in now checks that the name of the task you are clocking in
also matches org-clock-current-task.  This allows us to insert a new
task in front of the current clocking task (with M-S-RET on the
heading of the current clocking task) and then clock in the new task.

Previously this just stated that clocking continues in the old task
since the marker point now matches the new task.

A side-effect of this change is that changing the current clocking
task headline and clocking in again will now close the current clock
and open a new entry as well as update the name of the current
clocking task in the modeline.
lisp/org-clock.el