;; Emacs as a text editor (progn ;; Setup (defvar democamp/presentation-file "~/democamp.el") (defvar democamp/cue-buffer "*DemoCamp*") (defun democamp/next () (interactive) (let (start sexp) (with-current-buffer (find-file-noselect democamp/presentation-file) (setq start (point)) (forward-sexp) (setq sexp (buffer-substring-no-properties start (point)))) (eval (read sexp)))) (defun democamp/previous () (interactive) (let (start sexp) (with-current-buffer (find-file-noselect democamp/presentation-file) (setq start (point)) (backward-sexp) (setq sexp (buffer-substring-no-properties (point) start))) (eval (read sexp)))) (defun democamp/repeat () (interactive) (let (start sexp) (with-current-buffer (find-file-noselect democamp/presentation-file) (setq start (point)) (backward-sexp) (setq sexp (buffer-substring (point) start)) (forward-sexp)) (eval (read sexp)))) (defun democamp/say (text) (with-current-buffer (get-buffer-create democamp/cue-buffer) (erase-buffer) (insert text) (goto-char (point-min)) (call-interactively 'emacspeak-speak-buffer))) (global-set-key (kbd "") 'democamp/next) (global-set-key (kbd "S-") 'democamp/previous) (global-set-key (kbd "C-") 'democamp/repeat) ) ;; Window register a (progn (menu-bar-mode 1) (tool-bar-mode 1) (set-face-attribute 'default nil :height 200) (find-file "~/hello.txt") (democamp/say "I don't know why people are so intimidated by Emacs. It's a text editor. It has menus and toolbars and everything.") (frame-configuration-to-register ?a)) (progn (democamp/say "Spell-check, too.") (load-library "flyspell") (load-library "emacspeak-flyspell") (setq emacspeak-flyspell-highlight-personality nil) (flyspell-mode 1)) ;; Emacs learning curve ;; Frame configuration b (progn (find-file "~/tmp/learningcurves.jpg") (democamp/say "So why are people terrified of Emacs?")) (progn (set-face-attribute 'default nil :height 700) (delete-other-windows) (sit-for 1) (animate-sequence (list "Livin' la Vida Emacs" "DemoCamp10" "Sacha Chua" "Oct 23, 2006") 1)) (progn (set-face-attribute 'default nil :height 200) (democamp/say "Emacs comes with a psychotherapist.") (doctor)) (progn (democamp/say "an adventure game") (dunnet)) (progn (democamp/say "random geek stuff") (hanoi 3)) (progn (democamp/say "even Snake") (delete-other-windows) (snake)) (progn (democamp/say "And of course, my favorite game, Nethack.") (load-library "nethack-config") (nethack)) (democamp/say "Some of it is useful") ;; Flashcard (progn (democamp/say "Flashcards") (load-library "flashcard-config") (find-file "~/notebook/japan/japanese.deck") (goto-char (point-max))) ;; With fortunes (progn (democamp/say "And you can mash things together") (load-library "fortune") (setq fortune-file "/usr/share/games/fortunes/computers") (fortune) (delete-other-windows)) (progn (find-file-other-window "~/notebook/japan/japanese.deck") (goto-char (point-max))) ;; Planner (democamp/say "Now the wild stuff starts.") (progn (planner-goto-today) (delete-other-windows) (democamp/say "Emacs: more than just an editor. It's a way of life.")) ;; - Show tasks (democamp/say "I use Emacs to manage my tasks with Planner.") (democamp/say "I can even keep detailed time logs!") (progn (load-library "/usr/src/planner-el/planner-timeclock-summary.el") (planner-timeclock-summary-show (planner-today))) ;; - Show notes (democamp/say "... blog...") ;; - Jump to URL in w3m (democamp/say "... surf the Web (with tabbed browsing and a custom keymap!)") 33;; - Jump to URL in Firefox (democamp/say "Although sometimes you really want Firefox.") ;; - Jump to task from mail message (democamp/say "I can hyperlink to pretty much anything.") (democamp/say "People's contact information") (democamp/say "E-mail, etc.") (democamp/say "Which comes in handy when I need to create tasks from mail messages.") ;; Add note to BBDB from mail message (progn (democamp/say "Keeping track of the number of recipients") (planner-visit-link "pos://~/.gnus#19820")) (democamp/say "BBDB indicators") ;; Reply to message with nickname, (progn (democamp/say "CRM in e-mail: Nicknames...") (planner-visit-link "pos://~/.gnus#16025")) ;; and show how it shows up in BBDB record and ping code (progn (democamp/say "... notes...") (planner-visit-link "pos://~/.gnus#18804")) (progn (democamp/say "... pings...") (planner-visit-link "pos://~/.gnus#16932")) (democamp/say "... filters...") (democamp/say "So those are just a few examples of the crazy stuff you can do if you have an infinitely tweakable environment.") (democamp/say "Sacha, remember to plug in the speakers.") (democamp/say "Demo Campers, welcome to Emacs. What else do you want it to do?")