Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple todo keyword sequence definitions #250

Open
happy-dude opened this issue Apr 9, 2022 · 4 comments
Open

Support multiple todo keyword sequence definitions #250

happy-dude opened this issue Apr 9, 2022 · 4 comments
Labels
core-feature Feature is in orgmode core

Comments

@happy-dude
Copy link

happy-dude commented Apr 9, 2022

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
      },
@happy-dude happy-dude added the core-feature Feature is in orgmode core label Apr 9, 2022
@happy-dude
Copy link
Author

happy-dude commented Apr 13, 2022

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?

@jgollenz
Copy link
Contributor

#135 may be related to this

@kristijanhusak
Copy link
Member

@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.

@aareman
Copy link
Contributor

aareman commented Jul 12, 2022

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 #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-feature Feature is in orgmode core
Projects
None yet
Development

No branches or pull requests

4 participants