diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-19 21:14:54 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-04-19 21:14:54 +0200 |
commit | dbda42010c27cc1439d328d39541a6411b45cd2e (patch) | |
tree | e917a6bb92b416c4d39a07a0f8ab46238a860ceb | |
parent | 7894129841baa4fabadb590faa986049f4831256 (diff) | |
download | org-mode-dbda42010c27cc1439d328d39541a6411b45cd2e.tar.gz |
org-agenda: Fix "Void variable org-clock-current-task"
* lisp/org-agenda.el (org-agenda-mark-clocking-task):
(org-agenda-clock-goto): `org-clock-current-task' may not be defined, so
check that first.
Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106504>
-rw-r--r-- | lisp/org-agenda.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 9557d49..826e389 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3801,7 +3801,7 @@ FILTER-ALIST is an alist of filters we need to apply when "Mark the current clock entry in the agenda if it is present." ;; We need to widen when `org-agenda-finalize' is called from ;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in') - (when org-clock-current-task + (when (bound-and-true-p org-clock-current-task) (save-restriction (widen) (org-agenda-unmark-clocking-task) @@ -9407,7 +9407,7 @@ buffer, display it in another window." (cond (pos (goto-char pos)) ;; If the currently clocked entry is not in the agenda ;; buffer, we visit it in another window: - (org-clock-current-task + ((bound-and-true-p org-clock-current-task) (org-switch-to-buffer-other-window (org-clock-goto))) (t (message "No running clock, use `C-c C-x C-j' to jump to the most recent one"))))) |