]> code.delx.au - gnu-emacs/blobdiff - lisp/org/org-clock.el
Merge from emacs-24
[gnu-emacs] / lisp / org / org-clock.el
index 7105bfe13dca71f1cb3ea40fa1fae95b90b66c83..c39fb249e74cb8fd09154b0175cd8511659fe0f7 100644 (file)
@@ -143,7 +143,7 @@ The function is called with point at the beginning of the headline."
   :type 'function)
 
 (defcustom org-clock-string-limit 0
-  "Maximum length of clock strings in the modeline.  0 means no limit."
+  "Maximum length of clock strings in the mode line.  0 means no limit."
   :group 'org-clock
   :type 'integer)
 
@@ -202,7 +202,7 @@ file name  play this sound file.  If not possible, fall back to beep"
          (file :tag "Play sound file")))
 
 (defcustom org-clock-modeline-total 'auto
-  "Default setting for the time included for the modeline clock.
+  "Default setting for the time included for the mode line clock.
 This can be overruled locally using the CLOCK_MODELINE_TOTAL property.
 Allowed values are:
 
@@ -219,8 +219,9 @@ auto     Automatically, either `all', or `repeat' for repeating tasks"
          (const :tag "All task time" all)
          (const :tag "Automatically, `all' or since `repeat'" auto)))
 
-(defcustom org-task-overrun-text nil
-  "The extra modeline text that should indicate that the clock is overrun.
+(defvaralias 'org-task-overrun-text 'org-clock-task-overrun-text)
+(defcustom org-clock-task-overrun-text nil
+  "Extra mode line text to indicate that the clock is overrun.
 The can be nil to indicate that instead of adding text, the clock time
 should get a different face (`org-mode-line-clock-overrun').
 When this is a string, it is prepended to the clock string as an indication,
@@ -495,7 +496,7 @@ pointing to it."
        (insert (format "[%c] %-15s %s\n" i cat task))
        (cons i marker)))))
 
-(defvar org-task-overrun nil
+(defvar org-clock-task-overrun nil
   "Internal flag indicating if the clock has overrun the planned time.")
 (defvar org-clock-update-period 60
   "Number of seconds between mode line clock string updates.")
@@ -516,7 +517,7 @@ If not, show simply the clocked time like 01:50."
               (work-done-str
                (org-propertize
                 (format org-time-clocksum-format h m)
-                'face (if (and org-task-overrun (not org-task-overrun-text))
+                'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text))
                           'org-mode-line-clock-overrun 'org-mode-line-clock)))
               (effort-str (format org-time-clocksum-format effort-h effort-m))
               (clockstr (org-propertize
@@ -532,7 +533,7 @@ If not, show simply the clocked time like 01:50."
 (defun org-clock-update-mode-line ()
   (if org-clock-effort
       (org-clock-notify-once-if-expired)
-    (setq org-task-overrun nil))
+    (setq org-clock-task-overrun nil))
   (setq org-mode-line-string
        (org-propertize
         (let ((clock-string (org-clock-get-clock-string))
@@ -546,10 +547,10 @@ If not, show simply the clocked time like 01:50."
         'local-map org-clock-mode-line-map
         'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight)
         ))
-  (if (and org-task-overrun org-task-overrun-text)
+  (if (and org-clock-task-overrun org-clock-task-overrun-text)
       (setq org-mode-line-string
            (concat (org-propertize
-                    org-task-overrun-text
+                    org-clock-task-overrun-text
                     'face 'org-mode-line-clock-overrun) org-mode-line-string)))
   (force-mode-line-update))
 
@@ -606,7 +607,7 @@ Notification is shown only once."
   (when (org-clocking-p)
     (let ((effort-in-minutes (org-duration-string-to-minutes org-clock-effort))
          (clocked-time (org-clock-get-clocked-time)))
-      (if (setq org-task-overrun
+      (if (setq org-clock-task-overrun
                (if (or (null effort-in-minutes) (zerop effort-in-minutes))
                    nil
                  (>= clocked-time effort-in-minutes)))
@@ -663,12 +664,12 @@ Use alsa's aplay tool if available."
              (error (beep t) (beep t)))))))))
 
 (defun org-program-exists (program-name)
-  "Checks whenever we can locate program and launch it."
+  "Checks whenever we can locate PROGRAM-NAME using the `which' executable."
   (if (member system-type '(gnu/linux darwin))
       (= 0 (call-process "which" nil nil nil program-name))))
 
 (defvar org-clock-mode-line-entry nil
-  "Information for the modeline about the running clock.")
+  "Information for the mode line about the running clock.")
 
 (defun org-find-open-clocks (file)
   "Search through the given file and find all open clocks."