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

Added tri-state checkboxes to conform to Emacs' org mode checkboxes #69

Merged
merged 1 commit into from
Feb 21, 2018

Conversation

kxtcd950
Copy link

@kxtcd950 kxtcd950 commented Sep 4, 2016

Some internal API changes as a result, but now a checkbox list performs as Emacs' orgmode checkboxes do.

This fixes an orgmode file import issue from my emacs install to sublime text where indeterminate checkboxes (a checkbox is marked as indeterminate "[-]" to indicate not all children are checked) are present. As well as fixing the import, I've also ported the functionality of indeterminate checkboxes into checkbox lists.

Behaviour:

  • Added indeterminate state checkboxes for situations where some child checkboxes are checked, but not all.
  • Checking a child checkbox where all children are already unchecked will cause the parent checkbox to be marked as indeterminate.
  • Checking a child checkbox where there are already children checked (but not all) will cause the parent to remain indeterminate.
  • An indeterminate state checkbox will not count as checked, and so doesn't count as such in summaries.
  • Toggling an indeterminate checkbox will check it (and all children).

I'm not a python programmer (C/C++ is more my thing), so this may be a little un-python-like, sorry.

…heckbox list performs identically to Emacs' orgmode checkboxes.
@danielmagnussons
Copy link
Owner

Looks nice, will try find time to test it =)

@danielmagnussons
Copy link
Owner

Better late then never, huh =)

@danielmagnussons danielmagnussons merged commit 2f8f5ae into danielmagnussons:master Feb 21, 2018
@kxtcd950
Copy link
Author

Good things come to those that wait 😃

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.

2 participants