l3kn / org-fc

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

Collaboration support. #61

Open muldoon2007 opened 3 years ago

muldoon2007 commented 3 years ago

Adds a org-fc-strip-all-review-data method to reset review data for sharing.

l3kn commented 3 years ago

Nice, we could also add an optional reset parameter to each of the card update functions and pass that on to org-fc-review-data-update.

This way, we don't need a separate reset function for each card.

I'm also not sure if stripping review data from all cards in the system is ideal, maybe it makes more sense to copy the files that should be shared and strip the review data there?

muldoon2007 commented 3 years ago

I like the suggestion, for example, to allow the user to select a context from which to strip out the data, rather than assuming it's for all cards. I will give that a try.

I have my cards organized in a few different git repos by topic. Computer Science, Aerospace, Product, internal company stuff, etc, each have their own repo. So what I really need is an org-fc context for "the current git repository" since that's the granularity I'm thinking of for collaboration.

For my workflow, I think that copying files wouldn't be necessary. Here's the merge workflow I have in mind:

Submitting new changes

  1. Create a data-stripped branch in git locally from my personal-data branch.
  2. Apply the org-fc-strip-all-review-data function on the new branch, commit, and use that as my source branch for a merge request into master.

Pulling new changes locally

  1. personal-data branch is checked out locally
  2. Rungit checkout --patch master from the upstream to interactively select which changes to apply to personal-data (though there must be a better way to do this in Magit rather than through the git CLI).

In the pull workflow, I would need to manually choose to NOT apply any of the changes that reset review data. I don't like that. I would like to have a flavor of git checkout --patch my-upstream-branch that automatically selects ours for any hunk that includes review data. That could be a fun one to do, especially if I can go through Magit.