[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill 6c14bd6c50 129/251: Update robot, Fix remaining
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill 6c14bd6c50 129/251: Update robot, Fix remaining CL dependencies |
Date: |
Mon, 17 Jan 2022 18:59:08 -0500 (EST) |
branch: elpa/org-drill
commit 6c14bd6c5079bfb384134f4275a5f289f92e4ab5
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
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.
---
.gitignore | 1 +
org-drill.el | 8 ++--
robot/org-drill-launch.el | 41 ++++++++++++++----
robot/robot-test.sh | 105 +++++++++++++++++++++++++++-------------------
4 files changed, 100 insertions(+), 55 deletions(-)
diff --git a/.gitignore b/.gitignore
index 82b11781ea..e6e697f27b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ org-drill.html
/robot/Makefile
/robot/main-test-copy.org
/robot/failure.txt
+/robot/messages.txt
diff --git a/org-drill.el b/org-drill.el
index 649736776b..e3ba4fb9c7 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -2638,7 +2638,7 @@ maximum number of items."
(*org-drill-again-entries*
(pop *org-drill-again-entries*))
(t ; nothing left -- return nil
- (return-from org-drill-pop-next-pending-entry nil)))))
+ (cl-return-from org-drill-pop-next-pending-entry nil)))))
m)))
@@ -2680,10 +2680,10 @@ RESUMING-P is true if we are resuming a suspended drill
session."
((null result)
(message "Quit")
(setq end-pos :quit)
- (return-from org-drill-entries nil))
+ (cl-return-from org-drill-entries nil))
((eql result 'edit)
(setq end-pos (point-marker))
- (return-from org-drill-entries nil))
+ (cl-return-from org-drill-entries nil))
((eql result 'skip)
(setq *org-drill-current-item* nil)
nil) ; skip this item
@@ -3265,7 +3265,7 @@ the tag 'imported'."
(condition-case nil
(org-find-olp path t)
(error ; path does not exist in DEST
- (return-from org-drill-copy-entry-to-other-buffer
+ (cl-return-from org-drill-copy-entry-to-other-buffer
(cond
((cdr path)
(org-drill-copy-entry-to-other-buffer
diff --git a/robot/org-drill-launch.el b/robot/org-drill-launch.el
index 85f23ff5db..2de92197bc 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)
diff --git a/robot/robot-test.sh b/robot/robot-test.sh
index 31a6f09a93..c27b94bb5c 100755
--- a/robot/robot-test.sh
+++ b/robot/robot-test.sh
@@ -1,49 +1,66 @@
-#!/bin/sh
+#!/bin/bash
set -e
+function run_drill {
+ ## Org-drill should be running at this point, so give three answers
+ ## with a score of file
+ sleep 1
+ echo answer one
+ #xdotool type --window $window_id answer
+ xdotool key --window $window_id Return
+ sleep 0.25
+ xdotool key --window $window_id 5
+ sleep 0.25
+
+
+ echo answer two
+ #xdotool type --window $window_id answer
+ xdotool key --window $window_id Return
+ sleep 0.25
+ xdotool key --window $window_id 5
+ sleep 0.25
+
+ echo answer three
+ #xdotool type --window $window_id answer
+ xdotool key --window $window_id Return
+ sleep 0.25
+ xdotool key --window $window_id 5
+ sleep 0.25
+
+ ## Press any key to continue
+ echo press any key to continue
+ xdotool key --window $window_id Return
+ sleep 0.25
+
+ echo Save file
+ xdotool key --window $window_id y
+}
+
+function kill_emacs {
+ echo Goodnight Emacs
+ xdotool key --window $window_id alt+x
+ xdotool type --window $window_id kill-emacs
+ xdotool key --window $window_id KP_Enter
+}
+
$EMACS -Q -l ./robot/org-drill-launch.el &
-sleep 1
-
-window_id=`xdotool search --name "emacs-bot"`
-if [ -z "$window_id" ]
-then
- echo "Could not find window ID for Emacs-bot"
- exit 1
-fi
-
-## Org-drill should be running at this point, so give three answers
-## with a score of file
-echo answer one
-xdotool key --window $window_id KP_Enter
-sleep 0.25
-xdotool key --window $window_id 5
-sleep 0.25
-
-
-echo answer two
-xdotool key --window $window_id KP_Enter
-sleep 0.25
-xdotool key --window $window_id 5
-sleep 0.25
-
-echo answer three
-xdotool key --window $window_id KP_Enter
-sleep 0.25
-xdotool key --window $window_id 5
-sleep 0.25
-
-# ## Press any key to continue
-echo press any key to continue
-xdotool key --window $window_id KP_Enter
-sleep 0.25
-
-echo Save file
-xdotool key --window $window_id y
-sleep 0.25
-
-echo Goodnight Emacs
-xdotool key --window $window_id alt+x
-xdotool type --window $window_id kill-emacs
-xdotool key --window $window_id KP_Enter
+{
+ sleep 2
+
+ window_id=`xdotool search --name "emacs-bot"`
+ if [ -z "$window_id" ]
+ then
+ echo "Could not find window ID for Emacs-bot"
+ exit 1
+ fi
+
+ ## Run once with default options
+ run_drill
+
+ ## Run once with presentation-prompt-with-typing
+ run_drill
+
+ kill_emacs
+} || cat robot/failure.txt
- [nongnu] elpa/org-drill 30913a9adf 247/251: Merge branch 'branweb/fix-cram-mode' into 'master', (continued)
- [nongnu] elpa/org-drill 30913a9adf 247/251: Merge branch 'branweb/fix-cram-mode' into 'master', ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0f0ee9f188 241/251: Allow Creating New Session in Cram Mode, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ace0cf0dcd 250/251: Update CI., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 7b9b7f1323 209/251: Update documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 546336d207 225/251: Update documentation., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 602f5c4d96 243/251: Fix use of cl.el, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 94ae5d684d 244/251: update gitignore to exclude all org files in robots dir ending in -copy, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c65430b71a 045/251: Oops! some some nasty discrepancies have now been fixed.(something went wrong, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 7a3bf3ef30 092/251: Update version in header to 2.4.10., ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill b02735bde7 094/251: New option 'org-drill-cloze-length-matches-hidden-text': If non-nil, when, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 6c14bd6c50 129/251: Update robot, Fix remaining CL dependencies,
ELPA Syncer <=
- [nongnu] elpa/org-drill 11abbd2747 124/251: Add robotized test, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 46d71b5218 141/251: Add lexical-binding, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 2b44b36284 197/251: Fix prompt, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 1429c675e8 191/251: Fix compatability call again!, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9eb8d72776 163/251: Update README, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9f9e5e7170 193/251: Renamespace all macros, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 508f2dde21 202/251: Use persist, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 04923e6c38 214/251: Update gitignore for generated file, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c0ee1780de 222/251: Update documentation, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 11dd2d4e23 235/251: Merge branch 'master' into 'fix/latex-overlays', ELPA Syncer, 2022/01/17