From: Bernt Hansen <bernt@norang.ca>
To: emacs-orgmode@gnu.org
Cc: Bernt Hansen <bernt@norang.ca>
Subject: [PATCH 2/2] Allow clocking in new tasks inserted before the current clocking task
Date: Wed, 9 Mar 2011 20:40:21 -0500 [thread overview]
Message-ID: <1299721221-10196-3-git-send-email-bernt@norang.ca> (raw)
In-Reply-To: <1299721221-10196-1-git-send-email-bernt@norang.ca>
* 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
--
1.7.4.1.208.gf7c6c
next prev parent reply other threads:[~2011-03-10 1:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 1:40 [PATCH 0/2] Clocking fixes Bernt Hansen
2011-03-10 1:40 ` [PATCH 1/2] Allow setting default clocking task to current clocking task Bernt Hansen
2011-03-10 9:21 ` [Accepted] [O, " Bastien Guerry
2011-03-10 1:40 ` Bernt Hansen [this message]
2011-03-10 9:21 ` [Accepted] [O, 2/2] Allow clocking in new tasks inserted before the " Bastien Guerry
2011-03-10 9:36 ` [PATCH 0/2] Clocking fixes Bastien
2011-03-10 13:11 ` Bernt Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1299721221-10196-3-git-send-email-bernt@norang.ca \
--to=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).