emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug: can't clock out
@ 2010-02-06  0:05 Samuel Wales
  2010-02-06 11:53 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2010-02-06  0:05 UTC (permalink / raw)
  To: emacs-orgmode

For a few weeks or so, most of the time when I clock
out, I get an error.  Cannot narrow it down further.

  (setf org-clock-modeline-total 'today)
  (setq org-clock-into-drawer t)

Clock in.  Wait a few hours, doing stuff in org in the
meantime.

  signal(error ("Clock start time is gone"))
  error("Clock start time is gone")
  (if fail-quietly (throw (quote exit) nil) (error "Clock start time is gone"))
  (if (and (looking-at ...) (equal ... org-clock-string)) (setq ts
(match-string 2)) (if fail-quietly (throw ... nil) (error "Clock start
time is gone")))
  (save-restriction (widen) (goto-char org-clock-marker)
(beginning-of-line 1) (if (and ... ...) (setq ts ...) (if fail-quietly
... ...)) (goto-char (match-end 0)) (delete-region (point)
(point-at-eol)) (insert "--") (setq te (org-insert-time-stamp ... ...
...)) (setq s (- ... ...) h (floor ...) s (- s ...) m (floor ...) s (-
s ...)) (insert " => " (format "%2d:%02d" h m)) (when (setq remove
...) (beginning-of-line 1) (delete-region ... ...) (and ... ... ...))
(move-marker org-clock-marker nil) (move-marker org-clock-hd-marker
nil) (when org-log-note-clock-out (org-add-log-setup ... nil nil nil
nil ...)) (when org-clock-mode-line-timer (cancel-timer
org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when
org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq
org-clock-idle-timer nil)) (setq global-mode-string (delq ...
global-mode-string)) (when org-clock-out-switch-to-state
(save-excursion ... ...)) (force-mode-line-update) (message (concat
"Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te
h m (if remove " => LINE REMOVED" "")) (run-hooks (quote
org-clock-out-hook)))
  (save-excursion (set-buffer (marker-buffer org-clock-marker))
(save-restriction (widen) (goto-char org-clock-marker)
(beginning-of-line 1) (if ... ... ...) (goto-char ...) (delete-region
... ...) (insert "--") (setq te ...) (setq s ... h ... s ... m ... s
...) (insert " => " ...) (when ... ... ... ...) (move-marker
org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when
org-log-note-clock-out ...) (when org-clock-mode-line-timer ... ...)
(when org-clock-idle-timer ... ...) (setq global-mode-string ...)
(when org-clock-out-switch-to-state ...) (force-mode-line-update)
(message ... te h m ...) (run-hooks ...)))
  (let (ts te s h m remove) (save-excursion (set-buffer ...)
(save-restriction ... ... ... ... ... ... ... ... ... ... ... ... ...
... ... ... ... ... ... ... ...)))
  (catch (quote exit) (if (not ...) (if fail-quietly ... ...)) (let
(ts te s h m remove) (save-excursion ... ...)))
  org-clock-out()
  call-interactively(org-clock-out)

-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied ME/"CFS" for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug: can't clock out
  2010-02-06  0:05 bug: can't clock out Samuel Wales
@ 2010-02-06 11:53 ` Carsten Dominik
  2010-02-06 16:32   ` Samuel Wales
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2010-02-06 11:53 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hi Samuel,

are you possibly doing extensive structure editing like sorting
in the tree where the clock is running?

- Carsten

On Feb 6, 2010, at 1:05 AM, Samuel Wales wrote:

> For a few weeks or so, most of the time when I clock
> out, I get an error.  Cannot narrow it down further.
>
>  (setf org-clock-modeline-total 'today)
>  (setq org-clock-into-drawer t)
>
> Clock in.  Wait a few hours, doing stuff in org in the
> meantime.
>
>  signal(error ("Clock start time is gone"))
>  error("Clock start time is gone")
>  (if fail-quietly (throw (quote exit) nil) (error "Clock start time  
> is gone"))
>  (if (and (looking-at ...) (equal ... org-clock-string)) (setq ts
> (match-string 2)) (if fail-quietly (throw ... nil) (error "Clock start
> time is gone")))
>  (save-restriction (widen) (goto-char org-clock-marker)
> (beginning-of-line 1) (if (and ... ...) (setq ts ...) (if fail-quietly
> ... ...)) (goto-char (match-end 0)) (delete-region (point)
> (point-at-eol)) (insert "--") (setq te (org-insert-time-stamp ... ...
> ...)) (setq s (- ... ...) h (floor ...) s (- s ...) m (floor ...) s (-
> s ...)) (insert " => " (format "%2d:%02d" h m)) (when (setq remove
> ...) (beginning-of-line 1) (delete-region ... ...) (and ... ... ...))
> (move-marker org-clock-marker nil) (move-marker org-clock-hd-marker
> nil) (when org-log-note-clock-out (org-add-log-setup ... nil nil nil
> nil ...)) (when org-clock-mode-line-timer (cancel-timer
> org-clock-mode-line-timer) (setq org-clock-mode-line-timer nil)) (when
> org-clock-idle-timer (cancel-timer org-clock-idle-timer) (setq
> org-clock-idle-timer nil)) (setq global-mode-string (delq ...
> global-mode-string)) (when org-clock-out-switch-to-state
> (save-excursion ... ...)) (force-mode-line-update) (message (concat
> "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te
> h m (if remove " => LINE REMOVED" "")) (run-hooks (quote
> org-clock-out-hook)))
>  (save-excursion (set-buffer (marker-buffer org-clock-marker))
> (save-restriction (widen) (goto-char org-clock-marker)
> (beginning-of-line 1) (if ... ... ...) (goto-char ...) (delete-region
> ... ...) (insert "--") (setq te ...) (setq s ... h ... s ... m ... s
> ...) (insert " => " ...) (when ... ... ... ...) (move-marker
> org-clock-marker nil) (move-marker org-clock-hd-marker nil) (when
> org-log-note-clock-out ...) (when org-clock-mode-line-timer ... ...)
> (when org-clock-idle-timer ... ...) (setq global-mode-string ...)
> (when org-clock-out-switch-to-state ...) (force-mode-line-update)
> (message ... te h m ...) (run-hooks ...)))
>  (let (ts te s h m remove) (save-excursion (set-buffer ...)
> (save-restriction ... ... ... ... ... ... ... ... ... ... ... ... ...
> ... ... ... ... ... ... ... ...)))
>  (catch (quote exit) (if (not ...) (if fail-quietly ... ...)) (let
> (ts te s h m remove) (save-excursion ... ...)))
>  org-clock-out()
>  call-interactively(org-clock-out)
>
> -- 
> Q: How many CDC "scientists" does it take to change a lightbulb?
> A: "You only think it's dark." [CDC has denied ME/"CFS" for 25 years]
> ==========
> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug: can't clock out
  2010-02-06 11:53 ` Carsten Dominik
@ 2010-02-06 16:32   ` Samuel Wales
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2010-02-06 16:32 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

On 2010-02-06, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> are you possibly doing extensive structure editing like sorting
> in the tree where the clock is running?

Very possibly, but I can't confirm that I do it every time the bug
happens.  I have the clock in a leaf node.

Samuel

-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied ME/"CFS" for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-06 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-06  0:05 bug: can't clock out Samuel Wales
2010-02-06 11:53 ` Carsten Dominik
2010-02-06 16:32   ` Samuel Wales

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).