From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olli Piepponen Subject: Re: Bug: org-clock-remove-empty-clock-drawer eats LOGBOOK drawer before todo state gets logged [8.3.2 (8.3.2-52-g6d0af5-elpaplus @ /Users/Olli/.emacs.d/elpa/org-20151228/)] Date: Thu, 07 Jan 2016 00:02:53 +0700 Message-ID: References: <87bn8yu5e9.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGrUI-0006zC-Uv for emacs-orgmode@gnu.org; Wed, 06 Jan 2016 12:03:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGrUD-0003ME-SJ for emacs-orgmode@gnu.org; Wed, 06 Jan 2016 12:03:06 -0500 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:36109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGrUD-0003M6-Mf for emacs-orgmode@gnu.org; Wed, 06 Jan 2016 12:03:01 -0500 Received: by mail-pa0-x232.google.com with SMTP id yy13so143944671pab.3 for ; Wed, 06 Jan 2016 09:03:01 -0800 (PST) In-reply-to: <87bn8yu5e9.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Thanks for the quick fix! Nicolas Goaziou writes: > Hello, > > Olli P writes: > >> Steps to reproduce: >> >> Launching Emacs with -Q, calling `M-x package-initialize` and then `M-x >> org-mode`, and evaluating the following settings: >> >> (setq org-clock-into-drawer t) >> (setq org-log-into-drawer t) >> (setq org-clock-into-drawer t) >> (setq org-log-done 'time) >> (setq org-clock-out-when-done t) >> (setq org-clock-out-remove-zero-time-clocks t) >> (setq org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@)"))) >> >> Creating a new task, clock-in in and immediately completing the task >> will result in: >> ---------------------------------------------------------------------- >> >> * DONE I bug out >> CLOSED: [2016-01-03 Sun 21:36] >> - State "DONE" from "TODO" [2016-01-03 Sun 21:36] >> >> ---------------------------------------------------------------------- >> Instead of the expected: >> ---------------------------------------------------------------------- >> >> * DONE I bug out >> CLOSED: [2016-01-03 Sun 21:38] >> :LOGBOOK: >> - State "DONE" from "TODO" [2016-01-03 Sun 21:38] >> :END: >> >> ---------------------------------------------------------------------- >> If I wait for the timer to run for a minute then things work as expected >> as well: >> ---------------------------------------------------------------------- >> >> * DONE I bug out >> CLOSED: [2016-01-03 Sun 23:00] >> :LOGBOOK: >> - State "DONE" from "TODO" [2016-01-03 Sun 23:00] >> CLOCK: [2016-01-03 Sun 22:59]--[2016-01-03 Sun 23:00] => 0:01 >> :END: >> >> ---------------------------------------------------------------------- >> The culprit is `org-clock-remove-empty-clock-drawer` that gets run at >> the end of `org-clock-out` for being a `org-clock-out-hook`. > > Fixed in development version. Thank you for the report. > > Regards,