diff options
author | Leon Rische <leon.rische@me.com> | 2020-01-11 15:24:56 +0100 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-01-11 15:24:56 +0100 |
commit | 1c7838eb972ac365e648fc231620cb5f18a07788 (patch) | |
tree | d0a339cec50b9ecb468f2c7d380e3d3c37e85927 /org-fc-type-normal.el |
Initial commit
Diffstat (limited to 'org-fc-type-normal.el')
-rw-r--r-- | org-fc-type-normal.el | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/org-fc-type-normal.el b/org-fc-type-normal.el new file mode 100644 index 0000000..dd12bf9 --- /dev/null +++ b/org-fc-type-normal.el @@ -0,0 +1,34 @@ +(defun org-fc-type-normal-init () + (interactive) + (org-fc--init-card "normal") + (org-fc-review-data-update '("front"))) + +(defvar org-fc-type-normal--hidden '()) + +(defun org-fc-type-normal-setup (_position) + (interactive) + (if (org-fc-has-back-heading-p) + (progn + (org-show-subtree) + (setq org-fc-type-normal--hidden (org-fc-hide-subheading "Back")))) + (org-fc-review-flip-hydra/body)) + +(defun org-fc-type-normal-flip () + (interactive) + (save-excursion + (org-show-subtree) + (dolist (pos org-fc-type-normal--hidden) + (goto-char pos) + (org-show-subtree))) + (org-fc-review-rate-hydra/body)) + +;; No-op +(defun org-fc-type-normal-update ()) + +(org-fc-register-type + 'normal + 'org-fc-type-normal-setup + 'org-fc-type-normal-flip + 'org-fc-type-normal-update) + +(provide 'org-fc-type-normal) |