GothenburgBitFactory / GothenburgBitFactory/taskwarrior

Context-specific configuration overrides: urgency adjustments?

Open
#2,935 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

Not sure if this is a bug in 2.6.2 or a feature request...

## context

Per the "news" command (it's not even in the docs yet),

> Any context can now define context-specific configuration overrides via `context..rc.=`. This allows the user to customize the behaviour of Taskwarrior in a given context, for example, to change the default command in the 'work' context to 'overdue':
>
> task config context.work.rc.default.command overdue

As for my workflow, I'm working with exclusive "project contexts" (e.g. 'work' requires `+work`, 'knitting' requires `+knitting`, etc.) and non-exclusive "location contexts" (e.g. 'home' excludes `-@uni -@work ...`, leaving only `+@home` and location-less tasks.)

## problem

Now, when at `home`, I can work on anything that doesn't relate to a different location; but prioritizing the stuff that _requires_ me to be at `home` would be a good idea. So I was hoping that a

# in ~/.taskrc:
context.home.rc.urgency.user.tag.@home.coefficient=10

would work as if I added `urgency.user.tag.@home.coefficient=10` only while in context `home`.

Instead, nothing happens. Urgency stays unchanged, no matter the context.

(Sanity check: Dropping the `context.home.rc.` part to unconditionally apply the rule _will_ adjust urgency. Defining the `context.home.rc.default.command` _will_ override it _iff_ in `home`.)

## diag

`task diag` output, for completeness

```
task 2.6.2
Platform: Linux

Compiler
Version: 8.3.0
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++17

Build Features
CMake: 3.13.4
libuuid: libuuid + uuid_unparse_lower
libgnutls: 3.6.7
Build type: release

Configuration
File: /home/redacted/.taskrc (found), 1726 bytes, mode 100644
Data: /home/redacted/.task (found), dir, mode 40755
Locking: Enabled
GC: Enabled
$EDITOR: vim
Server:
CA: -
Certificate: -
Key: -
Trust: strict
Ciphers: NORMAL
Creds:

Hooks
System: Enabled
Location: /home/redacted/.task/hooks
Active: on-add.pirate (executable)
on-modify.pirate (executable)
on-modify.timewarrior (executable)
Inactive:

Tests
Terminal: 204x75
Dups: Scanned 131 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 131 tasks for broken references:
No broken references found
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.