-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
My snippet for making Emacs Demonstrations
- Loading branch information
1 parent
d5b3867
commit c257ae1
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ results | |
elisp/in-progress | ||
snippets/message-mode/* | ||
server/old | ||
/snippets/clojure-mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# -*- mode: snippet; require-final-newline: nil -*- | ||
# key: Sample Functions for demo-it | ||
# name: demoit | ||
# contributor: Howard Abrams <howardabrams@gmail.com> | ||
# -- | ||
;;; ${1:`(file-name-sans-extension (file-name-base (buffer-file-name)))`} --- ${2:Simple Summary} | ||
|
||
;;; Commentary: | ||
|
||
;; $0 | ||
|
||
;;; Code: | ||
|
||
(load-library "demo-it") | ||
|
||
;; ---------------------------------------------------------------------- | ||
;; Create each function that represents a "presentation frame" | ||
|
||
(defun ${3:my-demo}-load-presentation () | ||
"Display $1.org (an 'org-mode' file) as a presentation." | ||
(demo-it-frame-fullscreen) | ||
(delete-other-windows) | ||
(demo-it-presentation "$1.org")) | ||
|
||
(defun $3-load-source-code () | ||
"Load some source code in a side window." | ||
(demo-it-load-file "some-source.py")) | ||
|
||
(defun $3-run-code () | ||
"Execute our source code in an Eshell buffer." | ||
(demo-it-run-in-eshell "~/Work" "python some-source.py")) | ||
|
||
;; ---------------------------------------------------------------------- | ||
;; Demonstration and/or Presentation Order | ||
|
||
(defun $3-start-presentation () | ||
"$2." | ||
(interactive) | ||
(demo-it-keybindings) | ||
(demo-it-start (list | ||
'$3-load-presentation ;; Frame 1 | ||
'$3-load-source-code ;; Frame 2 | ||
'$3-run-code ;; Frame 3 | ||
'demo-it-end | ||
))) | ||
|
||
;; ---------------------------------------------------------------------- | ||
;; Start the presentation whenever this script is evaluated. Good idea? | ||
($3-start-presentation) | ||
|
||
;;; $1.el ends here |