• This post is part of a thread:
  • Dotfiles, 29 Feb 2020

Presenting in Org

Volume 4, Issue 14; 29 Feb 2020

There are lots of popular tools for giving presentations. I hate them all. Usually, I use the web. For XML Prague, I decided to use Emacs.

I used Org-mode to give my XML Prague talk, and I mean that literally: I gave the talk in a full-screen Emacs buffer. Several people expressed interest in my Emacs configuration after that talk, so I’ve written the following couple of weblog postings about it.

Title slide

I started out doing a little planning and outlining in Emacs, fully expecting that I’d turn it into XML and then into HTML. I have a collection of HTML+CSS+JavaScript that I typically use to give presentations.

But when I got to the slides that contained demos, I realized that Org-babel would work really nicely. I’m often talking about technology and I prefer to show how it works if I can, but demos can be very intrusive:

  1. You arrive at a slide that says something useless like “demo now”.
  2. You have to switch windows, moving to the command line or another app. If you’re unlucky, this causes the entire projector to flicker and recalibrate.
  3. You’ve now completely distracted your audience, so you have to stop and explain where you are and what you’re going to do.
  4. You do the demo.
  5. You return to the “demo now” slide, which is no longer relevant, and possibly causes the whole recalibration dance again.
  6. You’ve distracted your audience again, and probably yourself, so you have to get everyone back into the flow of your presentation.

Org-babel is the literate programming framework in Org. If you put the source code (or the demo code in this case) into a block, you can simply type C-c C-c to execute the code and insert the results into the buffer! This is so much nicer:

  1. You arrive at a slide that contains your demo code.
  2. You talk through what it’s going to do.
  3. You hit C-c C-c and wait nervously.
  4. The buffer refreshes showing your results in context.
  5. You talk about the results and move on, never distracting your audience or yourself.

Here’s the “after running the demo”If you’re very observant (as at least one person was!), you’ll see that the end of the xproc block is formatted differently than you might expect. This is a font lock issue that I haven’t debugged yet. Unclear if it’s in my customizations or elsewhere. Sleuthing invited! buffer:

Code example

There’s a small amount of markup in the buffer (the #+RESULTS header and the leading “:”s) to talk around, but the whole thing is vastly smoother.

I looked at a couple of “presentations in Emacs” packages but ultimately decided to roll my own. It’s very simple: increase the font sizes a bit, configure a couple of keys for navigating, clean up the minibuffer after each navigation. That’s about it. It’s in ~/.emacs.d/personal/ndw-org.el if you go poking about in the dotfiles I published.

I do wish there was a little more space between the running header at the top of the buffer and the first line of the actual content. I gave myself half an hour to figure out how to fix that and didn’t succeed. Suggestions most welcome.