l3kn / org-fc

Spaced Repetition System for Emacs org-mode
https://www.leonrische.me/fc/index.html
GNU General Public License v3.0
258 stars 31 forks source link

feat: Use a box of -1 to indicate the card is new #82

Closed cashpw closed 1 year ago

cashpw commented 1 year ago

Reference: #80

l3kn commented 1 year ago

This looks good!

Some of the additional logic could be avoided by wrapping the sm2 logic in a let that sets a new box value based on (max box 0). Any thoughts on that? If you prefer a more explicit implementation, that's fine with me too.

The review-data initialization also needs to be changed so the initial box is 0.

cashpw commented 1 year ago

The review-data initialization also needs to be changed so the initial box is 0.

Great catch! Thank you.

Some of the additional logic could be avoided by wrapping the sm2 logic in a let that sets a new box value based on (max box 0).

True, and I like the simplicity more than the explicit implementation. Does my change change the let as you expected? I wasn't quite sure what you meant by "wrapping the sm2 logic in a let".

l3kn commented 1 year ago

Nice, your change was exactly what I meant.

Give me some time to check if there are other places we need to account for the new initial box value, then this can be merged.

cashpw commented 1 year ago

Checking in. Are there any changes you'd like to see before this is merged?

cashpw commented 1 year ago

I borked the graph. #105 replaces this pull request.