From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: bug: can't clock out Date: Sat, 6 Feb 2010 12:53:41 +0100 Message-ID: <17A714B1-57AD-4331-8C47-C2A08239675F@gmail.com> References: <20524da71002051605v1a5a8a9bw49b579ccb4703170@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdjES-00068F-17 for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 06:53:48 -0500 Received: from [199.232.76.173] (port=42294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdjEQ-00067b-FI for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 06:53:46 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdjEP-0002s8-5n for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 06:53:46 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:42911) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NdjEO-0002rk-OS for emacs-orgmode@gnu.org; Sat, 06 Feb 2010 06:53:45 -0500 Received: by ewy28 with SMTP id 28so752236ewy.8 for ; Sat, 06 Feb 2010 03:53:43 -0800 (PST) In-Reply-To: <20524da71002051605v1a5a8a9bw49b579ccb4703170@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org 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