so
  • 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.

[Image]
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:

[Image]
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.

Web mentions

Comments

A couple of things that might help:

  1. you could use hi-lock-mode with appropriate regex patterns and face choices to make the ": " invisible (and also the #+results line, if you so wished).
  2. you should be able customize the face used for headlines (e.g. the top line of your slide) to have a line-height factor that increases the spacing. hi-lock-mode might also be usable here.
—Posted by éric on 02 Mar 2020 @ 02:51 UTC #

I tried changing the line-height, but it didn't have any apparent effect. When I have more time, I'll try again. I will also investigate hi-lock-mode as you suggested. Thanks!

Please provide your name and email address. Your email address will not be displayed and I won’t spam you, I promise. Your name and a link to your web address, if you provide one, will be displayed.

Your name:

Your email:

Homepage:

Do you comprehend the words on this page? (Please demonstrate that you aren't a mindless, screen-scraping robot.)

What is eight minus eight?  (e.g. six plus two is 8)

Enter your comment in the box below. You may style your comment with the CommonMark flavor of Markdown.

All comments are moderated. I don’t promise to preserve all of your formatting and I reserve the right to remove comments for any reason.