emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: clock-in clock-out problems
Date: Mon, 18 Aug 2014 16:10:30 -0400	[thread overview]
Message-ID: <87ha19r22x.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: lstiji$5dn$1@ger.gmane.org

hymie@lactose.homelinux.net (hymie!) writes:

> In our last episode, the evil Dr. Lacto had captured our hero,
>   Joost Helberg <joost@snow.nl>, 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

  reply	other threads:[~2014-08-18 20:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 15:40 clock-in clock-out problems hymie!
2014-08-18 18:26 ` Joost Helberg
2014-08-18 19:02   ` hymie!
2014-08-18 20:10     ` Nick Dokos [this message]
2014-08-18 20:18       ` Nick Dokos
2014-08-18 20:55       ` hymie!
2014-08-18 21:39         ` Nick Dokos
2014-08-19  3:23           ` hymie!
2014-08-19 15:01             ` hymie!
2014-08-19 15:51               ` Nick Dokos
2014-08-19 18:21                 ` hymie!
2014-08-19 20:46                   ` hymie!
2014-08-19 22:42                     ` Nick Dokos
2014-08-22 13:55                       ` Bastien
2014-08-19  7:55       ` Sebastien Vauban
2014-08-19 12:32         ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ha19r22x.fsf@alphaville.bos.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).