Function: org-clock-kill-emacs-query

org-clock-kill-emacs-query is a byte-compiled function defined in org-clock.el.gz.

Signature

(org-clock-kill-emacs-query)

Documentation

Query user when killing Emacs.

This function is added to kill-emacs-query-functions.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-clock.el.gz
(defun org-clock-kill-emacs-query ()
  "Query user when killing Emacs.
This function is added to `kill-emacs-query-functions'."
  (let ((buf (org-clocking-buffer)))
    (when (and buf (yes-or-no-p "Clock out and save? "))
      (with-current-buffer buf
        (org-clock-out)
        (save-buffer))))
  ;; Unconditionally return t for `kill-emacs-query-functions'.
  t)