On Sun, 11 Jul 2021 at 06:59, Ihor Radchenko <yanta...@gmail.com> wrote: > You are right. I believe that I fixed the breakage in the attached > patch. Also, I noticed that c67037 did not fix the original bug when > state change requests interactive note.
Thanks! I tested your latest patch, and it is fixing both the original issues which `c67037' solved as well as this one. I was trying to understand your change. So, when we call `org-agenda-todo', it calls `org-todo' which adds the post-command-hook. This hook is supposed to run when `org-agenda-todo' finishes, but instead of that we call it directly. This makes sure that the change is recorded in `buffer-undo-list'. Sorry if that's too much to ask, but why don't we need something similar when org-log-note-how is 'note? Can you please help me understand that? I tried reading org-add-log-note and org-store-log-note, but I think I'm missing something basic here. Also, should this line from org.el (org-store-log-note) be removed? ;; Don't add undo information when called from `org-agenda-todo'.