Emacs: logos version 1.0.0
The logos package provides a simple approach to setting up a “focus
mode”. It uses the page-delimiter or the outline together with some
commands to move between pages whether narrowing is in effect or not.
It also provides some optional aesthetic tweaks which come into effect
when the buffer-local logos-focus-mode is enabled. The manual shows
how to extend the code to achieve the desired result.
Watch the demo of the original version of
logos.el
(all my relevant videos since early 2022 use logos).
- Package name (GNU ELPA):
logos - Official manual: https://protesilaos.com/emacs/logos
- Change log: https://protesilaos.com/emacs/logos-changelog
- Git repo on SourceHut: https://git.sr.ht/~protesilaos/logos
- Mirrors:
- Mailing list: https://lists.sr.ht/~protesilaos/logos
- Backronyms:
^LOnly Generates Ostensible Slides; Logos Optionally Goes through Outline Sections
Below are the release notes.
-
Revised the fallback condition of the user option
logos-outline-regexp-alist(it comes into effect when thelogos-outlines-are-pagesis non-nil).The previous value did not account for the buffer-local values of
outline-regexporpage-delimiter, nor did it adapt to any changes in their respective values. Instead, it would capture whatever the value was at the time of the symbol’s declaration.We remove the
tcondition altogether and instead handle the fallback value internally. Logos will return the current buffer-local value ofoutline-regexporpage-delimiter, in this order of priority.Put simply, this has the same intent as before, but works properly.
-
Introduced a check to guard against a void
outline-regexp. The previous value would cause a problem if theoutline-regexphad not been set yet. In a typical Emacs session, even on ‘emacs -Q’, theoutline-regexpis set in the scratch buffer, so we have a valid value at the outset. However, when the user changes theinitial-buffer-choiceor opens Emacs directly for a given file, theoutline-regexpcan be void.Thanks to Xiaoduan for informing me about this error and for testing my code on how to fix it. This was done via a private channel and is shared with permission.
-
Implemented the user option
logos-hide-cursor. It hides the cursor whenlogos-focus-modeis enabled. Note that this user option is always buffer-local. Usesetq-defaultto set its default global value (same as with other user options that apply tologos-focus-mode(read the manual)).Thanks to Marcel Ventosa for suggesting the idea of hiding the cursor. This was done via a private channel and is shared with permission.
-
Clarified the documentation of
logos-focus-mode-extra-functions. It is intended for use by those who are prepared to write custom functions in the spirit of those already used inlogos.elto affect the buffer whenlogos-focus-modeis enabled. -
Added the missing autoload cookie to
logos-focus-mode. This means that it shows up in the completion candidates ofM-xeven if thelogoslibrary has not been called viarequire.