Skip to content

feat: allow user to set the default todo keyword #923

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

Closed

Conversation

lyz-code
Copy link

@lyz-code lyz-code commented Mar 7, 2025

Summary

fix #897

I will add the tests or documentation if you agree on the implementation @kristijanhusak

Related Issues

Related #

Closes #

Changes

  • List changes here

Checklist

I confirm that I have:

  • Followed the
    Conventional Commits
    specification
    (e.g., feat: add new feature, fix: correct bug,
    docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
  • Thoroughly tested my changes.
  • Added tests (if applicable) and verified existing tests pass with
    make test.
  • Checked for breaking changes and documented them, if any.

@kristijanhusak
Copy link
Member

@lyz-code does this option exist in emacs orgmode?

@kristijanhusak
Copy link
Member

From what I found, Emacs does not have this option. I don't plan to add any custom functionality that does not exist in Emacs orgmode.
You can make a PR to add few more events that you can hook up into your own configuration and modify the values.

@lyz-code
Copy link
Author

lyz-code commented Mar 8, 2025

That makes sense, I'll try my best to guess how to do that ᕕ( ᐛ )ᕗ. Any guidance is welcome

@lyz-code lyz-code closed this Mar 8, 2025
@lyz-code
Copy link
Author

lyz-code commented Mar 8, 2025

Given the structure of OrgMappings:insert_todo_heading() and OrgMappings:insert_todo_heading_respect_content I feel that it would make sense to add an event in OrgMappings:_insert_heading_from_plain_line just before the function ends and another in OrgMappings:meta_return before the startinsert.

In both it will use the line number and use self.files:get_closest_headline_or_nil to pass the headline to the event so that it can set the desired keyword.

How does that sound @kristijanhusak ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choose the default TODO keyword on new created headlines when you don't want the first keyword
2 participants