From ffad59ad6247970a0038308c6bfdb1cce5165333 Mon Sep 17 00:00:00 2001 From: Francis St-Amour Date: Tue, 14 Dec 2021 20:29:16 -0500 Subject: [PATCH] #25 improve demo.sh (not there yet though) --- scripts/demo.el | 38 ++++++++++++++++++++++++++++++++------ scripts/demo.sh | 4 +++- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/scripts/demo.el b/scripts/demo.el index 493e3554..7229520e 100644 --- a/scripts/demo.el +++ b/scripts/demo.el @@ -1,14 +1,25 @@ + +(package-refresh-contents) +(package-install 'selectrum) +(package-initialize) + (director-bootstrap :user-dir "/tmp/director-demo" :packages '() :load-path '("src/" "scripts/emacs-director/")) +(defvar *demo-window-config* nil) + (director-run :version 1 :before-start (lambda () + ;;(require 'ivy) + (selectrum-mode 1) (switch-to-buffer (get-buffer-create "*example*")) (menu-bar-mode -1) + (setf *demo-window-config* + (current-window-configuration)) ;; Load slime (load "~/quicklisp/slime-helper.el") ;; Configure slime @@ -18,21 +29,36 @@ "--dynamic-space-size" "16000") :coding-system utf-8-unix)) slime-default-lisp 'sbcl - ;; Autocomplete - slime-complete-symbol-function 'slime-fuzzy-complete-symbol) + slime-complete-symbol-function + 'slime-fuzzy-complete-symbol) ;; Load breeze (require 'breeze) ;; Start slime ;; (slime) ) :steps '((:type "\M-x") - (:type "breeze-mode") + (:type "breeze") (:type [return]) + (:wait 2) ;; Switch to the other window - (:type "\C-x") - (:type "\C-o")) + (:call + (lambda () + (interactive) + (set-window-configuration *demo-window-config*))) + ;; Breeze-mode + (:call lisp-mode) + (:call breeze-mode) + ;; Calling quickfix + (:call breeze-quickfix) + (:wait 5)) :typing-style 'human - :delay-between-steps 1 + :log-target '(file . "demo.log") + :delay-between-steps 0.5 :after-end (lambda () (kill-emacs 0)) + :on-failure (lambda () (kill-emacs 1)) :on-error (lambda () (kill-emacs 1))) + + +;; (listify-key-sequence ".") +;; (read-key-sequence-vector "") diff --git a/scripts/demo.sh b/scripts/demo.sh index ce6b54a7..0b41e93c 100755 --- a/scripts/demo.sh +++ b/scripts/demo.sh @@ -7,4 +7,6 @@ set -e cd "$(git rev-parse --show-toplevel)" termtosvg demo.svg -c 'emacs -nw -Q -l scripts/emacs-director/util/director-bootstrap.el -l scripts/demo.el' -firefox demo.svg +# firefox demo.svg + +tail demo.log