diff options
| -rw-r--r-- | lisp/documents.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/documents.el b/lisp/documents.el index 55ff72e..4a43403 100644 --- a/lisp/documents.el +++ b/lisp/documents.el @@ -297,7 +297,20 @@ Visits LINK, or if LINK names a subdirectory of (path (-first #'(lambda (path) (s-ends-with-p ".org" path)) (directory-files drill-directory t)))) (find-file path) - (org-drill))))) + (org-drill)))) + + ;; Kill all org-drill files when the session is over. + ;; + ;; n.b. this depends on this PR. + ;; <https://gitlab.com/phillord/org-drill/-/merge_requests/17> + :hook + (org-drill-session-complete . + (lambda () + (dolist (buf (cl-remove-if-not + #'(lambda (buf) + (cl-search "Notes/Drill" (buffer-file-name buf))) + (buffer-list))) + (kill-buffer buf))))) ;; The org-download package is incredible for quickly pull images into Org ;; documents. |