Function: org-clock-history-push
org-clock-history-push is a byte-compiled function defined in
org-clock.el.gz.
Signature
(org-clock-history-push &optional POS BUFFER)
Documentation
Push point marker to the clock history.
When POS is provided, use it as marker point. When BUFFER and POS are provided, use marker at POS in base buffer of BUFFER.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-clock.el.gz
(defun org-clock-history-push (&optional pos buffer)
"Push point marker to the clock history.
When POS is provided, use it as marker point.
When BUFFER and POS are provided, use marker at POS in base buffer of
BUFFER."
;; When buffer is provided, POS must be provided.
(cl-assert (or (not buffer) pos))
(setq org-clock-history-length (max 1 org-clock-history-length))
(let ((m (move-marker (make-marker)
(or pos (point)) (org-base-buffer
(or buffer (current-buffer)))))
n l)
(while (setq n (member m org-clock-history))
(move-marker (car n) nil))
(setq org-clock-history
(delq nil
(mapcar (lambda (x) (if (marker-buffer x) x nil))
org-clock-history)))
(when (>= (setq l (length org-clock-history)) org-clock-history-length)
(setq org-clock-history
(nreverse
(nthcdr (- l org-clock-history-length -1)
(nreverse org-clock-history)))))
(push m org-clock-history)))