* empty todo item at EOF and clock
@ 2008-03-18 2:45 Sebastian Rose
2008-03-18 14:16 ` Carsten Dominik
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Rose @ 2008-03-18 2:45 UTC (permalink / raw)
To: [emacs-orgmode]
[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]
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
[-- Attachment #2: sebastian_rose.vcf --]
[-- Type: text/x-vcard, Size: 499 bytes --]
begin:vcard
fn:Sebastian Rose
n:Rose;Sebastian
email;internet:sebastian_rose@gmx.de
title:Fachinformatiker/Anwendendungsentwicklung
tel;cell:+49 173 / 83 93 417
note;quoted-printable:Entwicklung von Internetanwendungen und Programmen mit freien Werkzeu=
gen und Bibliotheken.=0D=0A=
=0D=0A=
PHP, Java, C/C++, Bash, Perl, Apache, MySQL, PostgreSQL, xt::commerce=
, Typo3, Server, Netzwerk, Desktop, Datenbank, gtkmm=0D=0A=
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: empty todo item at EOF and clock
2008-03-18 2:45 empty todo item at EOF and clock Sebastian Rose
@ 2008-03-18 14:16 ` Carsten Dominik
0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2008-03-18 14:16 UTC (permalink / raw)
To: sebastian_rose; +Cc: [emacs-orgmode]
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-18 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 2:45 empty todo item at EOF and clock Sebastian Rose
2008-03-18 14:16 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.