Open
Conversation
68af60a to
d610820
Compare
|
Priority is UDA, which means one can even make it a float (like I have done). I want to point out that a correct implementation of custom priorities should be included. As of writing, without this implementation, taskwiki fails silently. |
tbabej
reviewed
Jan 29, 2021
| tw.overrides.update({'context':''}) | ||
|
|
||
| # Read urgency levels once instead of at every task processing. | ||
| _urgency_levels = tw.config.get("uda.priority.values") or "H,M,L," |
Owner
There was a problem hiding this comment.
I'd argue urgency_levels is not a fortunate name here, as urgency already has a meaning in TW ecosystem which is distinct from priority.
tbabej
reviewed
Jan 29, 2021
| TEXT = r'(?P<text>.+?)' | ||
| COMPLETION_MARK = r'(?P<completed>.)' | ||
| PRIORITY = r'(?P<priority>!{1,3})' | ||
| PRIORITY = r'(?P<priority>!+|¡+)' |
Owner
There was a problem hiding this comment.
I'm not a big fan of the reversed exclamation mark - while it really does look cool, it is not straightforward to type on the keyboard. I'm wondering if there is not a different symbol we could use that would naturally convey the meaning of lower priority.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This solves #275.
It reads taskwarrior configuration and extracts the priorities from there (for instance,
0,L,,M,H, which treatsLas lower priority that''). The 'no priority' level is the empty priority (priority:). Priorities left of that are considered as insignificance indicators (and are shown with¡, the reverse of!) and priorities right of the 'no-priority' are considered higher (and are shown as!, as is the case currently). For example:Of course, the above is just an example, the user can set the taskwarrior setting
uda.priority.valuesto a sequence of characters so as to customize the exact behavior. In taskwarrior, it is the coefficient of a priority that matters and not the position of the the priority inuda.priority.values. This leaves theuda.priority.valuessettings free for the user to set in a way that the above markers (¡and!) make sense to them.I am also thinking of adding a configuration option to set custom markers (instead of
¡and!).One TODO is to highlight the (arbitrary) priority markers correctly, instead of only the
!,!!,!!!cases.