From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Schroeder Subject: Re: How to calculate all time durations in a file automatically? Date: Tue, 7 May 2019 20:08:37 +0200 Message-ID: References: <87y33i8d6o.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:42495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO4WP-00047x-Jq for emacs-orgmode@gnu.org; Tue, 07 May 2019 14:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO4WO-0003Ay-Gn for emacs-orgmode@gnu.org; Tue, 07 May 2019 14:08:57 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:40666) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hO4WO-00036E-72 for emacs-orgmode@gnu.org; Tue, 07 May 2019 14:08:56 -0400 Received: by mail-ed1-x531.google.com with SMTP id e56so19580179ede.7 for ; Tue, 07 May 2019 11:08:50 -0700 (PDT) In-Reply-To: <87y33i8d6o.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> 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" To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Yeah I ended up using a macro and search for CLOCK text but this solution is much cleaner On Tue, May 7, 2019 at 6:04 PM Ihor Radchenko wrote: > > Dear Martin, > > Just go to the beginning of buffer and (while (re-search-forward > org-clock-line-re) (org-ctrl-c-ctrl-c)) . Or you can use keyboard > macros ;) > > Best, > Ihor > > Martin Schroeder writes: > > > I have imported a bunch of log lines with CLOCK periods from another > > program into an org file but I have forgotten to calculate periods. So > > my time lines look like this: > > > > CLOCK: [2019-03-27 Wed 19:30]--[2019-03-27 Wed 21:30] > > > > Instead of this: > > > > CLOCK: [2019-03-27 Wed 19:30]--[2019-03-27 Wed 21:30] => 2:00 > > > > I can now no longer check in on any task until I fix all these ranges > > in all of my agenda files. So I have to go to each one and do C-c C-c. > > > > Surely there has to be a better way but in my searching with a giant > > flashlight I was not able to find it yet. Can anybody point me in the > > right direction? > >