Re: log-done and org-after-todo-state-change-hook

2022-04-28 Thread Ihor Radchenko
Florian Lindner  writes:

> I have an org-todo-keywords like "DONE(d!)" which logs a time stamp 
> everytime that todo is reached.
>
> I also use org-after-todo-state-change-hook to copy that node somewhere 
> else, as soon as it is finished.
>
> My problem now is that the logging seems to happen after hook, which 
> made me end up with a original node:
> ...
> How can make the hook to be executed after the logging of done or some 
> other way to have the log entry included in the copy?

There is currently no hook running after you store note.
However, you can add an :after advice to org-store-log-note.

Best,
Ihor



log-done and org-after-todo-state-change-hook

2022-04-27 Thread Florian Lindner

Hello,

I have an org-todo-keywords like "DONE(d!)" which logs a time stamp 
everytime that todo is reached.


I also use org-after-todo-state-change-hook to copy that node somewhere 
else, as soon as it is finished.


My problem now is that the logging seems to happen after hook, which 
made me end up with a original node:


DONE letzter note
:LOGBOOK:
- State "DONE"   from "TODO"   [2022-04-27 Mi 21:42]
:END:
[2022-04-27 Mi]


which is copied to

** DONE letzter note
[2022-04-27 Mi]

How can make the hook to be executed after the logging of done or some 
other way to have the log entry included in the copy?


Thanks!
Florian