summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-06-28 15:28:45 +0200
committerLeon Rische <leon.rische@me.com>2020-06-28 15:28:45 +0200
commit3717c17b54a3e9c0d3f537ff4c3d2c1f5411743f (patch)
tree9911cb5c2b96fa4f58b6377db8a74b388fce816b
parent5b8174f93659e5c9699b658fe66065839e8d9b23 (diff)
Add before-review-hook
-rw-r--r--Changelog.org3
-rw-r--r--org-fc.el6
2 files changed, 9 insertions, 0 deletions
diff --git a/Changelog.org b/Changelog.org
index 1e40243..08b1a4d 100644
--- a/Changelog.org
+++ b/Changelog.org
@@ -5,6 +5,9 @@ upcoming changes.
In case a update to the org sources is needed, I'll add a changelog
entry with updating instructions.
+** [2020-06-28 Sun]
+*** Added
+- ~org-fc-before-review-hook~ that runs when a review session is started
** [2020-06-26 Fri]
*** Changed
- Messages are not inhibited during review
diff --git a/org-fc.el b/org-fc.el
index 5f1b19d..e995a28 100644
--- a/org-fc.el
+++ b/org-fc.el
@@ -198,6 +198,11 @@ Values are in days."
:type 'hook
:group 'org-fc)
+(defcustom org-fc-before-review-hook '()
+ "Functions run when a review session is started."
+ :type 'hook
+ :group 'org-fc)
+
(defcustom org-fc-after-review-hook '()
"Functions run when a review session ends / is quit."
:type 'hook
@@ -1741,6 +1746,7 @@ Valid contexts:
(progn
(setq org-fc-review--current-session
(org-fc-make-review-session cards))
+ (run-hooks 'org-fc-before-review-hook)
(org-fc-review-next-card))))))
;;;###autoload