I hope the current card / log format is flexible enough to accommodate upcoming changes.
In case a update to the org sources is needed, I’ll add a changelog entry with updating instructions.
When using grep
to find files that contain flashcards, org-fc now
also finds files where the property drawer or single properties are
indented (preceded by spaces or tabs).
- The overview of SM2 parameters in the dashboard works again.
- The
org-fc-cache
is now initialized from theorg-fc-directories
rather than computing a list of changed files that potentially exceeds the number of arguments we can pass to the AWK indexer.
Org-fc only searches for files containing flashcards, improving the
indexing performance if the org-fc-directories
contain many files
without flashcards.
Both the AWK and cache indexers filter out files without any flashcards from their results.
This version of org-fc adds support for multiple spacing algorithms (as long as they provide a due date to schedule cards by) with a minimal amount of user-facing changes.
New cards are now initialized with a new FC-ALGO
property,
defaulting to sm2
.
When creating new cards and if there is more than one algorithm
besides the internal noop
algorithm, the user is prompted for the
spacing algorithm to use.
Inside Emacs, M-x org-fc-help
opens a buffer with the org-fc
documentation.
A new noop
spacing algorithm has been implemented. It is used in the
org-fc-demo
so the demo cards stay due and their histories are not
logged. This algorithm is intended only for internal use but its
implementation can serve a simple point for users intending to
implement new spacing algorithms.
Review-context filters now work correctly with the AWK indexer.
The functions for computing review statistics have been moved to the algorithm implementation and a new function has been added that allows reading the review history of a card or position.
Added missing import for eieio-base
.
org-fc-audio
now allows attaching audio files to single positions of a card. Please refer to docs/extensions.org for more information.- A new command
org-fc-audio-stop
can be used to stop audio playback. - Flashcards can now use a new optional
FC_ALGO
property. When unset, this defaults to the original SM2 algorithm. Currently now alternative algorithms have been implemented but this will make it easier to support those in the future.
org-fc-audio
playback now stops when flipping the card, reviewing a new card or quitting the review.
- The initial SM2 parameters are now formatted the same way as the parameters written after a review. This does not affect the behavior of org-fc but is more consistent.
- The review history file is written to after each review, not once at the end of the review session. Again this should make no difference for users of org-fc while making it easier to implement alternative spacing algorithms
- Tests use a custom set of macros for mocking function calls to avoid
a dependency on
el-mock
Review-context definitions can now include an optional
:order
property. Currently two orders are supported:
'ordered
cards are reviewed file by file, in the order they appear within the file'shuffled
cards are reviewed in a randomized order
This corresponds to setting the existing org-fc-shuffle-positions
variable to nil
or t
respectively, the only change being that this
can now be customized for each review context.
Some operating systems differ in how they mark line endings, using
either \n
or \r\n
. Usually gawk
will use the correct ending for
the current OS but files moved from one OS to the other might not get
parsed correctly.
A new configuration variable org-fc-awk-mixed-line-endings
can now
be set to a non-nil value to change the row-separator used by AWK to
support both kinds of line endings.
The internal data structures representing files, cards and positions
of cards have now use eieio
classes.
The way org-fc reads and writes the contents of the :REVIEW_DATA:
drawer has been changed as a first step towards supporting alternative
spacing algorithms.
To reduce the chance that bugs are introduced by this and future changes of the code, end-to-end tests have been added to ensure different functions of org-fc correctly change the org-mode contents of flashcards.
Incorrect quoting in the field separator used for parsing
:REVIEW_DATA:
tables caused the inclusion of an extra field for each
“|” character between cells of the table. This did not affect the
normal use of org-fc.
- Custom titles for the back heading can be configured via the
org-fc-back-heading-titles
variable.See ./docs/card_types.org for instructions on how to add new titles.
The dashboard should now correctly handles local variables and should work as expected again.
The dashboard has been changed and split into collapsible sections, some of which are visible from the start while others can be opened on demand.
- The
org-fc-type-cloze-dwim
command that can be used to mark regions in a file as cloze holes (contributed by Github user c1-g)
- Results of the AWK indexer are parsed in a way that prevents an issue where some files would get ignored when indexing many files at once (contributed by Github user mithraen)
- The
find
command for searching org-mode files was improved to ignore directories with a name ending in.org
(contributed by Github user vedang) - When updating the review data drawer,
delete-region
is used instead ofkill-region
to avoid polluting the clipboard/kill-ring (contributed by sr.ht user bram85)
- A
org-fc-after-flip-hook
that is run after a card is flipped - Support for setting audio files to play after flipping a card via
org-fc-audio-set-after-flip
- Reverting the dashboard buffer didn’t work due to a missing function argument, this has been fixed
org-fc-audio-set-after
->org-fc-audio-set-after-setup
org-fc-audio-set-before
->org-fc-audio-set-before-setup
org-fc-audio-property-before
->org-fc-audio-before-setup-property
org-fc-audio-property-after
->org-fc-audio-after-setup-property
- The “G” key binding in
org-fc-dashboard-mode
has been removed in favor of the default “g”revert-buffer
binding
- Removed
(org-fc-filter-index index filter)
, replacing it with indexer specific functions(org-fc-awk-index paths &optional filter)
and(org-fc-cache-index paths &optional filter)
- Added a defcustom
org-fc-index-function
to support different indexers - Added a prototype caching indexer
The dashboard now includes a forecast of how many cards will be due during the next day, week (+7 days) or month (+30 days).
- All dashboard functions were extracted to a separate file
org-fc-stats
was renamed toorg-fc-dashboard-stats
org-fc--hashtable-to-alist
was renamed toorg-fc-dashboard--hashtable-to-alist
org-fc-context-dashboard
was renamed toorg-fc-dashboard-context
org-fc-review-dashboard-context
was renamed toorg-fc-dashboard-review
Org-fc now supports nested flashcards.
- It’s now possible to mark child headings of flashcards as a flashcards
- When flipping a card, child headings (except the “Back” heading) remain collapsed
- Subheadings are ignored when searching for holes of cloze cards
- Suspending a card during review now removes all other positions of it from the current session, to avoid reviewing suspended cards
The awk index now also includes the headline text of each card.
This will be useful for building a tabulated-list-mode
based card
overview.
org-fc-suspend-tree
for suspending all cards in a subtree
- unsuspending overdue cards doesn’t reset their review data anymore
org-fc-review-edit
(bound top
) pauses the review for editing the current card. A new modeorg-fc-review-edit-mode
adds keybindings for resuming & quitting the review.
- By default, failed cards are appended to the end of the review session.
This can be configured via
org-fc-append-failed-cards
org-fc-map-cards
takes an optionalscope
argument, similar toorg-map-entries
.
org-fc-unsuspend-tree
unsuspends all cards in the subtree at point
org-fc-review-rate-card
was renamed toorg-fc-review-rate
- The review history file is only written once per review, as a first step towards implementing a “undo-rating” command
- Shuffling of positions for the review can be disabled
by setting
org-fc-shuffle-positions
tonil
- Error messages from shell commands are promoted
org-fc-before-review-hook
that runs when a review session is started
- Messages are not inhibited during review
- Whitelisted drawers are expanded during review
- A
org-fc-after-review-hook
that runs when the review ends / is quit org-fc-keymap-hint
extensionorg-fc-audio
extension
SCHEDULED: ...
,DEADLINE: ...
timestamps are hidden during review- Drawers in
org-fc-drawer-whitelist
are not hidden during review
- During the review process, two minor modes are used instead of two hydras
- Include file information in card index
- Maintain order of positions in a card when shuffling
- Exit hydra when review is started
- Per-context dashboard
- Improve org-indent of cards
- Use special “fc-demo” tag for demo cards
- Move opening of flip/rating hydras to main review loop
The AWK scripts now generate S-expressions instead of CSV tables, this
way read
can be used to parse the data instead of relying on a set
of custom parsing functions.
This also allows passing more complex data structures from AWK to org-fc.
Implemented a new version of the spacing algorithm (SM2) that’s used by org-fc.
The only difference is in how the next interval for cards rated as “hard” is calculate.
The initial version ('sm2-v1
) would decrease the ease factor by
0.15, then calculate the next interval by multiplying the previous
interval with the new ease factor.
In the new version ('sm2-v2
), the interval is always multiplied by a
factor of 1.2, similar to the version of SM2 used by Anki.
org-fc-algorithm
can be used to set which version of the
algorithm should be used, defaulting to 'sm2-v1
.
Once I have evaluated the performance of the new algorithm,
the default version will change to 'sm2-v2
.
text-input
card type
- Add a “Z” suffix to all ISO8601 timestamps
- A function to estimate the number of reviews in the next n days
org-fc-due-positions-for-paths
now shuffles the lists of positions using an Emacs Lisp function instead of depending onshuf
- All awk-indexer functions now use
gawk
instead ofawk