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

Optionally disable autoupdate of parent checkbox #954

Closed
liskin opened this issue Jul 24, 2020 · 2 comments
Closed

Optionally disable autoupdate of parent checkbox #954

liskin opened this issue Jul 24, 2020 · 2 comments
Assignees
Labels
3rd-party Issues related to a 3rd party plugin or tool config Related to configuration: default, customization

Comments

@liskin
Copy link
Contributor

liskin commented Jul 24, 2020

taskwiki integrates vimwiki with taskwarrior, and in doing so changes the semantics of checkboxes a bit:

   * [ ] Install Taskwiki   |   pending task
   * [X] Install Taskwiki   |   completed task
   * [D] Install Taskwiki   |   deleted task
   * [S] Install Taskwiki   |   started task
   * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert * [ ] on i_<CR>, o and O and to syntax highlight all these five as checkboxes, so I have this in my .vimrc:

let g:vimwiki_listsym_rejected = 'D'
let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I add a new subtask (usingi_<CR>, o or O)
or mark a subtask done, the parent's checkbox is updated to reflect its overall completion, to one of , W, S or X, depending on subtasks completion. This makes little sense in taskwiki. One usually doesn't want to touch the "parent" task in taskwarrior until the "subtasks" are done. Setting

let g:vimwiki_listsym_rejected = 'W'
let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that (1) all subtasks are visible (not necessarily true in taskwiki) and (2) that it's a parent/subtask relationship, not a dependency relationship (not true in taskwarrior, questionable in taskwiki).

It would be awesome if this auto updating of parent task state could be disabled somehow. The other option is for taskwiki to provide its own mappings for these operations, but that seems like unnecessary code duplication to me.

I am open to trying to implement this myself, but I feel like such a feature should be discussed first. I'm also not sure if this should be a user-configured thing or if vimwiki should somehow detect (or be told by) taskwiki and disable it automatically.

@tinmarino
Copy link
Member

I am open to trying to implement this myself, but I feel like such a feature should be discussed first. I'm also not sure if this should be a user-configured thing or if vimwiki should somehow detect (or be told by) taskwiki and disable it automatically.

Nice attitude. In your case, it seems to be a boolean variable close to vimwiki-listsyms-propagate = 0 for no propagation.
I usually do not like to stack boolean variable but my first contribution was *g:vimwiki_table_reduce_last_col* which I may be the only one to use. So as long as you:

  1. use it
  2. do not change default behaviour
  3. add test for maintenance

A boolean variable is ok.

My estimate: 2h for the feature and 2h for the tests. Thanks for your will to contribute.

@tinmarino tinmarino added config Related to configuration: default, customization 3rd-party Issues related to a 3rd party plugin or tool labels Aug 5, 2020
liskin added a commit to liskin/vimwiki that referenced this issue Oct 24, 2020
vimwiki#954)

taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
liskin added a commit to liskin/vimwiki that referenced this issue Oct 24, 2020
vimwiki#954)

taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
liskin added a commit to liskin/vimwiki that referenced this issue Oct 24, 2020
vimwiki#954)

taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
tinmarino pushed a commit that referenced this issue Oct 24, 2020
#954)

taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
deepredsky pushed a commit to deepredsky/vimwiki that referenced this issue Jan 16, 2021
vimwiki#954)

taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
@liskin
Copy link
Contributor Author

liskin commented Jun 6, 2021

This was merged in #1041

@liskin liskin closed this as completed Jun 6, 2021
jls83 pushed a commit to jls83/vimwiki that referenced this issue Jan 17, 2023
vimwiki#954)

taskwiki integrates vimwiki with taskwarrior, and in doing so changes
the semantics of checkboxes a bit:

    * [ ] Install Taskwiki   |   pending task
    * [X] Install Taskwiki   |   completed task
    * [D] Install Taskwiki   |   deleted task
    * [S] Install Taskwiki   |   started task
    * [W] Install Taskwiki   |   waiting task

It's still desirable for vimwiki to automatically insert `* [ ]` on
`i_<CR>`, `o` and `O` and to syntax highlight all these five as
checkboxes, so I have this in my .vimrc:

    let g:vimwiki_listsym_rejected = 'D'
    let g:vimwiki_listsyms = ' WSX'

but it results in undesirable behaviour with task hierarchies: when I
add a new subtask (using `i_<CR>`, `o` or `O`)
or mark a subtask done, the parent's checkbox is updated to reflect its
overall completion, to one of ` `, `W`, `S` or `X`, depending on
subtasks completion. This makes little sense in taskwiki. One usually
doesn't want to touch the "parent" task in taskwarrior until the
"subtasks" are done. Setting

    let g:vimwiki_listsym_rejected = 'W'
    let g:vimwiki_listsyms = ' SX'

results in slightly less illogical behaviour, but it still assumes that
(1) all subtasks are visible (not necessarily true in taskwiki) and
(2) that it's a parent/subtask relationship, not a dependency
relationship (not true in taskwarrior, questionable in taskwiki).

This commit adds an option to disable this behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party Issues related to a 3rd party plugin or tool config Related to configuration: default, customization
Projects
None yet
Development

No branches or pull requests

2 participants