gizmomogwai / org-kanban

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

TODO keyword moving needs checks at table edges #2

Closed heikkil closed 6 years ago

heikkil commented 6 years ago

I really like this kanban implementation! It naturally extends the org environment. Thanks!

It works as it is meant for, but looks like the code does not check for edge conditions: If I try to move TODO keywords past first or last table column, unexpected things happen: The table line disappears or cursor moves to the previous line.

gizmomogwai commented 6 years ago

Thanks for the issue!

Yes ... I also saw this ... I think it comes from the fact, that if you toggle through the todo states of an org-todo item, you also loose the todo (thing). But I think I will fix this ... one can always jump to the todo and delete the TODO tag if thats really needed ... lets see if i find some free time!

heikkil commented 6 years ago

This fix works perfectly for the left edge, but the point ends up in the wrong line at the other edge.

When the direction is right and the new state is in the last column, the point ends up one line up, except when it is on the first line.

When the direction is left and old state was in the last column, the point ends up one line down.

This leads to a curious game where you can repeatedly press the j and k keys and which ends when all the line states are at penultimate column and point ends up past the table which leads to an error: goto-char: Search failed: "[[" :)

Looks like this problem is a separate from the the edge detection one.

gizmomogwai commented 6 years ago

Hi @heikkil, I tried to reproduce the issue now with a clean emacs config in an alpine docker container as described in the readme.org. unfortunately its not failing for me as in your description. could you elaborate more?

heikkil commented 6 years ago

OK. It is something in my config, but I am having trouble pinpointing the cause. Sorry for the noise.

gizmomogwai commented 6 years ago

no problem ... perhaps its an old version of org-kanban