Form feed-separated plain text presentations with Emacs
git clone https://www.shemshak.org/~amin/ffs
1 \input texinfo @c -*- texinfo -*-2 @c %**start of header3 @setfilename ffs.info4 @settitle ffs: form feed-separated plain text presentations5 @documentencoding UTF-86 @documentlanguage en7 @set STABLEDATE 2026-09-228 @set STABLEVERSION 0.2.39 @set DEVELVERSION 0.2.4-git10 @c %**end of header1112 @copying13 Copyright @copyright{} 2022--2026 Free Software Foundation, Inc.1415 @quotation16 Permission is granted to copy, distribute and/or modify this document17 under the terms of the GNU Free Documentation License, Version 1.3 or18 any later version published by the Free Software Foundation; with no19 Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.20 A copy of the license is included in the section entitled21 ``GNU Free Documentation License.''22 @end quotation23 @end copying2425 @dircategory Emacs misc features26 @direntry27 * FFS: (ffs). Simple form feed-separated plain text presentations.28 @end direntry2930 @finalout31 @titlepage32 @title ffs: form feed-separated plain text presentations33 @author Amin Bandali (@email{bandali@@gnu.org})34 @page35 @vskip 0pt plus 1filll36 @insertcopying37 @end titlepage3839 @ifplaintext40 @contents41 @sp 142 @end ifplaintext4344 @ifnottex45 @node Top46 @top ffs: form feed-separated plain text presentations4748 @insertcopying4950 This manual, written by Amin Bandali, introduces @samp{ffs} and its51 user options, and provides every other piece of information pertinent52 to it.5354 This manual corresponds to @samp{ffs} stable version55 @value{STABLEVERSION}, released on @value{STABLEDATE}.56 Any reference to a newer feature which does not yet57 form part of the latest tagged commit is marked as such.5859 Current development target is @value{DEVELVERSION}.6061 @itemize62 @item63 Package name (GNU ELPA):64 @uref{https://elpa.gnu.org/packages/ffs.html, @samp{ffs}}65 @item66 Manual:67 @uref{https://www.shemshak.org/~amin/ffs/ffs.html}68 @item69 NEWS:70 @uref{https://www.shemshak.org/~amin/ffs/NEWS}71 @item72 Git repository:73 @uref{https://www.shemshak.org/~amin/ffs}74 @item75 Backronyms: fabulous foolproof slides - for freedom's sake -76 ffs flips slides77 @end itemize7879 Dedicated to the loving memory of80 @uref{https://www.shemshak.org/~farangis/,81 Farangis Yousefinia}.8283 @end ifnottex8485 @menu86 * Overview::87 * Installation::88 * Sample configuration::89 * Default key bindings::90 * Acknowledgements::91 * GNU Free Documentation License::92 * Indices::9394 @detailmenu95 --- The Detailed Node Listing ---9697 Installation9899 * GNU ELPA package::100 * Manual installation::101102 Default key bindings103104 * @code{ffs-mode-map}::105 * @code{ffs-present-mode-map}::106 * @code{ffs-toggle-prefix-map}::107 * @code{ffs-edit-mode-map}::108109 Indices110111 * Function index::112 * Variable index::113 * Concept index::114115 @end detailmenu116 @end menu117118 @node Overview119 @chapter Overview120121 This package provides a simple presentation mode which can be applied122 to any buffer for reading, writing, editing, and presenting slides.123 Slides are separated using the @code{page-delimiter}, by default the124 @samp{^L} character, known as the form feed, which can be inserted125 using @kbd{C-q C-l}. Commands are provided for moving between those126 pages, aka slides. These motions work even when narrowing is in127 effect (and they preserve it). Through detailed explanations and128 concrete examples, this manual hopes to demonstrate that @code{ffs}129 is designed to be simple and flexible, and easy to use and extend.130131 ffs does not define any global key bindings. You can define a key132 binding for @code{ffs-mode} in the @code{global-map} like so:133134 @lisp135 (global-set-key (kbd "C-c f s") #'ffs-mode)136 @end lisp137138 On Emacs 29 or later, you can use the newer keymap functions, for139 instance:140141 @lisp142 (keymap-global-set "C-c f s" #'ffs-mode)143 @end lisp144145 For convenience, @code{ffs} is provided as an alias for146 @code{ffs-mode}.147148 Once enabled, @code{ffs-mode} puts the buffer in read-only mode by149 setting @code{buffer-read-only}, and provides convenient key bindings150 for moving between, editing, and inserting slides. These are151 available in the @code{ffs-mode-map} keymap.152153 @findex ffs-present-mode154 @vindex ffs-default-face-height155 @vindex ffs-hide-cursor156 @vindex ffs-hide-mode-line157 @vindex ffs-hide-header-line158 When ready to present your slides, you can enable159 @code{ffs-present-mode}, by default bound to the160 @kbd{s} key in @code{ffs-mode-map} to start a presentation.161 Several user options are provided for customizing the appearance162 of the buffer during presentations, for using a different163 @samp{height} for the @code{default} face164 (@code{ffs-default-face-height}), hiding the cursor165 (@code{ffs-hide-cursor}), hiding the mode line166 (@code{ffs-hide-mode-line}), and hiding the header line167 (@code{ffs-hide-header-line}).168169 @node Installation170 @chapter Installation171172 @menu173 * GNU ELPA package::174 * Manual installation::175 @end menu176177 @node GNU ELPA package178 @section GNU ELPA package179180 The package is available as @samp{ffs}. Simply do:181182 @example183 M-x package-refresh-contents184 M-x package-install185 @end example186187 And search for it.188189 GNU ELPA provides the latest stable release. Folks who prefer to190 follow the development process in order to report bugs or suggest191 changes can use the version of the package from the GNU-devel ELPA@.192193 @node Manual installation194 @section Manual installation195196 Assuming your Emacs files are found in @samp{~/.emacs.d/}, execute197 the following commands in a shell:198199 @example200 # Make a directory for local lisp files and packages201 mkdir ~/.emacs.d/lisp202203 # Go to the new directory204 cd ~/.emacs.d/lisp/205206 # Clone the ffs source repository207 git clone https://www.shemshak.org/~amin/ffs208 @end example209210 Then, in your @code{user-init-file} (@samp{init.el} or equivalent)211 add:212213 @lisp214 ;; Make Elisp files in the directory available215 (add-to-list 'load-path "~/.emacs.d/lisp/ffs")216 @end lisp217218 Then restart your Emacs session or simply evaluate that expression219 (using @kbd{C-x C-e}) so Emacs can find the package.220221 On Emacs 31 or later, you can use the new User Lisp feature,222 where Emacs Lisp files in the directory specified by223 @code{user-lisp-directory} and its subdirectories will be224 recursively byte-compiled, scraped for autoload cookies, and225 ensured to be in @code{load-path}. So all you need is to designate226 @samp{~/.emacs.d/lisp/} as your @code{user-lisp-directory} in your227 @code{early-init-file} (@samp{early-init.el}) like so:228229 @lisp230 (setq user-lisp-directory (locate-user-emacs-file "lisp/"))231 @end lisp232233 @node Sample configuration234 @chapter Sample configuration235236 @cindex Package configuration237238 @code{ffs} tries to make as few opinionated choices as possible239 out-of-the-box, following the principle of least surprise.240241 @lisp242 (require 'ffs)243244 ;; You can add a global key binding for enabling `ffs-mode'.245246 (global-set-key (kbd "C-c f s") #'ffs-mode)247248 ;; These user options apply when `ffs-present-mode' is enabled.249 ;; Their value is buffer-local.250251 (setq-default252 ffs-hide-cursor t253 ffs-hide-mode-line t254 ffs-hide-header-line t)255256 ;; You can add hooks to `ffs-mode-hook' or `ffs-present-mode-hook' for257 ;; hooks that are run every time `ffs-mode' or `ffs-present-mode' are258 ;; enabled and disabled.259260 ;; The following sample hook is run when `ffs-present-mode' is enabled261 ;; and it disables `flyspell-mode', `show-paren-local-mode', and262 ;; `display-fill-column-indicator-mode', and re-enables them when263 ;; `ffs-present-mode' is disabled, to prevent visual distractions264 ;; from them during presentations.265266 (add-hook267 'ffs-present-mode-hook268 (lambda ()269 (let ((arg (if ffs-present-mode -1 1)))270 (mapc271 (lambda (mode) (funcall mode arg))272 '(flyspell-mode273 show-paren-local-mode274 display-fill-column-indicator-mode)))))275276 ;; You can also add keys to `ffs-mode-map' for use when `ffs-mode' is277 ;; enabled. For keys that may be only relevant during presentations,278 ;; you can add them to `ffs-present-mode-map'.279 @end lisp280281 @node Default key bindings282 @chapter Default key bindings283284 This section documents the default key bindings of the various keymaps285 of @code{ffs}. Care was taken to choose intuitive mnemonic-based keys286 for commands familiar from other existing similar keymaps, but you may287 override them if you so choose to.288289 @menu290 * @code{ffs-mode-map}::291 * @code{ffs-present-mode-map}::292 * @code{ffs-toggle-prefix-map}::293 * @code{ffs-edit-mode-map}::294 @end menu295296 @node @code{ffs-mode-map}297 @section @code{ffs-mode-map}298299 The @code{ffs-mode-map} is the main keymap of @code{ffs-mode}, used300 both when preparing slides with @code{ffs-mode} enabled as well as301 while presenting them with @code{ffs-present-mode} enabled:302303 @multitable {@code{ffs-find-speaker-notes-file}} {@kbd{C-_}, @kbd{C-/}, @kbd{C-x u}}304 @headitem Command305 @tab Key binding(s)306 @item @code{ffs-goto-previous}307 @tab @kbd{p}, @kbd{@key{DEL}}, @kbd{[}308 @item @code{ffs-goto-next}309 @tab @kbd{n}, @kbd{@key{SPC}}, @kbd{]}310 @item @code{ffs-goto-first}311 @tab @kbd{<}312 @item @code{ffs-goto-last}313 @tab @kbd{>}314 @item @code{ffs-start}315 @tab @kbd{s}316 @item @code{ffs-stop-or-quit}317 @tab @kbd{q}318 @item @code{ffs-edit}319 @tab @kbd{e}, @kbd{C-c '}320 @item @code{ffs-new-above}321 @tab @kbd{O}322 @item @code{ffs-new-below}323 @tab @kbd{o}324 @item @code{ffs-find-speaker-notes-file}325 @tab @kbd{S}326 @item @code{narrow-to-page}327 @tab @kbd{N}328 @item @code{widen}329 @tab @kbd{W}330 @item @code{undo}331 @tab @kbd{C-_}, @kbd{C-/}, @kbd{C-x u}332 @item @code{ffs-toggle-prefix-map}333 @tab @kbd{t}334 @item @code{describe-mode}335 @tab @kbd{?}336 @end multitable337338 @node @code{ffs-present-mode-map}339 @section @code{ffs-present-mode-map}340341 The @code{ffs-present-mode-map} keymap used when342 @code{ffs-present-mode} is active (during presentations)343 inherits the key bindings of its parent keymap344 @code{ffs-mode-map}, with the following changes:345346 @multitable {@code{ffs-stop-or-quit}} {Key binding(s)}347 @headitem Command348 @tab Key binding(s)349 @item @code{ffs-stop-or-quit}350 @tab @kbd{s}351 @end multitable352353 @node @code{ffs-toggle-prefix-map}354 @section @code{ffs-toggle-prefix-map}355356 The @code{ffs-toggle-prefix-map} keymap, by default bound to @kbd{t}357 in @code{ffs-mode-map}, maps the following commands:358359 @multitable {@code{ffs-toggle-hide-header-line}} {Key binding(s)}360 @headitem Command361 @tab Key binding(s)362 @item @code{ffs-toggle-echo-progress}363 @tab @kbd{e}364 @item @code{ffs-toggle-hide-cursor}365 @tab @kbd{c}366 @item @code{ffs-toggle-hide-mode-line}367 @tab @kbd{m}368 @item @code{ffs-toggle-hide-header-line}369 @tab @kbd{h}370 @item @code{ffs-toggle-dark-mode}371 @tab @kbd{d}372 @end multitable373374 @node @code{ffs-edit-mode-map}375 @section @code{ffs-edit-mode-map}376377 The @code{ffs-edit-mode-map} keymap for @code{ffs-edit-mode} is378 used in @code{ffs-edit} buffers, when editing an existing slide379 or inserting a new one:380381 @multitable {@code{ffs-edit-discard}} {Key binding(s)}382 @headitem Command383 @tab Key binding(s)384 @item @code{ffs-edit-discard}385 @tab @kbd{C-c C-k}386 @item @code{ffs-edit-done}387 @tab @kbd{C-c C-c}388 @end multitable389390 @node Acknowledgements391 @chapter Acknowledgements392393 @cindex Contributors394395 @code{ffs} is meant to be a collective effort. Every bit of help396 matters and is greatly appreciated.397398 @table @asis399 @item Author/maintainer400 Amin Bandali.401402 @item Contributions to code or the manual403 Protesilaos, Stefan Monnier.404405 @item Ideas and/or user feedback406 Protesilaos.407 @end table408409 @code{ffs} and its author owe a debt of gratitude to Protesilaos for410 rounds of code review and feedback for improving and polishing the411 package in preparation for submission to GNU ELPA@. You can watch412 videos of these sessions on the author's website:413414 @itemize415 @item416 @uref{https://www.shemshak.org/~amin/ffs-code-review-prot.html,417 FFS code review with Protesilaos}418 @item419 @uref{https://www.shemshak.org/~amin/ffs-emacs-ext-prot.html,420 FFS code review and Emacs extensibility with Protesilaos}421 @end itemize422423 Further, inspiration for parts of @code{ffs}'s implementation was424 gratefully drawn from Protesilaos's425 @uref{https://protesilaos.com/emacs/logos, Logos} package for Emacs.426427 @node GNU Free Documentation License428 @appendix GNU Free Documentation License429430 @cindex FDL, GNU Free Documentation License431432 @include fdl.texi433434 @node Indices435 @chapter Indices436437 @menu438 * Function index::439 * Variable index::440 * Concept index::441 @end menu442443 @node Function index444 @section Function index445446 @printindex fn447448 @node Variable index449 @section Variable index450451 @printindex vr452453 @node Concept index454 @section Concept index455456 @printindex cp457458 @bye