Function: org-find-open-clocks

org-find-open-clocks is a byte-compiled function defined in org-clock.el.gz.

Signature

(org-find-open-clocks FILE)

Documentation

Search through the given file and find all open clocks.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-clock.el.gz
(defun org-find-open-clocks (file)
  "Search through the given file and find all open clocks."
  (let ((buf (or (get-file-buffer file)
		 (find-file-noselect file)))
	(org-clock-re (concat org-clock-string " \\(\\[.*?\\]\\)$"))
	clocks)
    (with-current-buffer buf
      (save-excursion
	(goto-char (point-min))
	(while (re-search-forward org-clock-re nil t)
	  (push (cons (copy-marker (match-end 1) t)
		      (org-time-string-to-time (match-string 1)))
		clocks))))
    clocks))