Interactive presentations with Emacs Org Mode
  • Emacs Lisp 100%
Find a file
2026-01-06 00:21:43 +01:00
example.jpg Add hl-line-mode functionality, add inter-present-mode-highlight-line customisation variable, improve README, improve example.jpg. 2025-12-27 22:33:35 +01:00
example.org Add hl-line-mode functionality, add inter-present-mode-highlight-line customisation variable, improve README, improve example.jpg. 2025-12-27 22:33:35 +01:00
inter-present-mode.el Add hl-line-mode functionality, add inter-present-mode-highlight-line customisation variable, improve README, improve example.jpg. 2025-12-27 22:33:35 +01:00
LICENSE First commit. Made minor mode, add README and LICENSE files. 2025-11-09 23:08:06 +01:00
README.org Better wording in Readme about highlighting more than one visual line. 2026-01-06 00:21:43 +01:00

Inter-present-mode

Inter-present-mode is a simple presentation minor mode for use with Emacs and Org Mode. The content under each heading becomes a slide. When you start it, it starts either at the top of the file, above the first heading, or at the first heading. To move to the next heading, press C-z C-n. If you want to move back a heading, use C-z C-p. (You may change the prefix from C-z if you like.)

Inter-present-mode lets you hold interactive presentations where you evaluate code blocks, change them and rerun them, write new text into the slides, add answers to questions on slides and do everything else you normally can in Org mode while presenting. If you use another program to show a video or demo something, you can come right back to the presentation where you left it without restarting the presentation (unlike in many presentation programs).

I made it since other similar modes did not fit my use-case at work where I teach programming, development, and basic IT since they either swallowed too many glyphs which rendered tables unaligned and operators used in programming like == as =, or did not allow for the interactivity that is useful in a classroom where dialogue with the students is part of any presentation.

Since Org mode has excellent export facilities it is also easy to share your slides as Beamer PDFs exported with ox-pandoc. If you want files that look less like slides and more like traditional documents, you can do like me and export to .docx with ox-pandoc or PDFs through LaTex. I share those files with my students at the school's learning platform for review.

/einar/inter-present-mode/media/branch/main/example.jpg

Configuration

Inter-present-mode is presently not in any package archive, but you can install it with use-package and the :vc keyword like I show below. I have some more features and possible configurations in mind that I might implement before trying to get it included in a package archive.

Everything you can customize with a variable could also be customized with the Easy Customization interface that you get with M-x customize. Just search for inter-present-mode and the variables you can change will show up.

You may change inter-present-mode-keymap-prefix if you prefer another prefix like s-x instead of C-z. The effect would be that you would use s-x C-n and s-x C-p to go to the next and previous slide instead of C-z C-n and C-z C-p.

If you use the default prefix (C-z), it is a good idea to add (keymap-local-unset "C-z") to remove the iconify function this key is normally bound to so you don't iconify Emacs when starting a presentation. If so, you don't need to setopt inter-present-mode-keymap-prefix. I use (keymap-global-unset "C-z") somewhere else in my config since I never want to minimise (GUI) or sleep (TTY / terminal) Emacs and use C-z as prefix to my own keymap as well.

Another configuration I recommend is to bind some key in your own keymap with the :bind keyword to toggle inter-present-mode on or off like I show in the code block below. My keymap emo-map has the prefix key C-z, so the configuration showed adds C-z C-s as a key to start and stop presentations with inter-present-mode. You have to use a lambda function since keys in keymaps cannot be bound to functions that take parameters like 'toggle.

You may change inter-present-mode-face-height if you prefer larger or smaller faces (fonts). The default is 320. I find this works well for my use-case where I often have a bit more text than a best practice presentation would have on each slide. The height is in 1/10ths of usual font sizes so 320 means 32 point font size. (I want my presentations to look like how Org mode usually looks, so I rely on org mode which makes headlines bold to stand out, but do not change the height in inter-present-mode.)

If you prefer to start at the first heading instead of at the top of the document, you can set inter-present-mode-start-heading to t. If it is nil, the first slide becomes what is above the first heading instead. The default value is nil which starts at the top of the document.

If you want inter-present-mode to highlight the line you are on in your presentation, you can setopt inter-present-mode-highlight-line to t. NB: This highlights from the start of the line until a newline, ie if visual-line-mode is on and your logical line is longer than one visual line, it will highlight more than one visual line. You may want to press return to add a newline at appropriate places to split the visual lines into logical lines to avoid this.

(use-package inter-present-mode
 :vc (:url "https://codeberg.org/einar/inter-present-mode.git"
	    :rev :newest)
  :commands inter-present-mode
  :config
  (keymap-local-unset "C-z")
  (setopt inter-present-mode-keymap-prefix "C-z"
	  inter-present-mode-face-height 280
	  inter-present-mode-start-heading t
	  inter-present-mode-highlight-line t)
  :bind (:map emo-map
	      ("C-s" . (lambda () (interactive) (inter-present-mode 'toggle)))))

License and copyright

This program is free software licensed under the terms of the GNU General Public License verson 3 or (at your option) any later version. See the LICENSE file for more information.

Copyright © 2025 Einar Mostad