Giter Site home page Giter Site logo

l3kn / org-fc Goto Github PK

View Code? Open in Web Editor NEW
247.0 6.0 31.0 756 KB

Spaced Repetition System for Emacs org-mode

Home Page: https://www.leonrische.me/fc/index.html

License: GNU General Public License v3.0

Awk 5.17% Emacs Lisp 73.67% Shell 21.16%
emacs org-mode spaced-repetition

org-fc's Introduction

org-fc's People

Contributors

c1-g avatar cashpw avatar dalz avatar jethrokuan avatar l3kn avatar mithraen avatar natask avatar vedang avatar yogsototh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

org-fc's Issues

Evil-mode problems

In the README says, we should add this config.

(evil-define-minor-mode-key '(normal insert emacs) 'org-fc-review-flip-mode
  (kbd "RET") 'org-fc-review-flip
  (kbd "n") 'org-fc-review-flip
  (kbd "s") 'org-fc-review-suspend-card
  (kbd "q") 'org-fc-review-quit)

(evil-define-minor-mode-key '(normal insert emacs) 'org-fc-review-rate-mode
  (kbd "a") 'org-fc-review-rate-again
  (kbd "h") 'org-fc-review-rate-hard
  (kbd "g") 'org-fc-review-rate-good
  (kbd "e") 'org-fc-review-rate-easy
  (kbd "s") 'org-fc-review-suspend-card
  (kbd "q") 'org-fc-review-quit)

But I get this error when added:

Error (use-package): org-fc/:config: Symbol’s function definition is void: evil-define-minor-mode-key

It seems like there is not org-fc-review-rate-mode and org-fc-review-flip-mode.

When I am reviewing cards and check the mode, it says org-mode.

Another alternative solution for evil mode users would be:

  (evil-set-initial-state 'org-fc-dashboard-mode 'emacs) ;; this works
  (evil-set-initial-state 'org-fc-flip-mode 'emacs) ;; does not work, this mode is not detected
  (evil-set-initial-state 'org-fc-rate-mode 'emacs) ;; does not work, this mode is not detected

if org-fc-flip-mode and org-fc-rate-mode would exist or detected.

Error when attempting to review cards: "org-fc-index: Symbol’s function definition is void: org-fc-awk-index"

Thanks for your work on org-fc - I'm very keen to get started with it! I'm just having an issue getting set up: when I attempt to review cards, the following error appears in the mini buffer:

org-fc-index: Symbol’s function definition is void: org-fc-awk-index

This occurs even when running M-x org-fc-demo - the demo.org file opens, but the above error appears and nothing else happens.

My system:
OS: macOS Big Sur 11.5.2
Emacs: Mituharu's Emacs-mac, emacs version 27.2. Also replicated on emacs-plus, with emacs version 28.
Relevant emacs config:

(straight-use-package 'hydra)
(straight-use-package
 '(org-fc
   :type git :repo "https://git.sr.ht/~l3kn/org-fc"
   :files (:defaults "awk" "demo.org")
   :custom (org-fc-directories '("~/Org/"))
   :config
   (require 'org-fc-hydra)))

Dependencies installed via

> brew install gawk findutils

Any help would be greatly appreciated.

Matt.

[RFC] Replace review hydras with `read-key`

During review, there are two times user input / keys is read, once to flip the card and once to rate it.
Currently that's implemented using two hydras.

Because there is no way to block and return a value from a hydra (e.g. the rating), org-fc-review-next-card opens the flip hydra, this hydra calls org-fc-review-flip which executes the cards flip-function and then opens the rating hydra. The rating hydra calls org-fc-review-rate which calls org-fc-review-next-card to review the next card.

So the "review loop" is actually a sequence of four functions calling each other.

My main problem with this is that it's not very elegant and parts of the review logic are spread out over multiple functions.

It also prevents me from implementing two features I have planned:

  1. card types with different review types per position, e.g. a double card where one position requires text input (no flipping) while the other position is flipped normally
  2. audio for cards that's played either when the card is presented or flipped.
    A key for replaying the audio file is hard to implement because hydras are not designed to have their keymaps changed after they are defined.

I've tried using two minor-modes instead of the hydras, but that requires a bunch of hacks to make sure the keys work with evil-mode enabled.

Another problem is that EmacsLisp has no TCO, and while I haven't run into this yet, I'm pretty sure that reviewing enough cards in a row (estimate: ~600) could trigger an "Variable binding depth exceeds max-specpdl-size" error.

My proposed solution is to replace the hydras with read-key and a nicely formatted prompt,
which would allow rewriting org-fc-review-next-card to use a while-loop.

space in file names

Brilliant package!

I started a 'buffer' review in a file named 2020-10-25-123635 flashcards.org, and the space broke the file access:

org-fc-awk-index-paths: Org-fc shell error: find: ‘/home/yume/wiki/2020-10-25-123635’: No such file or directory
find: ‘flashcards.org’: No such file or directory

stats_positions.awk may divide by zero

I think I have zero cards, and zero reviews in this setup. I get:

/home/jethro/.config/emacs/straight/build/org-fc/awk/stats_positions.awk:42: fatal: division by zero attempted\n

Always ordered reveal sequence

for a particular flashcard, is it possible for the order of reveal to be always ordered? i.e. if I have 5 deletions, I would like @0 to come first, and @4 to come last. What i'm noticing is that the order in which they appear is dependent on the review due date time.

Here's the flow I'm using, and the observed behaviour:

  1. Create a flashcard, with deletion annotations
  2. Use hydra to create enumeration flashcard

This creates entries in the table that have the exact same due date.

When I run a review, it looks goes through all enumerations, but in random order. To fix, I have to edit the timestamps.

Stats / card filtering backend using org-el-cache

Now that https://github.com/l3kn/org-el-cache is in a somewhat stable state,
we can build a stats / indexer backend that uses a cached list of flashcards / positions.

This will be faster than the awk backend and requires fewer external dependencies.

Ideally, there should be an interface shared between different indexers
(awk, org-el-cache, parsing buffers "by hand") and a configuration option to allow users to choose which one to use.

[Feature] Undo Rating Function

It would be nice to re-rate a card that has been rated incorrectly,
possibly also unsuspending it if the last action was to suspend a card.

After each rating, the previous review data of the position can be stored in the session
so it can be reverted later.

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.

"Hidden" fields

When I review Remembering the Kanji in Anki, the "story" is hidden by default. I can click on it if I need it. Is it possible to achieve something similare with org-fc?

Cannot start org-fc-dashboard, xargs: unmatched single quote

I am getting (wrong-type-argument stringp nil) when calling org-fc-dashboard. Debugging I get to this error in org-fc-awk--key-value-parse.

  string-to-number(nil)
  (list (intern (concat ":" (car kv))) (string-to-number (car (cdr kv))))
  (let ((kv (split-string kv "\11"))) (list (intern (concat ":" (car kv))) (string-to-number (car (cdr kv)))))
  (closure ((input . "xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option\ntotal\0110\nsuspended\0110\ncreated-day\0110\ncreated-week\0110\ncreated-month\0110\n") t) (kv) (let ((kv (split-string kv "\11"))) (list (intern (concat ":" (car kv))) (string-to-number (car (cdr kv))))))("xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option")

Any idea on what I am doing wrong? I am using Emacs 27.0.5, Org Mode 9.4 (Doom Emacs). My configuration is copied from the readme. I am using straight.el, but after reading #16 I tried copying the files from /repos to /build.

[Feature] Append fogotten cards to the review session

The spacing algorithm in org-fc is based on SM2,
with similar modifications as Anki, most notably reducing the number of ratings from 6 to 4.

It would be useful to append forgotten cards (rated "again") to the review session
and repeat them until they are remembered correctly, especially when learning new items.

Quoting https://www.supermemo.com/en/archives1990-2015/english/ol/sm2:

After each repetition session of a given day repeat again all items that scored below four in the quality assessment.
Continue the repetitions until all of these items score at least four.

In org-fc, each card/position has a "box" value counting how many times in a row it has been reviewed correctly.
Anki treats all cards in box 0 and 1 as "learning", adding them to review sessions (that have only few cards?)
even if they are not due yet.

I've only tried this with a small Anki deck, and it seems like cards rated "again" repeated in the same session
until they are reviewed correctly.

Quoting the Anki docs:

If there are no other cards to show you, Anki will show learning cards again even if their delay has not elapsed completely.

Another open question is how the ease should change if a item is rated "again" multiple times in the same session.

`org-fc-normal-init` doesn't work on a sub-heading of a flashcard

* What is my name? :fc:
nothing
** What is my last name?
nothing

Here, if you attempt to use org-fc-normal-init on the subheading, it states that the "Heading is already a flashcard".

This, afaik, is due to this function:

(defun org-fc-part-of-entry-p ()
  "Check if the current heading belongs to a flashcard."
  (member org-fc-flashcard-tag (org-get-tags nil)))

org-get-tags lists inherited tags, and subheadings inherit the :fc: tag. However, the subheadings are not flashcards, nor are they specifically part of a flashcard.

One way one could fix this is to disable tag inheritance via (setq org-use-tag-inheritance nil), however I think we should do something about this ambiguity..

Sidenote 2: Which repo is the "main" one you use: your sourcehut or github?

use-package defer option doesn't work

When I use defer t for use-package I can't run any of org-fc commands because it isn't loaded.
How can I ensure lazy loading of org-fc?

; download org-fc manually
(when (not (file-directory-p "~/.config/emacs/custom-packages/org-fc/"))
    (shell-command "git clone https://git.sr.ht/~l3kn/org-fc ~/.config/emacs/custom-packages/org-fc/"))
(add-to-list 'load-path "~/.config/emacs/custom-packages/org-fc/")
....
(use-package hydra)
(use-package org-fc
    :ensure nil
    :defer t
    :load-path "~/.config/emacs/custom-packages/org-fc/"
    :custom (org-fc-directories '("~/documents/pim/flashcards/"))
    :config
(require 'org-fc-hydra)
(setq org-fc-source-path "~/.config/emacs/custom-packages/org-fc/"))

Incremental Reading of PDFs

This is a promising project, and the fact that you mention Incremental Reading is a good sign considering some of the claims made about it by Supermemo and its users.

I believe that we can create a workable PDF IR system by mostly stitching together existing tools. One of these is org-noter, which allows an extraction of highlights via its org-noter-create-skeleton function, the relevant section can be found here: https://github.com/weirdNox/org-noter/blob/9ead81d42dd4dd5074782d239b2efddf9b8b7b3d/org-noter.el#L1580

My thinking, which I describe here, is that we have an incremental extraction of highlighted elements, or even more simply an advice-add or function that triggers an extraction via org-noter's code for every highlight made, as its made.

This would give us ID'd entries, which can then be drilled via org-fc and whittled down to cleaner entries as described by Supermemo's Piotr Wozniak.

I'm willing to work on this if there is interest, but might need some direction from someone more experienced with Elisp.

Org-fc shell error

For a file with this content:

* Test :fc:
New

I get this error:

if: org-fc shell error: [REDACTED DATE]
(
)

I'd like a hint as to what is going on

Support symbolic link directories

EDIT 2: this is because my ~/.org is a symbolic link and not a directory. I use a link to use iCloud sync for free. I've proposed a fix in #27

I configured org-fc-directories with "~/.org" instead of "~/.org/".
And the org-fc-awk-index-paths returned nil.

A simple quick fix would certainly be to simply add the trailing /.
Before that a straightforward solution would be to state directories should contain the trailing / in the README.

Edit this is even more misleading as by default this does not contain this trailing /

(defcustom org-fc-directories '("~/org")
  "Directories to search for flashcards."
  :type 'string
  :group 'org-fc)

The problem comes from the find command:

find ~/.org .... does not return any file, while find ~/.org/ ... returns a list of files.

> find --version
find (GNU findutils) 4.7.0
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2)
> find ~/.org
/Users/yaesposi/.org

Instead of returning all files in the ~/.org directory.

Can't refresh the dashboard

My actions:
Create new flashcard (type doesn't matter)
Open dashboard, the card gets recognized, stats are correct
Press [r] for review
Review the card

After review I get back to the dashboard, but now with old information in it.
If I press g I get:

revert-buffer: Wrong number of arguments: ((t) (context) "Show the dashboard view for CONTEXT in the current buffer." (let* ((buf (get-buffer-create org-fc-dashboard-buffer-name)) (inhibit-read-only t) (index (org-fc-index context)) (stats (org-fc-dashboard-stats index)) (created-stats (plist-get stats :created)) (due-stats (plist-get stats :due)) (reviews-stats (org-fc-awk-stats-reviews))) (save-current-buffer (set-buffer buf) (erase-buffer) (insert (propertize "Card Statistics

" 'face 'org-level-1)) (insert (format "  New: %d (day) %d (week) %d (month) 
" (plist-get created-stats :day) (plist-get created-stats :week) (plist-get created-stats :month))) (insert "
") (insert (format "  %6d Cards, %d suspended
" (plist-get stats :total) (plist-get stats :suspended))) (let ((--dolist-tail-- (plist-get stats :by-type))) (while --dolist-tail-- (let ((pair (car --dolist-tail--))) (insert (format "  %6d %s
" (cdr pair) (car pair))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (insert "
") (insert (propertize "Position Statistics

" 'face 'org-level-1)) ...))), 2

If I press G I get:
command-execute: Wrong type argument: commandp, org-fc-dashboard-view

If I press [q] I'm thrown into *Buffer List* but *org-fc Dashboard* is still present, I can switch to it and get same old information.

If I kill Dashboard manually and open it again, the information gets updated.

org-fc hydra like bar in minor mode implementation

are there plans to include a hydra like bar in the bottom for the minor mode implementation?
What I liked with the hydra implementation is that I can see the keys I need to press on the bottom.
Thanks

Requirements for macOS users

Since strftime is a GNU gawk extension, macOS users should install gawk by homebrew or manually.
I found strftime in those files:

awk/stats_positions.awk
         now = strftime("%FT%T", systime(), 1);
awk/filter_due.awk
         now = strftime("%FT%T", systime(), 1);
awk/utils.awk
         return strftime("%FT%T", systime() - 24 * 60 * 60 * n, 1);

Without installing gawk, the macOS will call the default awk and it cause problems. See Awk strftime on Mac OS X.

And for the command shuf, macOS users should install coreutils. See Install shuf on OS X?.

Tag based review

It would be nice if I could filter what subject to review based on tags.
Right now I see I can add tags but they aren't actually of any use, or do they?

Ideally when doing org-fc-review, after the context menu with options all and buffer, another menu would ask for which tags to include in the review.

Error after updating

I am having this error after updating.

Error (use-package): org-fc/:config: Cannot open load file: No such file or directory, org-fc-hydra
(use-package hydra)

(use-package org-fc
  :straight (org-fc :type git :host github :repo "l3kn/org-fc" :files (:defaults "awk" "demo.org"))
  :custom
   (org-fc-directories '("~/org/roams"))
  :config
  (require 'org-fc-hydra))

expand org-fc-directories

Please expand org-fc-directories. I had it set as:

  (use-package org-fc
    :custom (org-fc-directories '("~/wiki"))
...

When I selected 'all' for review, it ran into a problem:

org-fc-awk-index-paths: Org-fc shell error: find: ‘~/wiki’: No such file or directory

Enhancement: allow multiple occurences of the same cloze deletion item

In e.g. the context of languages learning, it is quite common to have more than one example for the same word:

Je {{vois}@0} Lisa - I see Lisa
Je {{vois}@0} le {{chat}@1} - I see the cat

It would be useful then that the two items marked 0 be reviewed together as a unique one.
As far as I can see, this is currently not the case:
I tried and the two items where reviewed separately, and there are two position 0 entries in the REVIEW_DATA drawer, which is not really useful (and might create problems later, I did not check the code yet).

Of course, if I mark these two items with different numbers, or don't mark one of them, the review is not meaningful as the answer is visible on the next line in the card.

As a final note, this works as (I) expected in e.g. Anki: cloze deletion items with the same number in a given card are considered as a unique item, and are reviewed together.

Any thought?

`org-fc-demo` produces "No cards due right now"

M-x org-fc-demo opens the demo file, but nothing is due for review.

Upon inspection I can see that in REVIEW_DATA drawer due date is 2000-01-01T00:00:00Z - in the past, and I assume that makes the card due for review.

Might be unrelated, but with M-x org-fc-type-double-init on a heading+text-entry I get Wrong type argument: hash-table-p, nil error. The PROPERTIES drawer is populated, but REVIEW_DATA is not. Also the card does not get :fc:-tag. On such newly setup card org-fc-review-buffer also says "No cards due right now"

Spacemacs setup instructions didn't work for me.

I'm using Spacemacs for the first time, just to try it out, so forgive me if I'm missing something obvious.

I'm on MacOS 10.15 and Emacs 27. I usually use the Prelude configuration but just was giving Spacemacs a try by setting my Emacs home to a custom location in my ~/.emacs file:

(setq use-custom-emacs-home t) 

(when use-custom-emacs-home
  (setq user-emacs-directory
        "~/spacemacs/.emacs.d/"
        ))   ; defaults to ~/.emacs.d/

(load (expand-file-name "init.el" user-emacs-directory))

After following the instructions here, I got this error mesage when loading Spacemacs:

(Spacemacs) --> installing package: org-fc@dotfile... [1/1]
Fetcher: git
Source: https://git.sr.ht/~l3kn/org-fc

Updating /Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-audio.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-audio.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-awk.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-awk.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-cache.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-cache.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-compat.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-compat.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-dashboard.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-dashboard.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-hydra.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-hydra.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-keymap-hint.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-keymap-hint.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-type-cloze.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-type-cloze.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-type-double.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-type-double.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-type-normal.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-type-normal.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-type-text-input.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-type-text-input.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc-type-vocab.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc-type-vocab.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/org-fc.el -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/org-fc.el
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/awk => /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/awk
/Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/build/org-fc/demo.org -> /var/folders/ht/c9s4jrmn5nl3v0hf1wl2jxww39j74k/T/org-fcNw3ZY8/org-fc-20201121.227/demo.org
Wrote /Users/mmuldoon/spacemacs/.emacs.d/.cache/quelpa/packages/org-fc-readme.txt
Auto-evilification could not remap these functions in map ‘archive-mode-map’:
   - ‘archive-chgrp-entry’ originally mapped on ‘G’
Auto-evilification could not remap these functions in map ‘tar-mode-map’:
   - ‘tar-chgrp-entry’ originally mapped on ‘G’
Parsing tar file...done
Error getting PACKAGE-DESC: (wrong-type-argument arrayp nil)
(Spacemacs) Error: 
An error occurred while installing org-fc (error: (wrong-type-argument package-desc nil))

I'm going to stick with Prelude for a bit but any pointers on getting this working right would be great.

Pronunciation learning with org-fc-audio

Why org-fc-audio-set-after only works for text input cards, let's say I want 배우기 to be the front, then I recall pronunciation, and the back should be the audio reference, I don't need to type anything to compare.
There are other cards like that, with general knowledge (regular front/back cards), but with English pronunciation on the back, for difficult to pronounce terms and non English speaking learner. It utilizes two sensory systems, visual and auditory.
Will it be difficult to implement?

org-fc stop working after update

This is my configuration:

(use-package org-fc
  :straight
  (org-fc
   :type git :host github :repo "l3kn/org-fc"
   :files (:defaults "awk" "demo.org"))
  :custom
  (org-fc-directories '("~/org/roams")))

This is the error message when starting emacs:

Error (use-package): org-fc/:catch: Symbol’s function definition is void: case

emacs -debug-init message:

Debugger entered--Lisp error: (void-function case)
  (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args))))
  (let ((value (car-safe (prog1 args (setq args (cdr args)))))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args)))))
  (let ((keyword (car-safe (prog1 args (setq args (cdr args)))))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value (car-safe (prog1 args (setq args (cdr args)))))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args))))))
  (while args (let ((keyword (car-safe (prog1 args (setq args (cdr args)))))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value (car-safe (prog1 args (setq args ...))))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args)))))))
  (let (defcustom-args property reader) (while args (let ((keyword (car-safe (prog1 args (setq args ...))))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value (car-safe (prog1 args ...)))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args))))))) (if property nil (error "Missing keyword :property")) (let ((property-symbol (intern (concat (symbol-name symbol) "-property")))) (list 'progn (cons 'defcustom (cons symbol (cons standard (cons doc defcustom-args)))) (list 'defcustom property-symbol property (format "Headline property for `%s'" symbol) ':type ''string ':group (plist-get defcustom-args :group)) (list 'defun symbol nil (format "Getter for `%s'" symbol) (list 'if-let (list (list 'value (cons ... ...))) '(read value) symbol)))))
  (closure (t) (symbol standard doc &rest args) (let (defcustom-args property reader) (while args (let ((keyword (car-safe ...))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value ...)) (case keyword (:property ...) (:reader ...) (t ... ...))))) (if property nil (error "Missing keyword :property")) (let ((property-symbol (intern (concat ... "-property")))) (list 'progn (cons 'defcustom (cons symbol (cons standard ...))) (list 'defcustom property-symbol property (format "Headline property for `%s'" symbol) ':type ''string ':group (plist-get defcustom-args :group)) (list 'defun symbol nil (format "Getter for `%s'" symbol) (list 'if-let (list ...) '... symbol))))))(org-fc-algo-sm2-ease-min 1.3 "Lower bound for a cards ease." :type 'float :group 'org-fc :property "FC_SM2_EASE_MIN")
  (org-fc-property org-fc-algo-sm2-ease-min 1.3 "Lower bound for a cards ease." :type 'float :group 'org-fc :property "FC_SM2_EASE_MIN")
  eval-buffer(#<buffer  *load*-519315> nil "/home/last/.emacs.d/straight/build/org-fc/org-fc-a..." nil t)  ; Reading at buffer position 2623
  load-with-code-conversion("/home/last/.emacs.d/straight/build/org-fc/org-fc-a..." "/home/last/.emacs.d/straight/build/org-fc/org-fc-a..." nil t)
  require(org-fc-algo-sm2)
  eval-buffer(#<buffer  *load*-690040> nil "/home/last/.emacs.d/straight/build/org-fc/org-fc.e..." nil t)  ; Reading at buffer position 27624
  load-with-code-conversion("/home/last/.emacs.d/straight/build/org-fc/org-fc.e..." "/home/last/.emacs.d/straight/build/org-fc/org-fc.e..." t t)
  require(org-fc nil t)
  (not (require 'org-fc nil t))
  (if (not (require 'org-fc nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-fc) :error))
  (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(org-fc-directories '("~/org/roams") nil nil "Customized with use-package org-fc"))) (if (not (require 'org-fc nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-fc) :error)))
  (condition-case err (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(org-fc-directories '("~/org/roams") nil nil "Customized with use-package org-fc"))) (if (not (require 'org-fc nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-fc) :error))) ((debug error) (funcall use-package--warning58 :catch err)))
  eval-buffer(#<buffer  *load*> nil "/home/last/.emacs.d/init.el" nil t)  ; Reading at buffer position 32960
  load-with-code-conversion("/home/last/.emacs.d/init.el" "/home/last/.emacs.d/init.el" t t)
  load("/home/last/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xf94cfab52d7d307>) #f(compiled-function () #<bytecode 0x81a386fa1b19353>) t)
  command-line()
  normal-top-level()

[Feature Request] Basic collaboration support

I'm trying to push org-mode within my company as a tool for certain knowledge bases and notes. We can collaborate on coming up with key concepts and facts that are relevant to our work. Some of it is generic domain knowledge in aerospace and computer science, and some is proprietary knowledge within the company. But the whole idea that we can use org-mode and org-fc do both document our knowledge, and help people remember it with SR, is really powerful to me.

One obvious thing that gets in the way with that is the org-fc :REVIEW_DATA, which shouldn't get committed to shared git repositories.

I saw that org-drill has some collaboration support by provided a function to scrub user-specific metadata and then re-apply it, which can be done outside of the mainline git branch. It's described here. But my problem so far with org-drill is the performance degradation with a collection of more than 5,000 org files (I ingested a whole aerospace dictionary from NASA 🤓). On the other hand org-fc has performed great with the big collection.

Have you looked into similar collaboration functions for org-fc? I'm going try out an implementation but it'd be great to know if you've done any thought about this so far. It would be amazing to have a magit-like interface to step people through stripping out the user data, leaving it on a git branch, and then re-applying the user data after a pull.

Card suspension behavior

When I mark a card for suspension from within the review session, it sets the :suspended: tag but doesn't save or kill the buffer automatically. So I have to do it manually for each suspended card during that session. Shouldn't it be automatic after "s" shortcut is pressed?

Review Stastistics section completely blank

My dashboard looks like this:

image

Investigating org-fc-awk-stats-reviews:

(shell-command-to-string
                   (org-fc-awk--command
                    "awk/stats_reviews.awk"
                    :utils t
                    :input org-fc-review-history-file))

gives me:

0	0	0	0	0
0	0	0	0	0
0	0	0	0	0
0	0	0	0	0

where org-fc-review-history-file is "/home/jethro/.config/emacs/org-fc-reviews.tsv", and the contents are:

2020-02-25T09:28:33Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	74266d9f-c0db-4503-a154-44cb8e2c54d6	front	2.50	0	0.00	hard	16.17
2020-02-25T09:28:52Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	a65f2c62-91c2-4b31-b0b3-00355fa6865c	front	2.50	0	0.00	good	8.70
2020-02-25T09:31:20Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	801b1e54-63e5-47fd-9cf5-c941f0199c0f	front	2.50	0	0.00	hard	27.50
2020-02-25T09:35:43Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	eeef3d55-8040-4ec2-a964-685a8784f7f1	0	2.50	0	0.00	good	15.40
2020-02-25T09:35:53Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	2e133396-c7ec-4097-b6b2-15b1b3c539a5	front	2.50	0	0.00	easy	9.58
2020-02-25T09:36:14Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	6e4685be-b2d7-4fc2-893e-8e7658c102e1	front	2.50	0	0.00	easy	4.56
2020-02-25T09:36:29Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	eeef3d55-8040-4ec2-a964-685a8784f7f1	1	2.50	0	0.00	good	14.85
2020-02-25T09:54:17Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	74266d9f-c0db-4503-a154-44cb8e2c54d6	front	2.50	1	0.01	easy	12.95
2020-02-25T09:54:22Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	801b1e54-63e5-47fd-9cf5-c941f0199c0f	front	2.50	1	0.01	easy	4.14
2020-02-25T09:54:31Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	eeef3d55-8040-4ec2-a964-685a8784f7f1	0	2.50	1	0.01	easy	8.92
2020-02-25T09:54:33Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	a65f2c62-91c2-4b31-b0b3-00355fa6865c	front	2.50	1	0.01	easy	1.39
2020-02-25T09:54:34Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	eeef3d55-8040-4ec2-a964-685a8784f7f1	1	2.50	1	0.01	easy	1.45
2020-02-25T10:11:51Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	0	2.50	0	0.00	easy	9.10
2020-02-25T10:12:06Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	1	2.50	0	0.00	easy	15.27
2020-02-25T10:12:09Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	2	2.50	0	0.00	easy	2.31
2020-02-25T10:12:11Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	3	2.50	0	0.00	easy	1.88
2020-02-25T10:12:48Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	0	2.50	0	0.00	easy	5.79
2020-02-25T10:12:49Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	1	2.50	0	0.00	easy	0.78
2020-02-25T10:12:50Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	3	2.50	0	0.00	easy	0.55
2020-02-25T10:12:50Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	2	2.50	0	0.00	easy	0.66
2020-02-25T10:14:56Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	3	2.50	0	0.00	hard	5.70
2020-02-25T10:14:57Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	0	2.50	0	0.00	hard	1.26
2020-02-25T10:14:58Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	2	2.50	0	0.00	hard	0.82
2020-02-25T10:14:59Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	1	2.50	0	0.00	hard	0.68
2020-02-25T10:52:06Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	3	2.50	1	0.01	easy	4.42
2020-02-25T10:52:15Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	2	2.50	0	0.00	easy	6.45
2020-02-25T10:52:17Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	1	2.50	1	0.01	easy	2.29
2020-02-25T10:52:19Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	2	2.50	1	0.01	easy	1.33
2020-02-25T10:52:21Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	3	2.50	0	0.00	easy	2.17
2020-02-25T10:52:22Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	0	2.50	1	0.01	easy	1.26
2020-02-25T10:52:23Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	0	2.50	0	0.00	easy	1.17
2020-02-25T10:52:24Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	1	2.50	0	0.00	easy	0.78
2020-02-25T10:52:27Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	4	2.50	0	0.00	easy	2.48
2020-02-25T10:52:41Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	2	2.50	0	0.00	easy	5.26
2020-02-25T10:52:43Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	0	2.50	0	0.00	easy	1.46
2020-02-25T10:52:43Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	1	2.50	0	0.00	easy	0.59
2020-02-25T10:52:45Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	3	2.50	0	0.00	easy	1.13
2020-02-25T10:52:46Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	c8b92411-bd57-4f87-aa7f-bbac54afa82e	4	2.50	0	0.00	easy	1.16
2020-02-25T10:54:32Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	0	2.50	0	0.00	easy	4.74
2020-02-25T10:54:45Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	3	2.50	0	0.00	easy	9.08
2020-02-25T10:54:52Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	4	2.50	0	0.00	easy	7.47
2020-02-25T10:54:57Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	1	2.50	0	0.00	easy	4.63
2020-02-25T10:54:59Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	2	2.50	0	0.00	easy	2.06
2020-02-25T10:55:43Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	1	2.50	0	0.00	easy	3.67
2020-02-25T10:55:45Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	2	2.50	0	0.00	easy	2.51
2020-02-25T10:55:47Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	0	2.50	0	0.00	easy	1.79
2020-02-25T10:55:48Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	3	2.50	0	0.00	easy	1.36
2020-02-25T10:55:49Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	bfc492cf-fef4-4ee8-ad21-f12493202bc7	4	2.50	0	0.00	easy	0.97
2020-02-25T10:57:32Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	0	2.50	0	0.00	easy	5.47
2020-02-25T10:57:35Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	2	2.50	0	0.00	easy	2.74
2020-02-25T10:57:38Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	1	2.50	0	0.00	easy	3.06
2020-02-25T10:57:39Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	aeaeafb8-cb1a-4136-a194-77d147b4c596	3	2.50	0	0.00	easy	1.32
2020-02-25T11:01:36Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	491d49ed-a887-4e7b-be98-a89f1517bfd6	0	2.50	0	0.00	easy	9.58
2020-02-25T11:01:40Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	f3577bb5-7471-4621-9a33-bd72f9381146	front	2.50	0	0.00	easy	2.34
2020-02-25T11:01:50Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	0e2e3c81-6483-42eb-b9af-490ca130dd4f	0	2.50	0	0.00	easy	8.86
2020-02-25T11:02:01Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	2082ef86-db79-4ebe-98ce-8a3fd534ef5d	front	2.50	0	0.00	easy	10.25
2020-02-25T11:07:14Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	e9c07516-edb6-4205-8f08-0bc3925463db	1	2.50	0	0.00	easy	7.99
2020-02-25T11:07:15Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	e9c07516-edb6-4205-8f08-0bc3925463db	0	2.50	0	0.00	easy	1.18
2020-02-25T11:07:18Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	e9c07516-edb6-4205-8f08-0bc3925463db	2	2.50	0	0.00	easy	2.97
2020-02-25T11:07:20Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	e9c07516-edb6-4205-8f08-0bc3925463db	3	2.50	0	0.00	easy	1.58
2020-02-25T11:08:07Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	e9c07516-edb6-4205-8f08-0bc3925463db	4	2.50	0	0.00	easy	1.68
2020-02-25T11:15:50Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	0	2.50	0	0.00	easy	6.80
2020-02-25T11:16:05Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	3	2.50	0	0.00	good	15.40
2020-02-25T11:16:08Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	1	2.50	0	0.00	good	2.95
2020-02-25T11:16:10Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	1	2.50	0	0.00	easy	1.95
2020-02-25T11:16:22Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	2	2.50	0	0.00	again	11.40
2020-02-25T11:16:24Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	3	2.50	0	0.00	good	2.27
2020-02-25T11:16:37Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	2	2.50	0	0.00	hard	13.36
2020-02-25T11:16:40Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	0	2.50	0	0.00	good	2.73
2020-02-25T11:17:41Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	2	2.50	0	0.00	again	5.52
2020-02-25T11:17:56Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	2	2.50	0	0.00	hard	13.95
2020-02-25T11:49:42Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	1	2.50	1	0.01	easy	5.59
2020-02-25T11:49:44Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	0	2.50	1	0.01	easy	1.82
2020-02-25T11:49:55Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	2	2.50	1	0.01	good	10.94
2020-02-25T11:50:43Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	2	2.50	1	0.01	easy	2.20
2020-02-25T11:50:52Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	1b32c55c-fe3f-417c-bb90-5b25d349acce	3	2.50	1	0.01	easy	8.80
2020-02-25T11:51:54Z	/home/jethro/Dropbox/org/braindump/org/20200225172112_flashcards_multivariable_calculus.org	407556ce-e833-4016-b461-4ac0c3f537e6	3	2.50	1	0.01	easy	3.37

Documentation: Spacemacs recipe incorrect

First of all, thank you for making this package! I'm looking forward to setup SRS inside emacs.

I went to the Documentation you provided and noticed the spacemacs installation script is incorrect: it uses "repo" instead of "url", this won't work since you are not fetching from github/gitlab.

Install script on documentation:

dotspacemacs-additional-packages
'((org-fc
   :location (recipe :fetcher git
                     :repo "l3kn/org-fc"
                     :repo "https://git.sr.ht/~l3kn/org-fc" ; error here
                     :files (:defaults "awk" "demo.org"))))
;; ...
(defun dotspacemacs/user-config ()
  ;; ...
  ;; Org-fc
  (use-package hydra)
  (require 'org-fc-hydra)
  (setq org-fc-directories '("~/org/"))
  ;; ...
  )

Correct install script:

dotspacemacs-additional-packages
'((org-fc
   :location (recipe :fetcher git
                     :url "https://git.sr.ht/~l3kn/org-fc"
                     :files (:defaults "awk" "demo.org"))))
;; ...
(defun dotspacemacs/user-config ()
  ;; ...
  ;; Org-fc
  (use-package hydra)
  (require 'org-fc-hydra)
  (setq org-fc-directories '("~/org/"))
  ;; ...
  )

Keybinding to repeat audio

I'm currently transitioning from Anki to org-fc, since I spend most of my life in Emacs already. I rely a lot of comprehension cards when I first start learning a language. The front side is an audio sample that I have to listen to and translate.

In Anki I can invoke 'R' to repeat the audio. I've looked through the org-fc documentation but not found if there is such a keybinding. Have I missed something? If there isn't, I think I could probably figure out how to add it? Would such a feature be considered?

org-fc-demo errors out

On a clean install, M-x org-fc-demo gives:

Debugger entered--Lisp error: (cl-assertion-failed ((not (null elements)) nil))
  cl--assertion-failed((not (null elements)))
  org-fc-tsv--parse-row((:id (:type . symbol) (:suspended . bool) :position (:ease . number) (:box . box) (:interval . interval) (:due . date)) nil)
  org-fc-tsv--parse-row((:path :id (:type . symbol) (:suspended . bool) :position (:ease . number) (:box . box) (:interval . interval) (:due . date)) ("gawk: fatal: can't open source file `/home/jethro/..."))
  #f(compiled-function (row) #<bytecode -0xc923844e2c7be71>)("gawk: fatal: can't open source file `/home/jethro/.config/emacs/straight/build/org-fc/awk/filter_due...")
  mapcar(#f(compiled-function (row) #<bytecode -0xc923844e2c7be71>) ("gawk: fatal: can't open source file `/home/jethro/..." "find: ‘/home/jethro/.config/emacs/straight/build/o..." "gawk: fatal: can't open source file `/home/jethro/..."))
  org-fc-tsv-parse((:path :id (:type . symbol) (:suspended . bool) :position (:ease . number) (:box . box) (:interval . interval) (:due . date)) "gawk: fatal: can't open source file `/home/jethro/...")
  org-fc-awk-due-positions-for-paths(("/home/jethro/.config/emacs/straight/build/org-fc/d..."))
  (org-fc-shuffle (org-fc-awk-due-positions-for-paths paths))
  (if (eq org-fc-indexer 'awk) (org-fc-shuffle (org-fc-awk-due-positions-for-paths paths)) (error 'org-fc-indexer-error (format "Indexer %s not implemented yet" org-fc-indexer-error)))
  org-fc-due-positions-for-paths(("/home/jethro/.config/emacs/straight/build/org-fc/demo.org"))
  (cond ((memql context ''all) (org-fc-due-positions-for-paths org-fc-directories)) ((memql context ''buffer) (org-fc-due-positions-for-paths (list (buffer-file-name)))) (t (error "Unknown review context %s" context)))
  org-fc-due-positions(buffer)
  (let ((cards (org-fc-due-positions context))) (if (null cards) (message "No cards due right now") (progn (setq org-fc-review--current-session (org-fc-make-review-session cards)) (org-fc-review-next-card))))
  (if org-fc-review--current-session (message "Flashcards are already being reviewed") (let ((cards (org-fc-due-positions context))) (if (null cards) (message "No cards due right now") (progn (setq org-fc-review--current-session (org-fc-make-review-session cards)) (org-fc-review-next-card)))))
  org-fc-review--context(buffer)
  org-fc-review-buffer()
  (save-current-buffer (set-buffer (find-file path)) (set (make-local-variable 'org-fc-demo-mode) t) (org-fc-review-buffer))
  (let ((path (expand-file-name "demo.org" org-fc-source-path))) (save-current-buffer (set-buffer (find-file path)) (set (make-local-variable 'org-fc-demo-mode) t) (org-fc-review-buffer)))
  org-fc-demo()
  funcall-interactively(org-fc-demo)
  call-interactively(org-fc-demo record nil)
  command-execute(org-fc-demo record)
  counsel-M-x-action("org-fc-demo")
  ivy-call()
  ivy-read("M-x " [## localp diary-included-files epg-context-signers org-babel-js-eoe tex-chktex-program nxml-fontify-matcher ⇓\ \\Downarrow d2-year edebug-trace tramp-adb-parse-device-names vterm-yank bbdb-current-record min-ind magit-wip-buffer-backed-up LaTeX-item-tabular* tramp-gvfs-handle-copy-file clearfunsym none-but-delete xsdre-parse-char-class flycheck-error-list-mode-line-map sgml-syntax-propertize CANONICAL local-only contained minions-mode-off-hook sketch-filename edebug-clear-frequency-count ps-footer-offset content-type calc-arccosh RESTRICTION xsdre-to-symbolic er/mark-python-block-and-decorator \" line-num Edebug\ All\ Defs time-format eshell-output-filter force-log nnoo-import-1 sessionp for\ environment org-notmuch-follow-link request-list sgml-tag-name--cmacro calc-embedded-mode-hook desktop-buffer-name ident Inline\ Code ...] :predicate #f(compiled-function (sym) #<bytecode 0xdd2fd15f45f440c>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

Font size during review

It would be nice to be able to have a larger font size only during review sessions. I used played around with org-drill some time back and had keybindings set up to increase font scaling(?) during review. However, it would be nice if this could be automated so that it increases during review and goes back to normal after.

Review due dates going incredibly high

After some reviews, the due date becomes incredibly big:

| position | ease | box |   interval | due                    |
|----------+------+-----+------------+------------------------|
| front    | 4.30 |  14 | 6718827.96 | +20415-09-09T16:41:56Z |

and this breaks timestamp parsing:

Debugger entered--Lisp error: (wrong-type-argument fixnump nil)
  encode-time((nil nil nil nil nil nil nil -1 nil))
  parse-iso8601-time-string("+20415-09-09T16:41:56Z")
  org-fc-tsv--parse-element((:due . date) "+20415-09-09T16:41:56Z")
  org-fc-tsv--parse-row(((:due . date)) ("+20415-09-09T16:41:56Z"))
  org-fc-tsv--parse-row(((:interval . interval) (:due . date)) ("6718827.96" "+20415-09-09T16:41:56Z"))
  org-fc-tsv--parse-row(((:box . box) (:interval . interval) (:due . date)) ("14" "6718827.96" "+20415-09-09T16:41:56Z"))\

Hardcoded box size

org-fc/org-fc.el

Line 1467 in e9f9679

((and (eq box 0) (eq rating 'easy)) 2)

I may be wrong, but this specific line seems to assume that the length of the box will always be 3 elements.

Call for Stats

Going through my review history (~140k reviews) I've discovered that the recall rate is significantly worse
if the last rating was "hard".

I'm currently testing a new version of the algorithm (which can be enabled with (setq org-fc-algorithm 'sm-v2))
but after 17k reviews with it, I still don't have enough data points to tell if it is better than the previous version.

If anyone is interested in helping with this, please leave a comment on this issue.

I'd need the review history file and a list of all card / positions.
If enough users are interested in helping with this,
I'll write a script that packages this data in a single file,
removing / replacing the filenames as these could be considered sensitive information.

org-fc hydra taking over keymap

Sometimes when I exist a flashcard review session abnormally, the org-fc-hydra keymap is still active, and I can't disable it. That makes crucial keys like <RET> unavailable. Have you faced this before, and how do you get around it?

Error when trying to review

This is my first time trying org-fc.
I am using Emacs 28.0.5 and org mode version 9.3.6.

This is how I install it.

(use-package org-fc
  :straight (org-fc :type git :host github :repo "l3kn/org-fc")
  :custom
  (org-fc-directories '("~/org/drills"))
  :config
  (require 'org-fc-hydra))

When running org-fc-review-all, it outputs this message in the
echo area Invalid Function assert.

When running org-fc-dashboard, it outputs this message in the
echo area Wrong type argument: stringp, nil.

This commands work fine:

org-fc-type-normal-init
org-fc-type-text-input-init
org-fc-type-double-init
org-fc-type-cloze-init

[Feature] Introducing new cards during review

I'm using a lot of flashcards that were generated from dictionary entries.
It would be nice to show these in full (flipped) the first time they are reviewed.

Cards that were introduced in this way could then be appended to the review session,
to be reviewed normally.

This could used to turn the demo file into an interactive introduction into org-fc.

Incorrect source path when installing with straight.

straight.el symlinks the source files before loading them.
It seems like this breaks the org-fc-source-path in some cases,
making it point to ~/.emacs.d/straight/build/org-fc/ instead of ~/.emacs.d/straight/repos/org-fc/ where the awk/ folder is.

Quick fix: (setq org-fc-source-path "~/.emacs.d/straight/repos/org-fc/") after loading org-fc.

Hide org-ellipsis in flip,rate mode

In flip mode all other org headings in the tree are collapsed, which creates "..." on the each line, sometime it even leads to a line break if "..." is too close to an edge. I think it visually clutters the interface and is not necessary.
I did something like that:
(add-hook 'org-fc-review-flip-mode-hook (lambda () (setq org-ellipsis " ") (org-mode-restart)))
Which works, but it's ugly and not really a proper solution because I don't have org-fc-review-flip-exit-mode-hook to restore the settings.

[Feature] modifying cards while in review session

Modifying a card during a review session is pivotal to updating cards fluidly as needed. Now that org-fc uses modes instead of hydras, this is a realizable goal. org fc implements the review session with two modes. evil's mapping in these two modes is not conducive to easily modifying text. There are two approaches, one is to change the default org fc command keymaps to keymaps that don't conflict with inputting text in evil mode or creating a function that disables org-fc mode until edits are complete.

The former would be clunky to use unless mapped onto a modifier key in which case it is a search for keybindings that are not needed for typing in text.

The later can be implemented and attached to a key shortcut accessible on all modes because it need to both be disabled and enabled and enabling needs that the key shortcut is accessible outside of the mode. This can be simplified by including a general org-fc mode that is always on during an org-fc-review session and map the key shortcut to that. This will have two shortcuts, one for each mode, that org-fc uses but it is possible to reduce to on shortcut and increase user experience by added logic. The logic is as follows. check if there is a mode that is currently enabled, if there is toggle that off and if not toggle the last toggled mode. This guarantees only that the most relevant org-fc internal mode is toggled.

Proof of concept

(defcustom last-org-fc-minor-mode nil
  "Last org fc minor mode that was enabled. Used to figure out logic."
  :group 'org-fc
  :type 'string)

(defvar org-fc-review-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map (kbd "C-c f") 'org-fc-review-toggle-to-edit)
    map)
  "Keymap for `org-fc-review-mode'.")

(define-minor-mode org-fc-review-mode
  
  :init-value nil
  :lighter " fc-rev"
  :keymap org-fc-review-mode-map
  :group 'org-fc
  (unless (and (eq major-mode 'org-mode) org-fc-review--current-session)
      (org-fc-review-mode -1)))


(defun org-fc-review-toggle-to-edit ()
  "Function for `org-fc-review-mode' that toggles minor modes."
    (interactive )
    (when org-fc-review-mode
    (if org-fc-review-flip-mode
      (progn 
       (org-fc-review-flip-mode -1)
       (message "[C-c f] Resume")
       (setq last-org-fc-minor-mode "flip")
       )
    (if org-fc-review-rate-mode
        (progn
         (org-fc-review-rate-mode -1)
         (message "[C-c f] Resume")
         (setq last-org-fc-minor-mode "rate")
         )
    (if (and (eq major-mode 'org-mode) org-fc-review--current-session)
     (pcase  last-org-fc-minor-mode
       ("flip" (org-fc-review-flip-mode 1))
       ("rate" (org-fc-review-rate-mode 1))
     ))
     ))))

Add information about how to exit the fc-edit mode

On this page we have a convenient table with most used shortcuts, https://www.leonrische.me/fc/review.html
one of them is (p) - pause for edit, but there are no information of how to exit it after edit is done. I found in the source that the correct way is C-c C-c to resume the review or C-c C-k to quit. I think it should be added somewhere on the linked page since not having this information would make new users frustrated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.