diff options
author | Sébastien Delafond <sdelafond@gmail.com> | 2014-07-13 13:35:29 +0200 |
---|---|---|
committer | Sébastien Delafond <sdelafond@gmail.com> | 2014-07-13 13:35:29 +0200 |
commit | 40ce6b75e6245659a3a14622356e32e7dd1125dd (patch) | |
tree | 7d0051414493a78c84a3dfbec6143883c2ba8341 /lisp/org-clock.el | |
parent | e32a45ed36d6000db4b39171149072d11b77af72 (diff) |
Imported Upstream version 8.2.1
Diffstat (limited to 'lisp/org-clock.el')
-rw-r--r-- | lisp/org-clock.el | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index fc619e0..9f22562 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -159,7 +159,7 @@ state to switch it to." This is the string shown in the mode line when a clock is running. The function is called with point at the beginning of the headline." :group 'org-clock - :type 'function) + :type '(choice (const nil) (function))) (defcustom org-clock-string-limit 0 "Maximum length of clock strings in the mode line. 0 means no limit." @@ -263,6 +263,7 @@ The function or program will be called with the notification string as argument." :group 'org-clock :type '(choice + (const nil) (string :tag "Program") (function :tag "Function"))) @@ -361,13 +362,13 @@ play with them." "Format string for the total time cells." :group 'org-clock :version "24.1" - :type 'boolean) + :type 'string) (defcustom org-clock-file-time-cell-format "*%s*" "Format string for the file time cells." :group 'org-clock :version "24.1" - :type 'boolean) + :type 'string) (defcustom org-clock-clocked-in-display 'mode-line "When clocked in for a task, org-mode can display the current @@ -1667,6 +1668,12 @@ Optional argument N tells to change by that many units." (message "Clock canceled") (run-hooks 'org-clock-cancel-hook)) +(defcustom org-clock-goto-before-context 2 + "Number of lines of context to display before currently clocked-in entry. +This applies when using `org-clock-goto'." + :group 'org-clock + :type 'integer) + ;;;###autoload (defun org-clock-goto (&optional select) "Go to the currently clocked-in entry, or to the most recently clocked one. @@ -1690,7 +1697,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection." (org-show-entry) (org-back-to-heading t) (org-cycle-hide-drawers 'children) - (recenter) + (recenter org-clock-goto-before-context) (org-reveal) (if recent (message "No running clock, this is the most recently clocked task")) |