emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: sebastian_rose@gmx.de
Cc: "[emacs-orgmode]" <emacs-orgmode@gnu.org>
Subject: Re: empty todo item at EOF and clock
Date: Tue, 18 Mar 2008 15:16:06 +0100	[thread overview]
Message-ID: <73C416CA-C9EA-495A-8178-AF02E9E7BE86@science.uva.nl> (raw)
In-Reply-To: <47DF2CCE.4050801@gmx.de>

Fixed, thanks.

- Carsten

On Mar 18, 2008, at 3:45 AM, Sebastian Rose wrote:

> Small bug, when clocking in and out (git head from 03.11.2008 11:15)
>
> Adding empty TODO item at end of an org file (no heading, no text)  
> and clocking in by changing TODO-state to 'STARTING' and then clock  
> out by changing the items state to 'DONE' triggers an error.
>
>
> My org setup is (setq debug-on-error t) and:
>
> ;; Think I have this from the manual:
>
> (defun sr-org-todo-toggle-to-started()
>  "Start the clock, if the state of a todo item changes to 'STARTED'."
>  (if(string= "STARTED" state)
>      (org-clock-in)))
>
> (setq org-after-todo-state-change-hook (quote (org-clock-out-if- 
> current sr-org-todo-toggle-to-started))
>
>
>
>
> To reproduce this bug, move to the end of file, hit
>
> M-S-RET
>
> To insert an TODO item
>
> Don't add any text, not even a heading
>
> Toggle it to 'STARTED' using S-RIGHT
>
> Repeat, to toggle to 'DONE'
>
>
> Debugger entered--Lisp error: (error "Clock start time is gone")
>  signal(error ("Clock start time is gone"))
>  error("Clock start time is gone")
>  byte-code("....")
>  org-clock-out()
>  org-clock-out-if-current()
>  run-hooks(org-after-todo-state-change-hook)
>  byte-code("......")
>  org-todo(right)
>  call-interactively(org-todo)
>  org-shiftright()
>  call-interactively(org-shiftright nil nil)
>
>
> The item gets malformed after toggling to 'DONE' like this:
>
>
> * DONE CLOCK: [2008-03-18 Di 03:10]
>  CLOSED: [2008-03-18 Di 03:11]
>
> Should be
>
> * DONE
>  CLOSED: [2008-03-18 Di 03:11]
>  CLOCK: [2008-03-18 Di 03:10]--[2008-03-18 Di 03:11] =>  0:01
>
>
>
>
> Only in case the item is empty and at end of file, the :CLOCK is  
> considered the heading. It's really a edge case :-)
>
>
> Regards,
>
>   Sebastian
>
>
>
>
>
> <sebastian_rose.vcf>_______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

      reply	other threads:[~2008-03-18 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18  2:45 empty todo item at EOF and clock Sebastian Rose
2008-03-18 14:16 ` Carsten Dominik [this message]

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=73C416CA-C9EA-495A-8178-AF02E9E7BE86@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastian_rose@gmx.de \
    /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).