aboutsummaryrefslogtreecommitdiff
path: root/robot/org-drill-launch.el
blob: bab57ecfba41c9b81c6810ff7025012e5a11e191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;; Shutup
(setq make-backup-files nil)
(setq auto-save-default nil)

;; Clean up
(delete-file "./robot/failure.txt")

(set-frame-name "emacs-bot")

(condition-case e
    (progn (load-file "org-learn.el")
           (load-file "org-drill.el"))
  (error
   (with-temp-buffer
     (insert (format "%s" (error-message-string e)))
     (write-region (point-min) (point-max) "./robot/failure.txt"))
   (let ((kill-emacs-hook nil))
     (kill-emacs))))

(copy-file "robot/main-test.org" "robot/main-test-copy.org" t)
(find-file "robot/main-test-copy.org")

(condition-case e
    (org-drill)
  (error
   (with-temp-buffer
     (insert (format "%s" (error-message-string e)))
     ;; write to ./ now because we have changed directory
     (write-region (point-min) (point-max) "./failure.txt"))
   (let ((kill-emacs-hook nil))
     (kill-emacs))))