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 custom headline keywords #14

Closed
shelverizr opened this issue Feb 26, 2024 · 10 comments · Fixed by #15
Closed

Support custom headline keywords #14

shelverizr opened this issue Feb 26, 2024 · 10 comments · Fixed by #15
Labels
enhancement New feature or request

Comments

@shelverizr
Copy link

* NEXT title
* WAITING title
* MAYBE tile
* FAILED title
@amake
Copy link
Owner

amake commented Feb 26, 2024

org_parser treats them the same way Org Mode does when you have not modified org-todo-keywords: namely they are treated as plain text within the headline title.

To support custom keywords the straightforward thing would be to accept the equivalent of org-todo-keywords as an argument to the OrgParserDefinition constructor. Does that work for your use case?

@amake amake added the enhancement New feature or request label Feb 26, 2024
@amake amake changed the title Custom headline keyword not supported Support custom headline keywords Feb 26, 2024
@shelverizr
Copy link
Author

org_parser treats them the same way Org Mode does when you have not modified org-todo-keywords: namely they are treated as plain text within the headline title.

To support custom keywords the straightforward thing would be to accept the equivalent of org-todo-keywords as an argument to the OrgParserDefinition constructor. Does that work for your use case?

Yes, that's exactly what i want.

@amake
Copy link
Owner

amake commented Mar 1, 2024

@shelverizr Can you check #15 to confirm that that's what you had in mind?

@shelverizr
Copy link
Author

@shelverizr Can you check #15 to confirm that that's what you had in mind?

@amake Not entirely, I want to switch from any keyword to any other keyword.

For example, I have two categories of tasks, to-do tasks and completed tasks, their keywords are:

To-do tasks: TODO, NEXT, WAITING, MAYBE
Completed tasks: DONE, FAILED, SUCCESS, STUCK, SHUNT

Sometimes I need to switch from NEXT to TODO
Sometimes I need to switch from WAITING to MAYBE
Sometimes I need to switch from STUCK to NEXT

@amake
Copy link
Owner

amake commented Mar 4, 2024

I'm not sure what "switching" is in the context of the parser. Are you talking about application behavior?

@shelverizr
Copy link
Author

I'm not sure what "switching" is in the context of the parser. Are you talking about application behavior?

Yes, switching is program behavior. Sorry, I didn't notice that I was talking about the parser settings.

@amake
Copy link
Owner

amake commented Mar 4, 2024

Ok then that's a much bigger task than what I've done here. The application will need

  • to somehow know what keywords you want
  • to supply them to the parser
  • to offer a UI to switch keywords

If you're an Orgro user then Orgro only has the UI. I'll have to think about how to allow specifying the desired keywords.

@shelverizr
Copy link
Author

Ok then that's a much bigger task than what I've done here. The application will need

  • to somehow know what keywords you want
  • to supply them to the parser
  • to offer a UI to switch keywords

If you're an Orgro user then Orgro only has the UI. I'll have to think about how to allow specifying the desired keywords.

Okay, thanks for doing this.

@amake
Copy link
Owner

amake commented Mar 4, 2024

I've opened a ticket for Orgro: amake/orgro#93

@amake amake closed this as completed in #15 Mar 4, 2024
@amake
Copy link
Owner

amake commented Sep 23, 2024

Interpreting #+TODO: and related keywords is implemented in Orgro v1.41.0, available for testing soon:

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

Successfully merging a pull request may close this issue.

2 participants