From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Guerry Subject: [Accepted] [O, 2/2] Allow clocking in new tasks inserted before the current clocking task Date: Thu, 10 Mar 2011 10:21:29 +0100 (CET) Message-ID: <20110310092129.56F916A42@myhost.localdomain> References: <1299721221-10196-3-git-send-email-bernt@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=39123 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pxc45-00086n-HY for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 04:21:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pxc44-0006Bs-Fa for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 04:21:49 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:53766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pxc44-0006Bo-9u for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 04:21:48 -0500 Received: by wwc33 with SMTP id 33so1398735wwc.30 for ; Thu, 10 Mar 2011 01:21:47 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Patch 669 (http://patchwork.newartisans.com/patch/669/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1299721221-10196-3-git-send-email-bernt%40norang.ca%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O, > 2/2] Allow clocking in new tasks inserted before the current clocking > task > Date: Thu, 10 Mar 2011 06:40:21 -0000 > From: Bernt Hansen > X-Patchwork-Id: 669 > Message-Id: <1299721221-10196-3-git-send-email-bernt@norang.ca> > To: emacs-orgmode@gnu.org > Cc: Bernt Hansen > > * 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 | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/lisp/org-clock.el b/lisp/org-clock.el > index 693025a..cc0e51f 100644 > --- a/lisp/org-clock.el > +++ b/lisp/org-clock.el > @@ -1026,7 +1026,8 @@ the clocking selection, associated with the letter `d'." > (= (marker-position org-clock-hd-marker) > (if selected-task > (marker-position selected-task) > - (point))))) > + (point))) > + (equal org-clock-current-task (nth 4 (org-heading-components))))) > (message "Clock continues in \"%s\"" org-clock-heading) > (throw 'abort nil)) > (move-marker org-clock-interrupted-task >