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

t edit, when there is no running entry defaulting to the last one #54

Closed
vlcinsky opened this issue Nov 13, 2012 · 2 comments
Closed

t edit, when there is no running entry defaulting to the last one #54

vlcinsky opened this issue Nov 13, 2012 · 2 comments

Comments

@vlcinsky
Copy link

I use t edit -z aditional note (--append quite) often.

However, if I run it after t out, when there is no running entry, then it complains canẗ find entry.

It would be great, if t edit woudl default to running or last running entry, in the simliar fassion as t resume does.

There is one scenario different then t resume, after change of a sheet:

  1. t sheet one
  2. t in basic note
  3. t edit -z this note works already now, as we have runnung entry
  4. t out
  5. t edit -z adding note to the same entry as would resume pick
  6. t sheet another
  7. t edit -z adding note, which shall go to the last task (in sheet one)

I you feel, this could be tricky in some situation, there could come confirmation with message like:
Trying to append note to task in sheet >one<, which is not current one!!! Proceed? (Y/n)

There is no need for confirmation in case, we are appending to task in current sheet.

@samg
Copy link
Owner

samg commented Nov 16, 2012

I like this idea. Perhaps t edit should always operate on the last running sheet if there's not one running. The confirmation seems like a good idea (and you can always bypass it by passing a -y flag).

I need to think some more about the behavior when you've switched sheets. Timetrap already tracks the previous sheet (to enable t s -) and perhaps it could start tracking the last check out of sheet. Then I guess the behavior would be "t edit operates on the running entry for the current sheet, or the last entry you checked out of"

@vlcinsky
Copy link
Author

Being expert on forgetting

You see, my typical scenario is switching to another sheet, and then realizing, I forgot to add some note to the last task. I am real expert on this (forgetting).

Terms running versus current sheet

There seem to be too different terms regarding sheet:

  • current sheet: last sheet, to which I have switched using t sheet sheetname
  • running sheet: current sheet, where is present one running task.

Where to get id of last task

I am aware of data structure in sqlite you use (I like the simplicity). One idea for getting id of last running entry: ask sqlite for id with maximal value. I know, it will take a bit more time then reading a record from meta table, but is it quite safe (safer, then keeping records in meta, which could get out of sync in many scenarios, like killing a taks, a sheet or so).

I like TimeTrap - I already learned some valuable information from my TimeTrap records.

samg pushed a commit that referenced this issue Nov 17, 2012
samg pushed a commit that referenced this issue Nov 17, 2012
samg pushed a commit that referenced this issue Nov 17, 2012
@samg samg closed this as completed in a3b0bf1 Nov 17, 2012
chrismetcalf pushed a commit to chrismetcalf/timetrap that referenced this issue Feb 26, 2013
chrismetcalf pushed a commit to chrismetcalf/timetrap that referenced this issue Feb 26, 2013
chrismetcalf pushed a commit to chrismetcalf/timetrap that referenced this issue Feb 26, 2013
chrismetcalf pushed a commit to chrismetcalf/timetrap that referenced this issue Feb 26, 2013
* `t edit` will new edit the most recently checked out of entry if no
  entry is running.

Closes samg#54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants