Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org file clock are added by accident. #110

Closed
tru2dagame opened this issue Nov 21, 2019 · 9 comments
Closed

Org file clock are added by accident. #110

tru2dagame opened this issue Nov 21, 2019 · 9 comments
Labels
bug Something isn't working

Comments

@tru2dagame
Copy link

image

I found couple times, that organice would mess up the state and clock by accident.

@munen
Copy link
Collaborator

munen commented Nov 21, 2019

Yes, that's a good catch! From memory, I can see why the parser did it. Any line with an inactive timestamp in the :LOGBOOK: drawer without a second timestamp is seen as a beginning timestamp. The parsing happens here.

Out of curiosity, how did you manage to get those - State "DONE" from "TODO" [2019-11-21 Thu 21:46] statements within the :LOGBOOK: drawer? I only know them from schedules/deadlines in which they would get a separate drawer like this:

* TODO Header with schedule and clocked time
  SCHEDULED: <2019-11-22 Fri +1d>
  :PROPERTIES:
  :LAST_REPEAT: [2019-11-21 Thu 21:46]
  :END:
  
  - State "DONE"       from "TODO"       [2019-11-21 Thu 21:46]
  :LOGBOOK:
  CLOCK: [2019-11-12 Tue 14:15]--[2019-11-12 Tue 13:20] => -0:55
  CLOCK: [2019-11-12 Tue 14:15]--[2019-11-12 Tue 14:25] =>  0:10
  :END:

I'm assuming there's a configuration flag that'll make org track the toggled time and add it to the same drawer as the clocked time.

In any case, the parser will have to be hardened, here. Thank you for the detailed bug report, @tru2dagame! 🙏

@munen munen added the bug Something isn't working label Nov 21, 2019
@tru2dagame
Copy link
Author

tru2dagame commented Nov 21, 2019

Hi @munen,
I use C-c C-t d to make it done.
The emacs configuration I use is https://github.com/purcell/emacs.d

@munen
Copy link
Collaborator

munen commented Nov 21, 2019

What function does C-c C-t d call? You can find out with C-h c C-c C-t (C-h c will always give you the description to key presses).

By default C-c C-t already calls org-todo which toggles the state, so the d wouldn't be part of the command.

@tru2dagame
Copy link
Author

image
It triggers org-todo then mark it done.

@munen
Copy link
Collaborator

munen commented Nov 22, 2019

@tru2dagame This issue has been addressed in a PR #112 by @jamesnvc.

Could you please give it a go one more time and confirm that the issue is gone for you, too? Please make sure to empty the cache and reload organice beforehand.

@munen
Copy link
Collaborator

munen commented Nov 23, 2019

@munen I think it's this one:
https://github.com/purcell/emacs.d/blob/master/lisp/init-org.el#L44

https://www.gnu.org/software/emacs/manual/html_node/org/Closing-items.html
https://emacs.stackexchange.com/questions/47951/marking-a-todo-item-done-does-not-create-a-closing-timestamp-in-org-mode

Yes, that's the flag! Thanks for looking it up and getting back to me!🙏

It's a nice flag to have set. And with PR #112 organice should treat the data set correctly, too.

@tru2dagame
Copy link
Author

@munen yes, I tried playing with the latest version. It works without any issue. Thanks!

@munen
Copy link
Collaborator

munen commented Nov 25, 2019

Perfect, thank you for testing! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants