From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Beck Subject: Re: Stop clock on closing emacs Date: Sat, 01 Feb 2014 14:58:23 +0100 Message-ID: <52ECFD7F.30203@miszellen.de> References: <20140201104512.GA10687@pedroche.uni-erfurt.de> <52ECE27B.9070505@miszellen.de> <20140201130713.GA18536@pedroche.uni-erfurt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9b5j-0005fF-DD for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 08:58:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9b5d-0007B6-If for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 08:58:39 -0500 Received: from mo6-p04-ob.smtp.rzone.de ([2a01:238:20a:202:5304::3]:59232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9b5d-0007Ar-6C for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 08:58:33 -0500 Received: from [10.155.42.63] ([89.204.138.63]) by smtp.strato.de (RZmta 32.23 SBL|AUTH) with ESMTPSA id 6033f3q11DwTBoE (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) for ; Sat, 1 Feb 2014 14:58:29 +0100 (CET) In-Reply-To: <20140201130713.GA18536@pedroche.uni-erfurt.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 01.02.2014 14:07, Igor Sosa Mayor wrote: > 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... You are right. I didn't think of this because... > > 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)) > ... I call `save-all-buffer' in the exit hook. Sorry for the confusion. -- Florian Beck