logos

Homepage: https://git.sr.ht/~protesilaos/logos

Author: Protesilaos Stavrou

Updated:

Summary

Simple focus mode and extras

Commentary

This package provides a simple "focus mode" which can be applied to any
buffer for reading, writing, or even doing a presentation.  The buffer
can be divided in pages using the `page-delimiter', outline structure,
or any other pattern.  Commands are provided to move between those
pages.  These motions work even when narrowing is in effect (and they
preserve it).  `logos.el' is designed to be simple by default and easy
to extend.  This manual provides concrete examples to that end.

What constitutes a page delimiter is determined by the user options
`logos-outlines-are-pages' and `logos-outline-regexp-alist'.  By
default, this only corresponds to the `^L' character (which can be
inserted using the standard keys with `C-q C-l').

Logos does not define any key bindings.  Try something like this, if you
want:

    (let ((map global-map))
      (define-key map [remap narrow-to-region] #'logos-narrow-dwim)
      (define-key map [remap forward-page] #'logos-forward-page-dwim)
      (define-key map [remap backward-page] #'logos-backward-page-dwim))

On standard Emacs, those key bindings are: `C-x n n', `C-x ]', `C-x ['.
The `logos-narrow-dwim' is not necessary for users who already know how
to narrow effectively.  Such users may still want to bind it to a key.

For users running Emacs version 28 or higher, Logos defines the
`logos-repeat-map' which is activated when `repeat-mode' is enabled.
This means that page motions, `C-x ]' and `C-x [', can be repeated by
following them up with `]' and `[', respectively.  The repetition stops
when another command is invoked.

Logos provides some optional aesthetic tweaks which come into effect
when the buffer-local `logos-focus-mode' is enabled.  These will hide
the mode line (`logos-hide-mode-line'), disable the buffer boundary
indicators (`indicate-buffer-boundaries'), enable `scroll-lock-mode'
(`logos-scroll-lock'), use `variable-pitch-mode' in non-programming
buffers (`logos-variable-pitch'), make the buffer read-only
(`logos-buffer-read-only'), center the buffer in its window if the
`olivetti' package is installed (`logos-olivetti'), and hide the
`fringe' face (`logos-hide-fringe').  All these variables are
buffer-local.

Furthermore, the `logos-focus-mode' establishes a bespoke keymap, which
can be used to, for example, bind the arrow keys to page motions.  The
keymap is `logos-focus-mode-map' and is empty by default (we do not
define any keys and trust the user to pick their own).

Logos is the familiar word derived from Greek (watch my presentation on
philosophy about Cosmos, Logos, and the living universe:
),
though it also stands for these two perhaps equally insightful
backronyms about the mechanics of this package:

1. `^L' Only Generates Ostensible Slides
2. Logos Optionally Garners Outline Sections


Consult the manual for all sorts of tweaks and extras:
.

Dependencies