Function: org-agenda-mark-clocking-task

org-agenda-mark-clocking-task is a byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-mark-clocking-task)

Documentation

Mark the current clock entry in the agenda if it is present.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-mark-clocking-task ()
  "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 (bound-and-true-p org-clock-current-task)
    (save-restriction
      (widen)
      (org-agenda-unmark-clocking-task)
      (when (marker-buffer org-clock-hd-marker)
	(save-excursion
	  (goto-char (point-min))
	  (let (s ov)
	    (while (setq s (next-single-property-change (point) 'org-hd-marker))
	      (goto-char s)
	      (when (equal (org-get-at-bol 'org-hd-marker)
			   org-clock-hd-marker)
                (setq ov (make-overlay (line-beginning-position)
                                       (1+ (line-end-position))))
		(overlay-put ov 'type 'org-agenda-clocking)
		(overlay-put ov 'face 'org-agenda-clocking)
		(overlay-put ov 'help-echo
			     "The clock is running in this item")))))))))