orgmode
orgmode copied to clipboard
Support multiple todo keyword sequence definitions
Does this feature exist in Emacs orgmode core?
Yes
Orgmode link
https://orgmode.org/guide/Multi_002dstate-Workflow.html
Feature value
From the manual:
Sometimes you may want to use different sets of TODO keywords in parallel. For example, you may want to have the basic ‘TODO=/=DONE’, but also a workflow for bug fixing. Your setup would then look like this:
(setq org-todo-keywords
'((sequence "TODO(t)" "|" "DONE(d)")
(sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")))
In my specific case, I have different sequences defined for
- GTD
- Blockers
- Agile
- Shopping
Additional context
Example of how I defined my sequences in emacs:
(setq org-todo-keywords
'(
(sequence "TODO" "PROCESS" "ORGANIZE" "REVIEW" "DO" "|" "DONE") ; GTD
(sequence "IDEA" "DESIGN" "DEVELOP" "QA" "BACKLOG" "|" "COMPLETE") ; Agile
(sequence "|" "NOTDOING" "DELEGATED" "WAITING" "SOMEDAY") ; Blockers
(sequence "WISHLIST" "CART" "SHIPPING" "ATTN" "|" "DONE" "RETURNED") ; Shopping
))
Example of how I expected to define it in nvim-orgmode:
org_todo_keywords = {
{'TODO', 'PROCESS', 'ORGANIZE', 'REVIEW', 'DO', '|', 'DONE'}, -- GTD
{'IDEA', 'DESIGN', 'DEVELOP', 'QA', 'BACKLOG', '|', 'COMPLETE'}, -- Agile
{'|', 'NOTDOING', 'DELEGATED', 'WAITING', 'SOMEDAY'}, -- Blockers
{'WISHLIST', 'CART', 'SHIPPING', 'ATTN', '|', 'DONE', 'RETURNED'} -- Shopping
},
If I were to attempt to implement this and submit a PR, what would the recommended workflow be or where would I reference in the code? Should I make conscious effort to re-implement the same algorithm/style as the mainline org-mode repo?
#135 may be related to this
@Happy-Dude I don't think you will manage to follow the same algorithm, because I didn't follow it at all when creating this. I think we should just update the parser to figure out all todo and all done states with this data, and the todo state switcher to properly suggest options. I don't know what emacs does when there is a same todo keyword in 2 sequences, so that should be tested before implementing.
To add another piece to the functionality. Orgmode in emacs allows for TODO sequences created at the top of a file as well. (not sure if that applies to each todo with properties), but definitely supports custom sequences per file (even multiple per file)
Mentioned in more detail here https://github.com/nvim-orgmode/orgmode/issues/185