I am trying to generate nice end-of-day reports in the file
diary.org for logging and archiving purposes. I would like to generate a simple list of all TODO task state changes for the current day to be saved to
diary.org, but I'm not sure how to get this data there automatically.
I am using org-log-done (see: https://www.gnu.org/software/emacs/manual/html_node/org/Closing-items.html), since I thought it'd help to have timestamps to search for the right data, and I also experimented with org-agenda-log-mode (see: https://orgmode.org/manual/Agenda-commands.html), but was unable to figure out how to export this data (and I would prefer simply exporting the time stamps and headings using org-log-done info anyway, as I already generate a daily clocktable and org-agenda-log-mode will then provide redundant information in a format I like less).
Lastly, I thought this link would help more, but I couldn't extract or assemble any specifically useful info for my case from it: https://orgmode.org/manual/Tracking-TODO-state-changes.html
Thank you in advance for any help.
EDIT: In the mean time, I've developed a temporary work around by simply clocking in and out quickly whenever I change a task state, so that this information can be pulled by org-clock-report. A more elegant solution would probably involve using org-ql (see: https://github.com/alphapapa/org-ql), but I've heard that persistently using logbooks or archiving "DONE" tasks might also achieve what I seek. For now, I like this solution.