Am Sat, Feb 01, 2014 at 01:03:07PM +0100, Florian Beck wrote: > Use `kill-emacs-hook': > > (defun org-clock-out-maybe () > "Stop a currently running clock." > (org-clock-out nil t)) > > (add-hook 'kill-emacs-hook 'org-clock-out-maybe)
Thanks a lot. This is much better. But: are you really using this idea? The problem is that the kill-emacs-hook does not ask for save the modified buffer. That means: I see that the end time is being put into the org buffer, but the buffer/file is not being saved... I solved the problem (but maybe there is a more elegant way...) adding the following: (defun org-clock-out-maybe () "Stop a currently running clock." (org-clock-out nil t) (org-save-all-org-buffers)) -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :: ::