From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: clock in generates bad drawer [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/carlos/.emacs.d/elpa/org-20160502/)] Date: Thu, 05 May 2016 09:52:34 +0200 Message-ID: <87eg9hosal.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayE5q-0008Gx-DI for emacs-orgmode@gnu.org; Thu, 05 May 2016 03:53:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayE5e-0006y7-Fz for emacs-orgmode@gnu.org; Thu, 05 May 2016 03:53:00 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:38466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayE5e-0006u2-9Q for emacs-orgmode@gnu.org; Thu, 05 May 2016 03:52:54 -0400 In-Reply-To: (Carlos Noguera's message of "Wed, 04 May 2016 10:59:13 +0000") 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: Carlos Noguera Cc: emacs-orgmode@gnu.org Hello, Carlos Noguera writes: > When clocking in under a headline that already has clock entries, the > entries are not correclty bundled in a drawer, generating a: (I removed > the bytecode because gmail didn't like it) > > Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) > byte-code("REMOVED" [beg end org-clock-into-drawer drawer find-unclosed > org-clock-string line-beginning-position outline-next-heading > org-clock-drawer-name "^[ ]*" " > \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+ > +[012][0-9]:[0-5][0-9]\\)\\][ ]*$" re-search-forward t org-element-at-point > org-element-type clock org-element-property :status running > beginning-of-line throw exit "^[ ]*:" regexp-quote ":[ ]*$" :contents-end > nil 0 org-end-of-meta-data "\n" wholenump 2 ":" ":\n:END:\n" > org-indent-region org-flag-drawer mapconcat #[(p) "\212 > b\210\302\212\303\304x\210\305\306!)\305\306!\" > \307\310\311\307\312\311 ##*\207" > [p s delete-and-extract-region " > \n" nil line-beginning-position 2 replace-regexp-in-string "\\`[ \n > ]+" "" "[ \n > ]+\\'"] 7] "\n:END:\n" point-marker ":\n" -1 last open-clock-re element > drawer-re cend org-log-states-order-reversed first ...] 4) > org-clock-find-position(nil) > byte-code("REMOVED" [org-clock-resolving-clocks-due-to-idleness > org-clock-resolving-clocks org-clock-leftover-time leftover org--msg-extra > target-pos org-clocking-p nil "" t org-resolve-clocks (64) org-clock-in (4) > org-clock-select-task "Clock-in on task: " copy-marker error "Abort" (16) > org-clock-mark-default-task org-back-to-heading marker-buffer > marker-position 4 org-heading-components message "Clock continues in > \"%s\"" throw abort org-clock-out org-at-heading-p point-at-bol 0 > org-base-buffer run-hooks org-clock-in-prepare-hook org-clock-history-push > functionp looking-at match-string 2 org-todo "[ ]*" "\\>" > replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" > match-string-no-properties "???" ...] 8) > org-clock-in(nil) > call-interactively(org-clock-in nil nil) > command-execute(org-clock-in) > > that prevents the clock in > I go from > > ** TODO a task > CLOCK: [2016-04-29 Fri 13:14]--[2016-04-29 Fri 14:43] => 1:29 > CLOCK: [2016-05-04 Wed 12:44]--[2016-05-04 Wed 12:44] => 0:00 > > C-c C-x C-i > > to > > ** TODO a task > :CLOCK: [2016-05-04 Wed 12:44]--[2016-05-04 Wed 12:44] => 0:00 > CLOCK: [2016-04-29 Fri 13:14]--[2016-04-29 Fri 14:43] => 1:29 > :END: I cannot reproduce it. In the example above, I get * NEXT a task :LOGBOOK: CLOCK: [2016-05-05 Thu 09:52] CLOCK: [2016-05-04 Wed 12:44]--[2016-05-04 Wed 12:44] => 0:00 CLOCK: [2016-04-29 Fri 13:14]--[2016-04-29 Fri 14:43] => 1:29 :END: > Any ideas? Not quite. Could you provide a backtrace with an uncompiled Org (org-reload with universal argument) ? Regards, -- Nicolas Goaziou