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

Improve tag handling for klog pause #283

Closed
jotaen opened this issue Feb 1, 2024 · 3 comments · Fixed by #297
Closed

Improve tag handling for klog pause #283

jotaen opened this issue Feb 1, 2024 · 3 comments · Fixed by #297
Labels
ENHANCEMENT Ideas and feature requests

Comments

@jotaen
Copy link
Owner

jotaen commented Feb 1, 2024

If you want to pause a tagged entry, then it’s important to take over the tags to the pause entry, otherwise the time is not subtracted properly.

2000-01-01
    8:00-17:00 #work
    -45m

So if you want the -45m to apply/refer to the #work entry, you have to tag the break with #work as well.

Therefore:

  • Document this quirk in the help output of klog pause
  • Provide flag on klog pause that automatically takes over all tags from the previous entry, like klog pause --with-tags (naming tbd)

Originated in #281.

@jotaen jotaen added the ENHANCEMENT Ideas and feature requests label Feb 1, 2024
@rafalkrupinski
Copy link

klog stop takes the entry that's currently open, so there is some notion of context (an open task). klog pause could use it too.
I'd rather use a config entry than a cli flag for this, I don't see why would I want to pause time without pausing tags.

@jotaen
Copy link
Owner Author

jotaen commented Feb 18, 2024

@rafalkrupinski could you explain in more detail what you have in mind here, e.g., with an example? I’m not sure I follow.

@rafalkrupinski
Copy link

@rafalkrupinski could you explain in more detail what you have in mind here, e.g., with an example? I’m not sure I follow.

Provide flag on klog pause that automatically takes over all tags from the previous entry, like klog pause --with-tags (naming tbd)

I guess by the previous entry you mean the currently open time range, obviously.

I just mean I'd prefer to have a config setting, so that by default the summary would be copied from the currently open range, or if it has no summary, from the containing Record.

2024-02-06
    20:41 - ? #project
    -14m // summary taken from the open range

2024-02-07 #project
    20:41 - ?
    -14m // summary taken from the Record

...come to think about it, it could merge tags from both.

2024-02-08 working to #client today
    20:41 - ? working on the #project atm
    -14m #client #project // merged tags

I'd prefer a config setting instead of command line flag, since I'd want to copy tags every time I pause.

jotaen added a commit that referenced this issue Mar 2, 2024
Resolves #283.

If the open range contains tags, then `klog pause` will automatically
take them over (i.e., append) them to the pause entry.

## Example

```
2000-01-01
    5:00-? Did #work
```

Then `klog pause` yields:

```
2000-01-01
    5:00-? Did #work
    -0m #work
```

You can still use the `--summary` flag.

`--no-tags` disables this behaviour.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ENHANCEMENT Ideas and feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants