summaryrefslogtreecommitdiff
path: root/docs/review_contexts.org
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2022-09-27 20:23:37 +0200
committerLeon Rische <leon.rische@me.com>2022-09-27 20:23:37 +0200
commit684cf7435f446fd8b90fe0bffae74726b3a75f7d (patch)
tree771bc1b98351e373230d3dbf7d3aaeb261a0e5b1 /docs/review_contexts.org
parent78258557eeb4405416e911324330bbff113a81d0 (diff)
Add documentation files
Diffstat (limited to 'docs/review_contexts.org')
-rw-r--r--docs/review_contexts.org65
1 files changed, 65 insertions, 0 deletions
diff --git a/docs/review_contexts.org b/docs/review_contexts.org
new file mode 100644
index 0000000..9b737fb
--- /dev/null
+++ b/docs/review_contexts.org
@@ -0,0 +1,65 @@
+#+TITLE: Review Contexts
+#+DATE: [2020-08-01 Sat 10:41]
+#+KEYWORDS: fc
+
+By default, two contexts are defined:
+
+- all :: all cards in ~org-fc-directories~
+- buffer :: all cards in the current buffer
+
+New contexts can be defined by adding them to the alist
+~org-fc-custom-contexts~.
+
+Contexts have the form ~(:paths paths :filter filter)~.
+
+- ~:paths~ (optional)
+ either a list of paths, a single path
+ or ~'buffer~ for the current buffer.
+ Paths don't have to be included in the ~org-fc-directories~.
+ Defaults to ~org-fc-directories~.
+- ~:filter~ (optional), a card filter defaulting to a filter that
+ matches all cards.
+
+Filters can be combinations of the following expressions:
+
+- ~(and ex1 ex2 ...)~
+- ~(or ex1 ex2 ...)~
+- ~(not ex)~
+- ~(tag "tag")~
+- ~(type card-type) or (type "card-type")~
+
+* Examples
+All double cards with tag "math":
+#+begin_src emacs-lisp
+ (add-to-list 'org-fc-custom-contexts
+ '(double-math-cards . (:filter (and (type double) (tag "math")))))
+#+end_src
+
+All cards in that don't have one of the tags "foo" and "bar":
+#+begin_src emacs-lisp
+ (add-to-list 'org-fc-custom-contexts
+ '(no-foo-bar-cards . (:filter (not (or (tag "foo") (tag "bar"))))))
+#+end_src
+
+All cards in =~/combinatorics/= or =~/number_theory.org=:
+#+begin_src emacs-lisp
+ (add-to-list 'org-fc-custom-contexts
+ '(math-cards . (:paths ("~/combinatorics/" "~/number_theory.org"))))
+#+end_src
+
+All cards in =~/combinatorics/= with tag "theorem":
+#+begin_src emacs-lisp
+ (add-to-list 'org-fc-custom-contexts
+ '(combinatorics-theorems .
+ (:paths "~/combinatorics/" :filter (tag "theorem"))))
+#+end_src
+
+All double cards in the current buffer:
+#+begin_src emacs-lisp
+ (add-to-list 'org-fc-custom-contexts
+ '(current-double .
+ (:paths buffer :filter (type double))))
+#+end_src
+* Note
+Because parsing of tags is done in AWK, tag filters don't work for
+tags defined in the =#+FILETAGS:= of a =#+SETUP_FILE:=.