taskwiki icon indicating copy to clipboard operation
taskwiki copied to clipboard

Task modification commands should trigger buffer reload

Open MartyLake opened this issue 8 years ago • 7 comments

Hi,

I had a task in Work.Reporting project, that I wanted to move to Work.Relocation. I did :TaskWikiChooseProject, selected Work.Relocation, hit <Enter>. The buffer contains two view ports corresponding to these projects, the task didn't change from one viewport to the other automaticaly.

After calling : TaskWikiBufferLoad , the task move to the other viewport.

Shouldn't this be "automatic" ?

Best,

MartyLake avatar Jan 05 '17 13:01 MartyLake

Well, depends. It is something to be discussed.

This is not a issue that happens with TaskWikiChooseProject, but it can happen with any modification command, as the viewport filter can be anything (and not only project:myproject). So changing the behaviour to 'update the buffer after any modification command' would slow taskwiki down.

Maybe this could be configurable?

tbabej avatar Jan 06 '17 10:01 tbabej

Maybe indicate that changes are pending and a buffer load is necessary (like when task need syncing it nags you to sync) ?

And/or make it configurable (off by default)?

MartyLake avatar Jan 06 '17 18:01 MartyLake

The thing is, we don't know when a buffer load is necessary. Consider this:

==== Tasks with no notes | -ANNOTATED ====
* [ ] this task has no notes

just annotating it with :TaskWikiAnnotate should make this task disappear. Hence this depends on the filter in the viewport.

tbabej avatar Jan 06 '17 19:01 tbabej

What I'm trying to say is that this feature would have potential to slow down most taskwiki commands with buffer load burden. Also, thinking some more about it, buffer load might be even something you don't want, since it would eradicate any non-saved changes (i.e. manually written X to indicate completed task).

So a more subtle approach would be needed, where, if a task inside a viewport is modified, it is rechecked whether this task still fits the viewport filter. Additionally, all the other viewport filters in the buffer would have to be considered since the task might be egligible to be removed/added there as well.

tbabej avatar Jan 06 '17 20:01 tbabej

The #176 would be also resolved by loading the buffer after a TaskWikiDone command.

tbabej avatar Jul 16 '18 00:07 tbabej

Will it ever be fixed? Having tasks inside vim is so good...

igorline avatar Oct 21 '19 23:10 igorline

@igorline Well, I could see accepting an optional feature flag to allow saving+reloading after each modification command.

tbabej avatar Oct 23 '19 15:10 tbabej