Function: timeclock-out

timeclock-out is an autoloaded, interactive and byte-compiled function defined in timeclock.el.gz.

Signature

(timeclock-out &optional ARG REASON FIND-REASON)

Documentation

Clock out, recording the current time moment in the timelog.

If a prefix ARG is given, the user has completed the project that was begun during the last time segment.

REASON is the user's reason for clocking out. If REASON is nil, and FIND-REASON is non-nil -- or the user calls timeclock-out interactively -- call the function timeclock-get-reason-function to discover the reason.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/timeclock.el.gz
;;;###autoload
(defun timeclock-out (&optional arg reason find-reason)
  "Clock out, recording the current time moment in the timelog.
If a prefix ARG is given, the user has completed the project that was
begun during the last time segment.

REASON is the user's reason for clocking out.  If REASON is nil, and
FIND-REASON is non-nil -- or the user calls `timeclock-out'
interactively -- call the function `timeclock-get-reason-function' to
discover the reason."
  (interactive "P")
  (or timeclock-last-event
      (error "You haven't clocked in!"))
  (if (equal (downcase (car timeclock-last-event)) "o")
      (error "You've already clocked out!")
    (timeclock-log
     (if arg "O" "o")
     (or reason
	 (and timeclock-get-reason-function
	      (or find-reason (called-interactively-p 'interactive))
	      (funcall timeclock-get-reason-function))))
    (run-hooks 'timeclock-out-hook)
    (if arg
	(run-hooks 'timeclock-done-hook))))