- Emacs learning curve?
- Mix of Emacs geeks skewed towards people who’ve been using this for a while (after all, takes a certain commitment to come all the way to an Emacs conference!)
- Get people excited about Emacs and the conference
- People have the feeling of “Wow, this is an amazing platform and we can make cool stuff with it”
- “Oh, I didn’t know Emacs could do that!” (especially for people who don’t read Planet Emacsen all the time)
- “Hmm, what can we do to make Emacs even awesomer?”
Code for presentation
(defvar sacha/org-show-presentation-file "~/Dropbox/Emacs Conference/public.org" "File containing the presentation.") (defvar sacha/org-show-slide-tag "slide" "Tag that marks slides.") (defvar sacha/org-show-slide-tag-regexp (concat ":" (regexp-quote sacha/org-show-slide-tag) ":")) (require 'eimp) ;; From org-pres--eimp-fit (defun sacha/org-show-eimp-fit () "Function used as a hook, fits the image found to the window." (when (eq major-mode 'image-mode) (eimp-fit-image-to-window nil))) (add-hook 'find-file-hook 'sacha/org-show-eimp-fit) (defun sacha/org-show-execute-slide () "Process slide at point. If it contains an Emacs Lisp source block, evaluate it. If it contains an image, view it and switch to that buffer. Else, focus on that buffer. Hide all drawers." (interactive) (find-file sacha/org-show-presentation-file) (org-narrow-to-subtree) (visual-line-mode) (let ((heading-text (nth 4 (org-heading-components)))) (cond ;; view images ((and (goto-char (point-min)) (re-search-forward "\\[\\[.*\\.\\(jpg\\|gif\\|png\\)" nil t)) (delete-other-windows) (let ((org-link-frame-setup '((file . find-file)))) (org-open-at-point)) (delete-other-windows) (goto-char (point-min))) ;; find and execute source code blocks ((and (goto-char (point-min)) (re-search-forward "#\\+begin_src" nil t)) (let ((info (org-babel-get-src-block-info))) (unwind-protect (eval (read (concat "(progn " (nth 1 info) ")")))))) (t (switch-to-buffer (current-buffer)) (text-scale-set 4) (org-show-subtree) (org-cycle-hide-drawers t) (org-display-inline-images) (delete-other-windows))) (set-frame-name heading-text))) (defun sacha/org-show-next-slide () "Show the next slide." (interactive) (find-file sacha/org-show-presentation-file) (widen) (goto-char (line-end-position)) (when (re-search-forward sacha/org-show-slide-tag-regexp nil t) (sacha/org-show-execute-slide))) (defun sacha/org-show-previous-slide () "Show the next slide." (interactive) (find-file sacha/org-show-presentation-file) (widen) (goto-char (line-beginning-position)) (when (re-search-backward sacha/org-show-slide-tag-regexp nil t) (sacha/org-show-execute-slide))) (global-set-key '[f5] 'sacha/org-show-previous-slide) (global-set-key '[f6] 'sacha/org-show-execute-slide) (global-set-key '[f7] 'sacha/org-show-next-slide)
(menu-bar-mode 1) (delete-other-windows) (unless keywiz-global-map (keywiz 1))
Welcome to Emacs Conference 2013! =)
Wireless: Forward Stage: f0rw4rdst4g3
While we wait for the conference to begin (9:30), please feel free to mingle with other people / steal interesting configuration snippets / do any last-minute presentation hacking.
There are drinks in the kitchen. (Leave some for the rest. =) )
Thanks to Forward for the great venue!
|9:30||Sacha Chua & John Wiegley - Keynote|
|10:20||Joakim Verona - XWidgets|
|11:00||Nic Ferrier - Emacsing the EmacsWiki|
|12:00||Joe Corneli - project Arxana|
|lunch - 12:30-14:00|
|14:00||Sam Aaron - Title: Emacs Live - Hacking as Performance|
|14:20||Dimitri Fontaine - El-get|
|15:15||Michael Olson - From Marmalade To Emacs|
|15:45||John Wiegley - Emacs Lisp Development|
|16:15||Panel on Emacs Packaging - Marmelade, El-get, MELPA|
|16:45||Luke Gorrie - SLIME|
|17:10||Steve Yegge - Project Grok|
15 minutes - Present - whirlwind tour of interesting things that people are doing with Emacs (Sacha) 15 minutes - Past - how did we get here? (John) 10-13 minutes - Future (Technical) - new developments (John) 7-10 minutes - Future (Community) - how people can get deeper into the Emacs community; call to action (what’s next after this conference?) (Sacha)
Emacs: Present, Past, and Future
(require 'animate) (switch-to-buffer (get-buffer-create (or animation-buffer-name "*Animation*"))) (erase-buffer) (text-scale-set 6) (let* ((strings (list "Emacs: Present, Past, and Future" "Sacha Chua (@sachac) and" "John Wiegley (@jwiegley)" "" "March 30, 2013" "Emacs Conference (London)")) (vpos (/ (- 20 1 ;; For the mode-line (1- (length strings)) (length strings)) 2)) (width 43) hpos) (while strings (setq hpos (/ (- width (length (car strings))) 2)) (animate-string (car strings) vpos hpos) (setq vpos (1+ vpos)) (setq strings (cdr strings))))
Unix Power Tools
When I leafed through the library’s copy of Unix Power Tools in 1997, I had no idea that I’d come across something that would change my life and warp my brain. It seemed so innocuous. In Part V, which was about Text Editing, chapter 32 was about GNU Emacs. Section 32.13 was called “An Absurd Amusement”, and it said:
‘If you have time to waste (and I mean really waste ), Emacs has things to keep you occupied. ’
The book went on to include some output from psychoanalyze-pinhead, which feeds Zippy the Pinhead to M-x doctor, the Emacs psychotherapist.
That was more than fifteen years ago, and I still feel like such an Emacs newbie.
Written 559 blog posts about Emacs
But it’s fun exploring Emacs, so here’s a whirlwind tour of some of the amazing things people are doing with Emacs.
Games and other amusements
(when (and (boundp 'snake-buffer-name) (get-buffer snake-buffer-name)) (kill-buffer snake-buffer-name)) (delete-other-windows) (tetris)
(when (and (boundp 'tetris-buffer-name) (get-buffer tetris-buffer-name)) (kill-buffer tetris-buffer-name)) (when (get-buffer "*dungeon*") (kill-buffer "*dungeon*")) (progn (load-library "dunnet") (dunnet) (delete-other-windows) (text-scale-increase 5) (mapcar (lambda (move) (sit-for 1) (insert " " move) (dun-parse (point))) '("get shovel" "look at shovel" "east" "look at boulder" "east" "dig" "look" "get card" "look at card")))
Screenshot from http://www.nongnu.org/nethack-el/nethack.png
Emacs Chess can actually talk to electronic chessboards
(or at least johnw has coded the interface for it!)
Image from http://www.amazon.com/Novag-Carnelian-II-Chess-Computer/dp/B004G0S2WI
(progn (load-library "~/elisp/org-mode/contrib/lisp/org-sudoku.el") (switch-to-buffer (get-buffer-create "*sudoku demo*")) (erase-buffer) (org-mode) (org-sudoku-create 50) (text-scale-set 6) (sit-for 2) (org-sudoku-solve))
(keywiz (null keywiz-global-map)) (text-scale-set 4) (delete-other-windows)
This totally needs a way to limit it to a particular package, though.
You can draw graphics in Emacs. This gets pretty cool with a tablet or tablet PC. Artist-mode. That could come in handy when drawing ASCII art diagrams. artist-mode
(progn (switch-to-buffer (get-buffer-create "*artist*")) (erase-buffer) (artist-mode 1) (menu-bar-mode 1) (text-scale-set 0) (artist-select-op-spray-can))
(progn (switch-to-buffer (get-buffer-create "*artist*")) (artist-select-op-line))
Programming and system administration
Many Emacs geeks are developers or system administrators, so being able to edit remote files is really cool. Tramp
Tramp: What other people have to deal with
Tramp: SSH - SSH
Tramp: SSH - SSH - Sudo
Screenshot from http://philjackson.github.com/magit/img/screenshot.png
Programming by voice (Tavis Rudd)
http://puntoblogspot.blogspot.ca/2013/03/keyboardless-programming.html Pycon 2013
multiple cursors / iedit
(switch-to-buffer (get-buffer-create "*iedit demo*")) (erase-buffer) (when iedit-mode (iedit-mode)) (text-scale-set 4) (insert " You are in a maze of twisty little passages, all different. You are in a little maze of twisting passages, all different. You are in a maze of twisting little passages, all different. You are in a little maze of twisty passages, all different. You are in a twisting maze of little passages, all different. You are in a twisting little maze of passages, all different. You are in a twisty little maze of passages, all different. You are in a twisty maze of little passages, all different. You are in a little twisty maze of passages, all different. You are in a maze of little twisting passages, all different. You are in a maze of little twisty passages, all different. ") (sit-for 1) (re-search-backward "twisty") (sit-for 1) (iedit-mode 1)
Basically, org-mode bends the definition of outliners until you realise that outlines are text and text is outline and now you’re a babbling lunatic who no longer makes sense.
… And it worked. I made a ginormous table with plot summaries and I was able to chart the story pretty well and design a plot that actually makes some sense and is even more complex than the plot in the last year’s novel.
(dictionary-search "hello") (text-scale-set 4) (delete-other-windows)
Flashcards with org-drill
(delete-other-windows) (find-file "flashcards.org") (text-scale-set 4) (require 'org-drill) (org-drill)
Science and math
dna-mode.el A collection of functions for editing DNA sequences. It provides functions to make editing dna in Emacs easier.
- Fontify keywords and line numbers in sequences.
- Fontify bases when font-lock-mode is disabled.
- Incrementally search dna over pads and numbers.
- Complement and reverse complement a region.
- Move over bases and entire sequences.
- Detect sequence files by content.
Grab-bag of other things
Command frequency with keyfreq
(keyfreq-show) (other-window 1) (text-scale-set 4) (delete-other-windows)
Play music with EMMS
https://github.com/sabof/emms-mobile-remote… control it with your phone :slide:
This one uses elnode
Like this one!
Emacspeak: The Complete Audio Desktop
Which is awesome!
- Read and write (code, words, etc.)
- Browse the web
- Read e-books
- Search Google Maps
- … more!
(Doesn’t work on Windows)
http://www.emacswiki.org/emacs/XWindowEmacsManagerX Window Emacs Manager -
Emacs Starter Kit: literate configuration
(find-file "~/.emacs.d/Sacha.org") (text-scale-set 4) (goto-char (point-min))
(switch-to-buffer (get-buffer-create (or animation-buffer-name "*Animation*"))) (erase-buffer) (text-scale-set 6) (let* ((strings (list "How did we get here?" "John Wiegley")) (vpos (/ (- 20 1 ;; For the mode-line (1- (length strings)) (length strings)) 2)) (width 43) hpos) (while strings (setq hpos (/ (- width (length (car strings))) 2)) (animate-string (car strings) vpos hpos) (setq vpos (1+ vpos)) (setq strings (cdr strings))))
Channel, Usenet, mailing list…
#emacs on irc.freenode.net help.gnu.emacs various mailing lists
EmacsWiki (random is fun)
- More literate configuration and sharing!
- More blog posts and tweets!
- More screencasts!
- More looking over people’s shoulders!
- More conversations and connections!
- More fun!
Sacha Chua - LivingAnAwesomeLife.com John Wiegley - newartisans.com