Org Spaced Repetition System
Org-srs is a feature-rich and extensible spaced repetition system integrated within Org-mode, allowing you to learn and review knowledge without leaving your Org workflow.
- Everything in Org
All data in Org-srs, including review histories and customizable options, are stored as plain text in your Org files. This makes version control easy, and by simply syncing your Org files, you can review seamlessly across different devices (especially the native Emacs on Android). - Powerful
Org-srs integrates the modern FSRS algorithm out of the box to help you review more efficiently and effectively. You can also optimize the parameters based on the content and your review habits. Org-srs also includes various advanced scheduling features such as fuzzing, stepped learning, and auto-burying, all with customizable parameters. - Performant
Org-srs supports enabling caching for a review session to significantly improve its performance in a large review collection with 10K+ items, at the cost of some flexibility (such as creating items on the fly). - Flexible
In Org-srs, the smallest review unit is an “item” (similar to a card in Anki). A content piece reviewed through one or more items is called an “entry” (similar to a note in Anki). An item can be a flashcard with a front (question) and back (answer), a cloze deletion, etc. This means an entry can hold different types of items to meet various review needs. For example, you can review the same content using both flashcards and cloze deletions simultaneously if needed. Moreover, various customizable options provided by Org-srs can be finely controlled, allowing you to set different values for the same customizable option at the global, directory, file, entry, or item level to suit your review preferences. - Embeddable
If you’re reviewing your own notes, maintaining additional entries for review can be tedious. If you modify your notes or add, delete, or modify cloze deletions, manually updating the created review entries can be a nightmare. Org-srs supports non-invasive embedding of review entries into your notes. This means that whenever you change the content of your notes, you can update the exported entry with one command, without polluting the export of your Org files. - Extensible
Org-srs is designed with high modularity. By virtue of generic functions and hooks, algorithms, scheduling features, item types, and review strategies can be extended externally as you need. - Statistics Visualization
Org-srs allows you to view review history (e.g., number of reviews per day, retention rate) and the number of items scheduled for review on future dates through charts. - Touchscreen/Mouse Support
Org-srs supports displaying GUI buttons via child frames to enable complete review via mouse or touchscreen, perfectly adapting to native Emacs on Android, allowing you to review out of your phone on the go.
Org-srs is now available on MELPA. Below is an example configuration
with use-package:
(use-package org-srs
:ensure t
:defer t
:hook (org-mode . org-srs-embed-overlay-mode)
:bind (:map org-mode-map
("<f5>" . org-srs-review-rate-easy)
("<f6>" . org-srs-review-rate-good)
("<f7>" . org-srs-review-rate-hard)
("<f8>" . org-srs-review-rate-again)))
(use-package org-srs
:when (eq system-type 'android)
:ensure t
:defer t
:custom
(org-srs-item-confirm #'org-srs-item-confirm-command)
:config
(org-srs-mouse-mode +1))
Here are some demonstrations and descriptions for the main features of
Org-srs. You can also open file org-srs-example.org in Emacs and
execute command org-srs-review-start to start an example review
session right out of the box.
A basic form of review that you can see in most spaced repetition
software. It consists of a card’s front (question) and back (answer).
You can easily create a flashcard by using org-srs-item-create in an
entry and selecting card. There are multiple supported formats for the
front and back of a flashcard:
- File-level flashcards
# Card 1 #+TITLE: The card front The card back#+TITLE: Card 2 The card front * Back The card back#+TITLE: Card 3 * Front The card front * Back The card back - Heading-level flashcards
# Card 1 * The card front The card back* Card 2 The card front ** Back The card back* Card 3 ** Front The card front ** Back The card back
This feature allows you to cloze any content you want to review (such as a word, a list item, or a table field) and hide it during the review process. There are two ways to create a cloze item:
- Select the content you want to cloze, execute the
org-srs-item-createcommand, and then selectcloze. - Use
org-srs-item-cloze-dwimfor context-sensitive cloze creation (note that you can useorg-srs-item-uncloze-dwimto undo the cloze). Afterward, you need to manually executeorg-srs-item-cloze-updateto create the corresponding items for all cloze deletions at once.
By default, each cloze deletion’s ID is the first 7 characters of the
SHA-1 hash of its content. This means you can freely insert, delete,
swap, or modify them. However, it is recommended to execute
org-srs-item-cloze-update after each modification to ensure that the
changes of clozes are always tracked by Org-srs.
The syntax for a cloze deletion is as follows:
{{<cloze-id>}{<content>}{<hint>}}
A good part of Org-srs is the ability to export content from within
your notes that you want to review. After modifying your notes, you
can directly update the corresponding entry in your notes. The main
command for this feature is the context-sensitive org-srs-embed-dwim,
whose logic is as follows:
- If point is on an element without a corresponding exported entry,
that element will be exported as the content of the entry. If the
exported element contains clozes, corresponding items will
automatically be created; otherwise, the content will be exported
as the back of a flashcard. You will need to fill in the entry’s
title in the pop-up buffer. The default export path is the current
Org file’s relative path to
org-directoryunder theorg-srsdirectory inorg-directory. For example, if yourorg-directoryis~/organd the current file is~/org/foo/bar.org, the file where the entry is exported will be~/org/org-srs/foo/bar.org. - If point is on an element that already has a corresponding exported entry, the exported entry will be updated with the current element’s content.
- If point is on a marker (shown as
#+SRSwhenorg-srs-embed-overlay-modeis on) representing an embedded Org-srs entry, it will jump to the corresponding exported entry.
Additionally, if you need to cloze or uncloze the content to be
exported, you can use org-srs-embed-cloze-dwim and
org-srs-embed-uncloze-dwim.
See the org-srs customization group, where all the customizable
variables are documented.
;; .dir-locals.el
((org-mode . ((org-srs-algorithm . fsrs)
(org-srs-item-confirm . org-srs-item-confirm-command))))
:PROPERTIES:
:SRS_ALGORITHM: fsrs
:SRS_ITEM_CONFIRM: org-srs-item-confirm-command
:END:
#+TITLE: Title
# or:
# Local Variables:
# org-srs-algorithm: fsrs
# org-srs-item-confirm: org-srs-item-confirm-command
# End:
* Entry
:PROPERTIES:
:SRS_ALGORITHM: fsrs
:SRS_ITEM_CONFIRM: org-srs-item-confirm-command
:END:
:SRSITEMS:
#+NAME: srsitem:569a2e48-633d-4b8c-82b5-f3df9b29bb69::cloze::d0ee345
#+ATTR_SRS: :algorithm fsrs :item-confirm org-srs-item-confirm-command
| ! | timestamp | rating | stability | difficulty | state |
|---+----------------------+--------+-----------+------------+-------|
| | 2024-12-07T13:54:06Z | | 0.0 | 0.0 | :new |
| * | 2024-12-07T13:54:34Z | | | | |
:END: