From 6c14bd6c5079bfb384134f4275a5f289f92e4ab5 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Sat, 15 Jun 2019 12:29:52 +0100 Subject: Update robot, Fix remaining CL dependencies The robot test now includes "with-typing" input. This uncovered some more usages of cl.el which are now gone. --- robot/org-drill-launch.el | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) (limited to 'robot/org-drill-launch.el') diff --git a/robot/org-drill-launch.el b/robot/org-drill-launch.el index 85f23ff..2de9219 100644 --- a/robot/org-drill-launch.el +++ b/robot/org-drill-launch.el @@ -6,26 +6,53 @@ ;; Clean up (delete-file (concat top-dir "robot/failure.txt")) +(delete-file (concat top-dir "robot/messages.txt")) (set-frame-name "emacs-bot") (setq debug-on-error t) (setq debug-on-quit t) +(defun dump-buffer (buffer file) + (save-excursion + (when (get-buffer buffer) + (set-buffer buffer) + (write-region (point-min) (point-max) + (concat top-dir "robot/" file) + nil 'dont-display-wrote-file-message + )))) + (add-hook 'debugger-mode-hook 'org-drill-launcher-dump-in-a-bit) + (defun org-drill-launcher-dump-in-a-bit () (run-with-timer 1 nil #'org-drill-launcher-dump)) +(defun org-drill-dump-messages () + (dump-buffer "*Messages*" "messages.txt")) + +(run-with-timer 1 1 #'org-drill-dump-messages) + + (defun org-drill-launcher-dump () - (save-excursion - (set-buffer "*Backtrace*") - (write-region (point-min) (point-max) (concat top-dir "robot/failure.txt"))) - (kill-emacs)) + (dump-buffer "*Backtrace*" "failure.txt") + (dump-buffer "*Messages*" "messages.txt") + (kill-emacs -1)) (load-file "org-drill.el") -(copy-file "robot/main-test.org" "robot/main-test-copy.org" t) -(find-file "robot/main-test-copy.org") +(defun org-drill-do-drill () + (copy-file "robot/main-test.org" "robot/main-test-copy.org" t) + (find-file "robot/main-test-copy.org") + + (org-drill) + (set-buffer-modified-p nil) + (kill-buffer)) + +(org-drill-do-drill) + +(message "First drill complete") + +(setq org-drill-presentation-prompt-with-typing t) -(org-drill) +(org-drill-do-drill) -- cgit v1.2.3