Skip to content

Commit

Permalink
#25 improve demo.sh (not there yet though)
Browse files Browse the repository at this point in the history
  • Loading branch information
fstamour committed Dec 15, 2021
1 parent 4ff49b2 commit ffad59a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
38 changes: 32 additions & 6 deletions scripts/demo.el
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 "")
4 changes: 3 additions & 1 deletion scripts/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ffad59a

Please sign in to comment.