Browse Source

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.
John Wiegley 15 years ago
parent
commit
4d3960cd11
2 changed files with 16 additions and 1 deletions
  1. 9 0
      lisp/ChangeLog
  2. 7 1
      lisp/org-clock.el

+ 9 - 0
lisp/ChangeLog

@@ -4,6 +4,15 @@
 
 	* org.el (org-indent-line-function): Fix regexp replace problem.
 
+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

+ 7 - 1
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