Morgan Smith <[email protected]> writes: >> You removed the wrapper that comments and then comments the heading, >> but there is nothing inherently wrong with that approach. The problem >> probably lies inside `org-toggle-comment'. > > TODO keywords should be before the COMMENT keyword. > > Good: > * COMMENT > * TODO COMMENT > > Confusing and not actually a TODO: > * COMMENT TODO > > The problem is that currently org-todo does the following: > * COMMENT TODO H -> * DONE COMMENT H > > It strips the COMMENT so the TODO keyword in the wrong place can be > toggled, and then it puts the COMMENT where it is supposed to be. > > So we are at a crossroads with two options. > > 1. Follow the established syntax and remove this janky feature.
+1, but my concern is different. I simply commented on the exact change you did in the patch. The underlying problem has nothing to do with org-todo, it is org-toggle-comment. Try * <point>COMMENT TODO M-x org-toggle-comment You will observe COMMENT stripped despite the heading not being commented. In other words, there is a bug (or feature) in org-toggle-comment. What you did instead is got rid of uncomment/todo-change/comment sequence in org-todo function. That does not address the root cause, and, additionally, might introduce new bugs because the rest of the org-todo code operates under assumption that the heading we work with is not commented while todo is being changed. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
