~l3kn/org-fc#5: 
Undo Rating Function

Status
REPORTED
Submitter
~xyank
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
Feature

~xyank 2 years ago

I think the hardest part about this is chaning the entry in the review history file, as it can grow pretty large (18mb, 143k lines in my case) so loading it to change the last line takes some time.

Why are you using TSV for the review stats, by the way? You could use a sqlite3 database instead, after all. Using a sqlite database should make the speed of undo feasible.

Leon Rische 2 years ago · edit

I chose TSV for the review history because:

  1. It avoids adding another dependency (sqlite, emacs-sql)
  2. It's easier to work with using e.g. Python or R
  3. It works well with version control (git)

I've already changed the review logic to collect ratings in a list, only writing them to the history file after each review.

This should be enough to implement an "undo rating" feature, because we can just select an entry from this list and change it.

On 8/9/20 1:45 PM, ~xyank wrote:

I think the hardest part about this is chaning the entry in the review history file, as it can grow pretty large (18mb, 143k lines in my case) so loading it to change the last line takes some time.

Why are you using TSV for the review stats, by the way? You could use a sqlite3 database instead, after all. Using a sqlite database should make the speed of undo feasible.

~xyank 2 years ago

I've already changed the review logic to collect ratings in a list, only writing them to the history file after each review. This should be enough to implement an "undo rating" feature, because we can just select an entry from this list and change it.

Is this already done and committed to the main branch? If so, I'll take a shot at implementing this feature.

Leon Rische 2 years ago · edit

Is this already done and committed to the main branch? If so, I'll take a shot at implementing this feature. Yes, the org-fc-review-session class (org-fc--session) has a :history slot.

Entries are added to it in the org-fc-review-update-data function. If it works better for you, you can change it so it stores number / float value and only formats them when writing to the review history file.

Register here or Log in to comment, or comment via email.