summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-19 16:53:45 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-19 17:07:48 -0400
commit4d3960cd11a31d06ff35d3be9e3a1adde3fa8a5b (patch)
treec8ec4013919ca2362a79cd5400ad9c695df5ab73
parent6bb6cb79da05442ca3c1f01fc2a6ecd17e129f93 (diff)
downloadorg-mode-4d3960cd11a31d06ff35d3be9e3a1adde3fa8a5b.tar.gz
Add var to disable clock resolution on clock in
(org-clock-disable-clock-resolution): New customization variable that disable automatic clock resolution on clock in. (org-clock-in): If `org-clock-disable-clock-resolution' is set, do not automatically resolve anything. This is does not affect idle-time resolution, however, if `org-clock-idle-time' is set.
-rwxr-xr-xlisp/ChangeLog9
-rw-r--r--lisp/org-clock.el8
2 files changed, 16 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 822bd57..abea9be 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,15 @@
2009-10-19 John Wiegley <johnw@newartisans.com>
+ * org-clock.el (org-clock-disable-clock-resolution): New
+ customization variable that disable automatic clock resolution on
+ clock in.
+ (org-clock-in): If `org-clock-disable-clock-resolution' is set, do
+ not automatically resolve anything. This is does not affect
+ idle-time resolution, however, if `org-clock-idle-time' is set.
+
+2009-10-19 John Wiegley <johnw@newartisans.com>
+
* org-agenda.el (org-agenda-auto-exclude-function): New
customization variable for allowing the user to create an "auto
exclusion" filter for doing context-aware auto tag filtering.
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 298331e..8c0b2ae 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -213,6 +213,11 @@ string as argument."
(const :tag "Never" nil)
(integer :tag "After N minutes")))
+(defcustom org-clock-disable-clock-resolution nil
+ "When non-nil, do not resolve open clocks on clock-in."
+ :group 'org-clock
+ :type 'boolean)
+
(defvar org-clock-in-prepare-hook nil
"Hook run when preparing the clock.
@@ -806,7 +811,8 @@ the clocking selection, associated with the letter `d'."
(left-over (and (not org-clock-resolving-clocks)
org-clock-left-over-time)))
(unless (or org-clock-clocking-in
- org-clock-resolving-clocks)
+ org-clock-resolving-clocks
+ org-clock-disable-clock-resolution)
(setq org-clock-left-over-time nil)
(let ((org-clock-clocking-in t))
(org-resolve-clocks))) ; check if any clocks are dangling