From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Persistent clocks Date: Tue, 29 Jul 2008 21:26:42 -0400 Message-ID: <87hca8xiul.fsf@gollum.intra.norang.ca> References: <6dbd4d000807291808m68c1c548s6a55ebe2835190b8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KO0Sl-0001xu-NK for emacs-orgmode@gnu.org; Tue, 29 Jul 2008 21:26:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KO0Sk-0001wZ-TX for emacs-orgmode@gnu.org; Tue, 29 Jul 2008 21:26:47 -0400 Received: from [199.232.76.173] (port=54901 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KO0Sk-0001w5-I6 for emacs-orgmode@gnu.org; Tue, 29 Jul 2008 21:26:46 -0400 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:54070) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KO0Sk-00087F-K6 for emacs-orgmode@gnu.org; Tue, 29 Jul 2008 21:26:46 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Denis Bueno Cc: emacs-orgmode "Denis Bueno" writes: > I'm a reticent poster, but long time subscriber, of this mailing list. > Recently I've started using org-mode more seriously, and for various > reasons which are not important, I find the current clock > implementation of limited usefulness. Basically, I may restart Emacs > multiple times each day, and what I'm wondering is whether persistent > clocks would be easy or even useful to implement. If it's easier to > change my habits than org-mode, I'm open to that. > > The behavior I'm thinking seems simple: > - keep the clock information in drawers (as it already seems to be) > - when a new org-mode file is opened and there's no clock running, > scan the file for any unfinished clocks. If there is one, restart a > clock from the appropriate start time. If there is more than one, > signal an error. > > That implementation wouldn't require serialising the clock state to a > different location --- just restarting the clock that was active when > Emacs was killed. > > Does this idea make sense, and would it be useful to anyone? Or > should I think about adapting my workflow to pay attention to the > clock more? I use the clock all the time and occasionally I restart Emacs during the day. In that case I find it pretty easy to go to agenda view for today, hit 'l' to show the clocked time for today and pick the last item and clock that in again - then I just delete the new clock line and the old start time is used when the clock stops. I personally don't do this enough to want it to be automatic. In other work flows it may be wrong for it to be automatic. For example: If you are in org FILE1 and quit with an open clock and then restart Emacs and open org FILE2 which also has an open clock it would be wrong to make that one active - since the last clocked time you used was in FILE1. Since Carsten added the start and end times recently to the agenda view for log-mode it's easy to see which clock entries are missing an end time. My vote would be just to manually restart the clock using the agenda as described above. Just my 2 cents, -Bernt