diff options
author | Sebastien Vauban <sva-news@mygooglest.com> | 2013-09-10 11:57:05 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2013-09-13 08:08:42 +0200 |
commit | 5aed072d3b2b95f350c0588cf6f211236c4c14e0 (patch) | |
tree | 1059713323315b20dfb27b41924969df8d69481f | |
parent | a7448b0c12402cae6a944328513b9c5cfdc1672e (diff) | |
download | org-mode-5aed072d3b2b95f350c0588cf6f211236c4c14e0.tar.gz |
Center currently clocked headline to top of screen
* org-clock.el (org-clock-goto-before-context): New option.
(org-clock-goto): Use that option.
-rw-r--r-- | lisp/org-clock.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 524dbf1..9f22562 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1668,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. @@ -1691,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 2) + (recenter org-clock-goto-before-context) (org-reveal) (if recent (message "No running clock, this is the most recently clocked task")) |