Function: org-agenda-clock-in

org-agenda-clock-in is an interactive and byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-clock-in &optional ARG)

Documentation

Start the clock on the currently selected item.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-clock-in (&optional arg)
  "Start the clock on the currently selected item."
  (interactive "P")
  (org-agenda-check-no-diary)
  (if (equal arg '(4))
      (org-clock-in arg)
    (let* ((marker (or (org-get-at-bol 'org-marker)
		       (org-agenda-error)))
	   (hdmarker (or (org-get-at-bol 'org-hd-marker) marker))
	   (pos (marker-position marker))
	   (col (current-column))
	   newhead)
      (org-with-remote-undo (marker-buffer marker)
        (with-current-buffer (marker-buffer marker)
	  (widen)
	  (goto-char pos)
	  (org-fold-show-context 'agenda)
	  (org-clock-in arg)
	  (setq newhead (org-get-heading)))
	(org-agenda-change-all-lines newhead hdmarker))
      (org-move-to-column col))))