tools-life / taskwiki

Proper project management with Taskwarrior in vim.
Other
839 stars 95 forks source link

Treat nested text as part of task in viewport #199

Open hwine opened 5 years ago

hwine commented 5 years ago

I find I often want to add local notes about a task in the wiki. These are contextual notes that don't really belong in the task itself as annotations. Having those notes is the beauty of the wiki, imo.

That works (kinda -- only on the last task displayed) until I complete the task, and the completed task is sorted - but nested content is left in place, now falling under a different task.

Here's how my taskwiki looks prior to task completion:

= viewport =
* [X] previously completed task
* [ ] task to be done with no local notes
* [ ] task with local notes
      - Mary will be on vacation May 1-19
      - George will be in UTC+3 for March
* [ ] task that is not recognized by taskwiki

After I complete the task with notes, it looks perfect:

= viewport =
* [X] previously completed task
* [ ] task to be done with no local notes
* [X] task with local notes
      - Mary will be on vacation May 1-19
      - George will be in UTC+3 for March
* [ ] task that is not recognized by taskwiki

But when I save the file, it changes "behind my back" to:

= viewport =
* [X] previously completed task
* [X] task with local notes
* [ ] task to be done with no local notes
* [ ] task that is not recognized by taskwiki
      - Mary will be on vacation May 1-19
      - George will be in UTC+3 for March
* [ ] task that is not recognized by taskwiki

I can workaround the sorting issue by setting taskwiki_sort_order to something invalid, so no sorting occurs.

I have not found a workaround to the "unrecognized task" portion.

phea commented 5 years ago

+1. This is something I do quite often in vimwiki and didn't know what was happening. For my situation it would duplicating/tripling tasks.

Before saving:

= viewport =
* [ ] task A
        - here's a note
        - here's a second remark
* [ ] task B

After saving:

= viewport =
* [ ] task A
* [ ] task B
        - here's a note
        - here's a second remark
* [ ] task B

'task B' would then be duplicated in taskwarrior.

jibcage commented 5 years ago

+1, this would be really awesome! Bonus points if you can toggle adding it to the task's annotations somehow... but just being able to annotate tasks inline would be really sweet.