mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 18:36:26 +00:00
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>
This commit is contained in:
parent
7894129841
commit
dbda42010c
|
@ -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."
|
"Mark the current clock entry in the agenda if it is present."
|
||||||
;; We need to widen when `org-agenda-finalize' is called from
|
;; We need to widen when `org-agenda-finalize' is called from
|
||||||
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
|
;; `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
|
(save-restriction
|
||||||
(widen)
|
(widen)
|
||||||
(org-agenda-unmark-clocking-task)
|
(org-agenda-unmark-clocking-task)
|
||||||
|
@ -9407,7 +9407,7 @@ buffer, display it in another window."
|
||||||
(cond (pos (goto-char pos))
|
(cond (pos (goto-char pos))
|
||||||
;; If the currently clocked entry is not in the agenda
|
;; If the currently clocked entry is not in the agenda
|
||||||
;; buffer, we visit it in another window:
|
;; 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)))
|
(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")))))
|
(t (message "No running clock, use `C-c C-x C-j' to jump to the most recent one")))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue