ffs

Form feed-separated plain text presentations with Emacs

git clone https://www.shemshak.org/~amin/ffs


main/tree/ffs.texi (-rw-r--r--, 11.8 KiB, raw)

  1 \input texinfo                  @c -*- texinfo -*-
  2 @c %**start of header
  3 @setfilename ffs.info
  4 @settitle ffs: form feed-separated plain text presentations
  5 @documentencoding UTF-8
  6 @documentlanguage en
  7 @set STABLEDATE 2026-09-22
  8 @set STABLEVERSION 0.2.3
  9 @set DEVELVERSION 0.2.4-git
 10 @c %**end of header
 11 
 12 @copying
 13 Copyright @copyright{} 2022--2026 Free Software Foundation, Inc.
 14 
 15 @quotation
 16 Permission is granted to copy, distribute and/or modify this document
 17 under the terms of the GNU Free Documentation License, Version 1.3 or
 18 any later version published by the Free Software Foundation; with no
 19 Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 20 A copy of the license is included in the section entitled
 21 ``GNU Free Documentation License.''
 22 @end quotation
 23 @end copying
 24 
 25 @dircategory Emacs misc features
 26 @direntry
 27 * FFS: (ffs).  Simple form feed-separated plain text presentations.
 28 @end direntry
 29 
 30 @finalout
 31 @titlepage
 32 @title ffs: form feed-separated plain text presentations
 33 @author Amin Bandali (@email{bandali@@gnu.org})
 34 @page
 35 @vskip 0pt plus 1filll
 36 @insertcopying
 37 @end titlepage
 38 
 39 @ifplaintext
 40 @contents
 41 @sp 1
 42 @end ifplaintext
 43 
 44 @ifnottex
 45 @node Top
 46 @top ffs: form feed-separated plain text presentations
 47 
 48 @insertcopying
 49 
 50 This manual, written by Amin Bandali, introduces @samp{ffs} and its
 51 user options, and provides every other piece of information pertinent
 52 to it.
 53 
 54 This manual corresponds to @samp{ffs} stable version
 55 @value{STABLEVERSION}, released on @value{STABLEDATE}.
 56 Any reference to a newer feature which does not yet
 57 form part of the latest tagged commit is marked as such.
 58 
 59 Current development target is @value{DEVELVERSION}.
 60 
 61 @itemize
 62 @item
 63 Package name (GNU ELPA):
 64 @uref{https://elpa.gnu.org/packages/ffs.html, @samp{ffs}}
 65 @item
 66 Manual:
 67 @uref{https://www.shemshak.org/~amin/ffs/ffs.html}
 68 @item
 69 NEWS:
 70 @uref{https://www.shemshak.org/~amin/ffs/NEWS}
 71 @item
 72 Git repository:
 73 @uref{https://www.shemshak.org/~amin/ffs}
 74 @item
 75 Backronyms: fabulous foolproof slides - for freedom's sake -
 76 ffs flips slides
 77 @end itemize
 78 
 79 Dedicated to the loving memory of
 80 @uref{https://www.shemshak.org/~farangis/,
 81 Farangis Yousefinia}.
 82 
 83 @end ifnottex
 84 
 85 @menu
 86 * Overview::
 87 * Installation::
 88 * Sample configuration::
 89 * Default key bindings::
 90 * Acknowledgements::
 91 * GNU Free Documentation License::
 92 * Indices::
 93 
 94 @detailmenu
 95 --- The Detailed Node Listing ---
 96 
 97 Installation
 98 
 99 * GNU ELPA package::
100 * Manual installation::
101 
102 Default key bindings
103 
104 * @code{ffs-mode-map}::
105 * @code{ffs-present-mode-map}::
106 * @code{ffs-toggle-prefix-map}::
107 * @code{ffs-edit-mode-map}::
108 
109 Indices
110 
111 * Function index::
112 * Variable index::
113 * Concept index::
114 
115 @end detailmenu
116 @end menu
117 
118 @node Overview
119 @chapter Overview
120 
121 This package provides a simple presentation mode which can be applied
122 to any buffer for reading, writing, editing, and presenting slides.
123 Slides are separated using the @code{page-delimiter}, by default the
124 @samp{^L} character, known as the form feed, which can be inserted
125 using @kbd{C-q C-l}.  Commands are provided for moving between those
126 pages, aka slides.  These motions work even when narrowing is in
127 effect (and they preserve it).  Through detailed explanations and
128 concrete examples, this manual hopes to demonstrate that @code{ffs}
129 is designed to be simple and flexible, and easy to use and extend.
130 
131 ffs does not define any global key bindings.  You can define a key
132 binding for @code{ffs-mode} in the @code{global-map} like so:
133 
134 @lisp
135 (global-set-key (kbd "C-c f s") #'ffs-mode)
136 @end lisp
137 
138 On Emacs 29 or later, you can use the newer keymap functions, for
139 instance:
140 
141 @lisp
142 (keymap-global-set "C-c f s" #'ffs-mode)
143 @end lisp
144 
145 For convenience, @code{ffs} is provided as an alias for
146 @code{ffs-mode}.
147 
148 Once enabled, @code{ffs-mode} puts the buffer in read-only mode by
149 setting @code{buffer-read-only}, and provides convenient key bindings
150 for moving between, editing, and inserting slides.  These are
151 available in the @code{ffs-mode-map} keymap.
152 
153 @findex ffs-present-mode
154 @vindex ffs-default-face-height
155 @vindex ffs-hide-cursor
156 @vindex ffs-hide-mode-line
157 @vindex ffs-hide-header-line
158 When ready to present your slides, you can enable
159 @code{ffs-present-mode}, by default bound to the
160 @kbd{s} key in @code{ffs-mode-map} to start a presentation.
161 Several user options are provided for customizing the appearance
162 of the buffer during presentations, for using a different
163 @samp{height} for the @code{default} face
164 (@code{ffs-default-face-height}), hiding the cursor
165 (@code{ffs-hide-cursor}), hiding the mode line
166 (@code{ffs-hide-mode-line}), and hiding the header line
167 (@code{ffs-hide-header-line}).
168 
169 @node Installation
170 @chapter Installation
171 
172 @menu
173 * GNU ELPA package::
174 * Manual installation::
175 @end menu
176 
177 @node GNU ELPA package
178 @section GNU ELPA package
179 
180 The package is available as @samp{ffs}.  Simply do:
181 
182 @example
183 M-x package-refresh-contents
184 M-x package-install
185 @end example
186 
187 And search for it.
188 
189 GNU ELPA provides the latest stable release.  Folks who prefer to
190 follow the development process in order to report bugs or suggest
191 changes can use the version of the package from the GNU-devel ELPA@.
192 
193 @node Manual installation
194 @section Manual installation
195 
196 Assuming your Emacs files are found in @samp{~/.emacs.d/}, execute
197 the following commands in a shell:
198 
199 @example
200 # Make a directory for local lisp files and packages
201 mkdir ~/.emacs.d/lisp
202 
203 # Go to the new directory
204 cd ~/.emacs.d/lisp/
205 
206 # Clone the ffs source repository
207 git clone https://www.shemshak.org/~amin/ffs
208 @end example
209 
210 Then, in your @code{user-init-file} (@samp{init.el} or equivalent)
211 add:
212 
213 @lisp
214 ;; Make Elisp files in the directory available
215 (add-to-list 'load-path "~/.emacs.d/lisp/ffs")
216 @end lisp
217 
218 Then restart your Emacs session or simply evaluate that expression
219 (using @kbd{C-x C-e}) so Emacs can find the package.
220 
221 On Emacs 31 or later, you can use the new User Lisp feature,
222 where Emacs Lisp files in the directory specified by
223 @code{user-lisp-directory} and its subdirectories will be
224 recursively byte-compiled, scraped for autoload cookies, and
225 ensured to be in @code{load-path}.  So all you need is to designate
226 @samp{~/.emacs.d/lisp/} as your @code{user-lisp-directory} in your
227 @code{early-init-file} (@samp{early-init.el}) like so:
228 
229 @lisp
230 (setq user-lisp-directory (locate-user-emacs-file "lisp/"))
231 @end lisp
232 
233 @node Sample configuration
234 @chapter Sample configuration
235 
236 @cindex Package configuration
237 
238 @code{ffs} tries to make as few opinionated choices as possible
239 out-of-the-box, following the principle of least surprise.
240 
241 @lisp
242 (require 'ffs)
243 
244 ;; You can add a global key binding for enabling `ffs-mode'.
245 
246 (global-set-key (kbd "C-c f s") #'ffs-mode)
247 
248 ;; These user options apply when `ffs-present-mode' is enabled.
249 ;; Their value is buffer-local.
250 
251 (setq-default
252  ffs-hide-cursor t
253  ffs-hide-mode-line t
254  ffs-hide-header-line t)
255 
256 ;; You can add hooks to `ffs-mode-hook' or `ffs-present-mode-hook' for
257 ;; hooks that are run every time `ffs-mode' or `ffs-present-mode' are
258 ;; enabled and disabled.
259 
260 ;; The following sample hook is run when `ffs-present-mode' is enabled
261 ;; and it disables `flyspell-mode', `show-paren-local-mode', and
262 ;; `display-fill-column-indicator-mode', and re-enables them when
263 ;; `ffs-present-mode' is disabled, to prevent visual distractions
264 ;; from them during presentations.
265 
266 (add-hook
267  'ffs-present-mode-hook
268  (lambda ()
269    (let ((arg (if ffs-present-mode -1 1)))
270      (mapc
271       (lambda (mode) (funcall mode arg))
272       '(flyspell-mode
273         show-paren-local-mode
274         display-fill-column-indicator-mode)))))
275 
276 ;; You can also add keys to `ffs-mode-map' for use when `ffs-mode' is
277 ;; enabled.  For keys that may be only relevant during presentations,
278 ;; you can add them to `ffs-present-mode-map'.
279 @end lisp
280 
281 @node Default key bindings
282 @chapter Default key bindings
283 
284 This section documents the default key bindings of the various keymaps
285 of @code{ffs}.  Care was taken to choose intuitive mnemonic-based keys
286 for commands familiar from other existing similar keymaps, but you may
287 override them if you so choose to.
288 
289 @menu
290 * @code{ffs-mode-map}::
291 * @code{ffs-present-mode-map}::
292 * @code{ffs-toggle-prefix-map}::
293 * @code{ffs-edit-mode-map}::
294 @end menu
295 
296 @node @code{ffs-mode-map}
297 @section @code{ffs-mode-map}
298 
299 The @code{ffs-mode-map} is the main keymap of @code{ffs-mode}, used
300 both when preparing slides with @code{ffs-mode} enabled as well as
301 while presenting them with @code{ffs-present-mode} enabled:
302 
303 @multitable {@code{ffs-find-speaker-notes-file}} {@kbd{C-_}, @kbd{C-/}, @kbd{C-x u}}
304 @headitem Command
305 @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 multitable
337 
338 @node @code{ffs-present-mode-map}
339 @section @code{ffs-present-mode-map}
340 
341 The @code{ffs-present-mode-map} keymap used when
342 @code{ffs-present-mode} is active (during presentations)
343 inherits the key bindings of its parent keymap
344 @code{ffs-mode-map}, with the following changes:
345 
346 @multitable {@code{ffs-stop-or-quit}} {Key binding(s)}
347 @headitem Command
348 @tab Key binding(s)
349 @item @code{ffs-stop-or-quit}
350 @tab @kbd{s}
351 @end multitable
352 
353 @node @code{ffs-toggle-prefix-map}
354 @section @code{ffs-toggle-prefix-map}
355 
356 The @code{ffs-toggle-prefix-map} keymap, by default bound to @kbd{t}
357 in @code{ffs-mode-map}, maps the following commands:
358 
359 @multitable {@code{ffs-toggle-hide-header-line}} {Key binding(s)}
360 @headitem Command
361 @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 multitable
373 
374 @node @code{ffs-edit-mode-map}
375 @section @code{ffs-edit-mode-map}
376 
377 The @code{ffs-edit-mode-map} keymap for @code{ffs-edit-mode} is
378 used in @code{ffs-edit} buffers, when editing an existing slide
379 or inserting a new one:
380 
381 @multitable {@code{ffs-edit-discard}} {Key binding(s)}
382 @headitem Command
383 @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 multitable
389 
390 @node Acknowledgements
391 @chapter Acknowledgements
392 
393 @cindex Contributors
394 
395 @code{ffs} is meant to be a collective effort.  Every bit of help
396 matters and is greatly appreciated.
397 
398 @table @asis
399 @item Author/maintainer
400 Amin Bandali.
401 
402 @item Contributions to code or the manual
403 Protesilaos, Stefan Monnier.
404 
405 @item Ideas and/or user feedback
406 Protesilaos.
407 @end table
408 
409 @code{ffs} and its author owe a debt of gratitude to Protesilaos for
410 rounds of code review and feedback for improving and polishing the
411 package in preparation for submission to GNU ELPA@.  You can watch
412 videos of these sessions on the author's website:
413 
414 @itemize
415 @item
416 @uref{https://www.shemshak.org/~amin/ffs-code-review-prot.html,
417 FFS code review with Protesilaos}
418 @item
419 @uref{https://www.shemshak.org/~amin/ffs-emacs-ext-prot.html,
420 FFS code review and Emacs extensibility with Protesilaos}
421 @end itemize
422 
423 Further, inspiration for parts of @code{ffs}'s implementation was
424 gratefully drawn from Protesilaos's
425 @uref{https://protesilaos.com/emacs/logos, Logos} package for Emacs.
426 
427 @node GNU Free Documentation License
428 @appendix GNU Free Documentation License
429 
430 @cindex FDL, GNU Free Documentation License
431 
432 @include fdl.texi
433 
434 @node Indices
435 @chapter Indices
436 
437 @menu
438 * Function index::
439 * Variable index::
440 * Concept index::
441 @end menu
442 
443 @node Function index
444 @section Function index
445 
446 @printindex fn
447 
448 @node Variable index
449 @section Variable index
450 
451 @printindex vr
452 
453 @node Concept index
454 @section Concept index
455 
456 @printindex cp
457 
458 @bye