diff options
| -rw-r--r-- | robot/basic-run.el | 4 | ||||
| -rwxr-xr-x | robot/basic-run.sh | 1 | ||||
| -rw-r--r-- | robot/robot.el | 11 | ||||
| -rw-r--r-- | robot/robot.sh | 5 |
4 files changed, 15 insertions, 6 deletions
diff --git a/robot/basic-run.el b/robot/basic-run.el index 8e853e3..2059d7b 100644 --- a/robot/basic-run.el +++ b/robot/basic-run.el @@ -2,8 +2,8 @@ (load-file "org-drill.el") (defun org-drill-do-drill () - (copy-file "robot/main-test.org" "robot/main-test-copy.org" t) - (find-file "robot/main-test-copy.org") + (copy "main-test.org" "main-test-copy.org") + (find "main-test-copy.org") (org-drill) (set-buffer-modified-p nil) diff --git a/robot/basic-run.sh b/robot/basic-run.sh index d92172d..336063f 100755 --- a/robot/basic-run.sh +++ b/robot/basic-run.sh @@ -43,4 +43,3 @@ launch_emacs $this_dir/basic-run.el wait_emacs } || cat robot/failure.txt - $EMACS -Q -l $1 & diff --git a/robot/robot.el b/robot/robot.el index 43f31da..a9813d9 100644 --- a/robot/robot.el +++ b/robot/robot.el @@ -9,8 +9,17 @@ (setq debug-on-error t) (setq debug-on-quit t) +(defun robot-file (file) + (concat top-dir "robot/" file)) + (defun clean (file) - (delete-file (concat top-dir "robot/" file))) + (delete-file (robot-file file))) + +(defun copy (from to) + (copy-file (robot-file from) (robot-file to) t)) + +(defun find (file) + (find-file (robot-file file))) ;; Clean up (clean "failure.txt") diff --git a/robot/robot.sh b/robot/robot.sh index 022b567..e0c3e6a 100644 --- a/robot/robot.sh +++ b/robot/robot.sh @@ -28,8 +28,9 @@ function send_answer { } function launch_emacs { - echo Launching $EMACS -Q -l $1 & - $EMACS -Q -l $1 & + echo Launching $EMACS -Q -l $* & + + $EMACS -Q -l $* & emacs_process_pid=$! } |
