gizmomogwai / org-kanban

Kanban table for org-mode
MIT License
238 stars 18 forks source link

feature: Add :keywords parameter to block. #37

Closed shanecelis closed 2 years ago

shanecelis commented 2 years ago

Hi,

I just started using doom-emacs and their org-mode comes chock full with TODO keywords. This made kanban's output unfriendly. Here I'm showing it match nothing just for the sake of demonstration. It's worse when the keywords have items in them.

#+BEGIN: kanban :mirrored nil :match "NA"
| TODO | PROJ | LOOP | STRT | WAIT | HOLD | IDEA | DONE | KILL | [ ] | [-] | [?] | [X] | OKAY | YES | NO |
|------+------+------+------+------+------+------+------+------+-----+-----+-----+-----+------+-----+----|

#+END:

So I added a :keywords parameter that works like this:

#+BEGIN: kanban :mirrored nil :match "NA" :keywords ("TODO" "STRT" "DONE" "KILL")
| TODO | STRT | DONE | KILL |
|------+------+------+------|

#+END:

Thank you for creating this project. I hope you find this useful.

-Shane

gizmomogwai commented 2 years ago

thanks for the pull request (and sorry for the late answer). Do I understand correctly, that the default config for doom-emacs's org mode has all those keywords?

Would the range feature work for you as well (there you give a range of keywords that are shown. in your example this would be STRT to KILL. Problem is, if the keywords are not following each other, switching on element in the org-kanban table to the next state might not work as wished for (e.g. the table would show keywords 1, 3 and 5, but when you advance one task from 1 to the next you would get 2 (instead of 3 as expected in the table (and it would be removed from the table)). I guess you do not use those features, right?

Another feature, that is missing in your pull request (but I could add this quite quickly) is the support in org-kanban/configure-block for your new feature.

gizmomogwai commented 2 years ago

Also org-kanban//todo-keywords is already filtering on the range parameter ... so it would be good to do the fliterings together, or at least next to each other.

shanecelis commented 2 years ago

Yes, those are all in the default doom configuration. Although they are separated into three different sequences.

I will play around with range and see if that’s a better place for this feature.

gizmomogwai commented 2 years ago

If your example was realistic, that range feature will not help you, as it cannot jump over keywords :/

gizmomogwai commented 2 years ago

Do you still need this? @shanecelis

gizmomogwai commented 2 years ago

I am closing this for now, if you still needs this, please reopen and comment!