Skip to content

Commit

Permalink
#25 wip add demo using emacs-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
fstamour committed Nov 27, 2021
1 parent edc0852 commit 910489c
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.fasl
*.core
*.svg


githooks/*.sample
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "scripts/emacs-director"]
path = scripts/emacs-director
url = https://github.com/bard/emacs-director.git
38 changes: 38 additions & 0 deletions scripts/demo.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(director-bootstrap
:user-dir "/tmp/director-demo"
:packages '()
:load-path '("src/"
"scripts/emacs-director/"))

(director-run
:version 1
:before-start (lambda ()
(switch-to-buffer (get-buffer-create "*example*"))
(menu-bar-mode -1)
;; Load slime
(load "~/quicklisp/slime-helper.el")
;; Configure slime
(setq slime-lisp-implementations
'((sbcl ("sbcl"
"--noinform"
"--dynamic-space-size" "16000")
:coding-system utf-8-unix))
slime-default-lisp 'sbcl

;; Autocomplete
slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
;; Load breeze
(require 'breeze)
;; Start slime
;; (slime)
)
:steps '((:type "\M-x")
(:type "breeze-mode")
(:type [return])
;; Switch to the other window
(:type "\C-x")
(:type "\C-o"))
:typing-style 'human
:delay-between-steps 1
:after-end (lambda () (kill-emacs 0))
:on-error (lambda () (kill-emacs 1)))
10 changes: 10 additions & 0 deletions scripts/demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh

# Stop on first error
set -e

# Move to repo's root
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
1 change: 1 addition & 0 deletions scripts/emacs-director
Submodule emacs-director added at 439c2b
22 changes: 22 additions & 0 deletions scripts/emacs-director.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/director.el b/director.el
index 6101320..b372278 100644
--- a/director.el
+++ b/director.el
@@ -163,7 +163,7 @@ If DELAY-OVERRIDE is non-nil, the next step is delayed by that value rather than
(director--log (format "FAILURE: %S" director--failure))
(run-with-timer director--delay nil 'director--end))

- ((length= director--steps 0)
+ ((= (length director--steps) 0)
;; Run after-step callback for last step
(director--after-step)
(run-with-timer (or delay-override director--delay) nil 'director--end))
@@ -216,7 +216,7 @@ If DELAY-OVERRIDE is non-nil, the next step is delayed by that value rather than

(`(:suspend)
nil)
-
+
(`(:assert ,condition)
(or (eval condition)
(setq director--failure condition))

0 comments on commit 910489c

Please sign in to comment.