diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-25 14:37:40 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-25 14:37:40 -0500 |
| commit | a5555afaf09be4c023f49661d48de803b2586927 (patch) | |
| tree | 78625656fea7df312ed9a4467e2e899433e16998 /modules/org-drill-config.el | |
| parent | 80de20b443c7a3cbc9283bb64380539d80c61cf8 (diff) | |
re-organized org modules using use-package + maintenance work
- updated packages
- removed :after org-contrib references
- added ob-awk, sed, scheme, and shell backends
- make v play with mpv in elfeed search mode map
- added abbrevs
Diffstat (limited to 'modules/org-drill-config.el')
| -rw-r--r-- | modules/org-drill-config.el | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/modules/org-drill-config.el b/modules/org-drill-config.el index be0256d3..1a42cdfa 100644 --- a/modules/org-drill-config.el +++ b/modules/org-drill-config.el @@ -10,16 +10,17 @@ ;; create a new bookmark and add "Drill Entry" to the name field and the above ;; snippet to the URL field. -;; ----------------------------------- Tasks ----------------------------------- - ;;; Code: +;; --------------------------------- Org Drill --------------------------------- + (use-package org-drill :after org :preface ;; create an org-drill-map so you can use C-d as prefix (define-prefix-command 'org-drill-map) (global-set-key (kbd "C-d") 'org-drill-map) + :bind (:map org-drill-map ("s" . cj/drill-start) @@ -37,32 +38,33 @@ (setq org-drill-add-random-noise-to-intervals-p t) ;; slightly vary number of days to repetition (defun cj/drill-start () - "Prompt user to pick a drill org file, then starts an org-drill session." - (interactive) - (let ((choices (directory-files drill-dir nil "^[^.].*\\.org$"))) - (setq chosen-drill-file (completing-read "Choose Flashcard File:" choices)) - (find-file (concat drill-dir chosen-drill-file)) - (require 'org-drill) - (org-drill))) + "Prompt user to pick a drill org file, then start an org-drill session." + (interactive) + (let* ((choices (directory-files drill-dir nil "^[^.].*\\.org$")) + (chosen-drill-file (completing-read "Choose Flashcard File:" choices))) + (find-file (concat drill-dir chosen-drill-file)) + (require 'cl) ;; for the first function + (org-drill))) (defun cj/drill-edit () - "Prompts the user to pick a drill org file, then opens it for editing." - (interactive) - (let* ((choices drill-dir) - (chosen-drill-file (completing-read "Choose Flashcards to Edit:" choices))) - (find-file chosen-drill-file))) + "Prompts the user to pick a drill org file, then opens it for editing." + (interactive) + (let* ((choices drill-dir) + (chosen-drill-file (completing-read "Choose Flashcards to Edit:" choices))) + (find-file chosen-drill-file))) (defun cj/drill-capture () - "Quickly capture a drill question." - (interactive) - (org-capture nil "d")) + "Quickly capture a drill question." + (interactive) + (org-capture nil "d")) (defun cj/drill-refile () - "Refile to a drill file." - (interactive) - (setq org-refile-targets '((nil :maxlevel . 1) - (drill-dir :maxlevel . 1))) - (call-interactively 'org-refile)) + "Refile to a drill file." + (interactive) + (setq org-refile-targets '((nil :maxlevel . 1) + (drill-dir :maxlevel . 1))) + (call-interactively 'org-refile)) + ;; add useful org drill capture templates (require 'custom-functions) |
