From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: clock-in clock-out problems Date: Mon, 18 Aug 2014 16:10:30 -0400 Message-ID: <87ha19r22x.fsf@alphaville.bos.redhat.com> References: <87siktslfr.fsf@snow.nl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJTGV-00033E-Ru for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 16:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJTGP-0006ev-MM for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 16:10:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:54189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJTGP-0006em-CT for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 16:10:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XJTGO-0008Ob-Ll for emacs-orgmode@gnu.org; Mon, 18 Aug 2014 22:10:44 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Aug 2014 22:10:44 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Aug 2014 22:10:44 +0200 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 hymie@lactose.homelinux.net (hymie!) writes: > In our last episode, the evil Dr. Lacto had captured our hero, > Joost Helberg , who said: >>Dear Hymie, >> >>The customizable variable: >> org-clock-persist >> >>is used for solving this. > > Thanks for the info. However, when I tried it out, I get asked > "Resume clock (test) (y or n)" If I answer "n" then the problem recurs > (as I would expect). If I answer "y", then I get an error > (lines cut to 75-ish, but I can try to send the full entire error message > if needed) > > Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) > goto-char(nil) > (cond ((and org-clock-in-resume (looking-at (concat "^[ ]*" org-cloc > (save-restriction (widen) (goto-char target-pos) (org-back-to-heading t) ( > (save-excursion (save-restriction (widen) (goto-char target-pos) (org-back > (save-excursion (if (and selected-task (marker-buffer selected-task)) (pro > (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness) > (catch (quote abort) (let ((interrupting (and (not org-clock-resolving-clo > org-clock-in() > [...] > > In either case, "No active clock." > I added the following to my .emacs --8<---------------cut here---------------start------------->8--- (require 'org-clock) (setq org-clock-persist t) (org-clock-persistence-insinuate) --8<---------------cut here---------------end--------------->8--- I then start a clock, exit, restart emacs, get asked the "Resume clock" question, say "y", work for a while, stop the clock and everything seems OK. Org-mode version 8.3beta (release_8.3beta-245-g3a1fff) If you get an error, then it might be a bug in your version. Post the version along with the complete backtrace (preferably using org-submit-bug-report). Also, include the entry that you are clocking - the error above seems to come from an inability to match the entry: --8<---------------cut here---------------start------------->8--- (cond ((and org-clock-in-resume (looking-at (concat "^[ \t]*" org-clock-string " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$"))) (message "Matched %s" (match-string 1)) (setq ts (concat "[" (match-string 1) "]")) (goto-char (match-end 1)) <<<<<<<<<<<<<<< apparently (match-end 1) returned nil (setq org-clock-start-time (apply 'encode-time (org-parse-time-string (match-string 1)))) (setq org-clock-effort (org-entry-get (point) org-effort-property)) (setq org-clock-total-time (org-clock-sum-current-item (org-clock-get-sum-start)))) --8<---------------cut here---------------end--------------->8--- -- Nick