GNU ELPA - logos

logos Atom Feed

Description
Simple focus mode and extras
Latest
logos-1.2.0.tar (.sig), 2024-Sep-03, 150 KiB
Maintainer
Protesilaos Stavrou <info@protesilaos.com>
Website
https://github.com/protesilaos/logos
Browse ELPA's repository
CGit or Gitweb
Badge
Manual
logos

To install this package from Emacs, use package-install or list-packages.

Full description

Logos (logos.el)

This package provides a simple approach to setting up a "focus mode" for Emacs. It uses the page-delimiter (typically the ^L character) or the outline-regexp together with some commands to move between pages whether narrowing is in effect or not. It also provides some optional stylistic 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.

Old versions

logos-1.1.1.tar.lz2024-Mar-3129.9 KiB
logos-1.1.0.tar.lz2023-Jun-2029.8 KiB
logos-1.0.1.tar.lz2022-Oct-1930.8 KiB
logos-0.5.1.tar.lz2022-Sep-2029.9 KiB
logos-0.5.0.tar.lz2022-Sep-0129.6 KiB
logos-0.4.0.tar.lz2022-Jun-0218.9 KiB
logos-0.3.2.tar.lz2022-Apr-2217.4 KiB
logos-0.3.1.tar.lz2022-Apr-0717.4 KiB
logos-0.3.0.tar.lz2022-Mar-3017.4 KiB
logos-0.2.0.tar.lz2022-Mar-1716.5 KiB
logos-0.1.2.tar.lz2022-Mar-1114.9 KiB

News

The newest release is at the top. For further details, please consult the manual: https://protesilaos.com/emacs/logos.

Table of Contents

Version 1.2.0 on 2024-09-03

This version introduces minor refinements to an already stable package.

The logos-update-fringe-in-buffers works with enable-theme-functions

It is possible to hide the fringes when logos-focus-mode is enabled by setting the user option logos-hide-fringe to a non-nil value. To make sure that the proper colours are applied when the theme changes, users must also set up the logos-update-fringe-in-buffers to run after the theme is loaded.

In versions of Emacs before 29 there was no standard way to do this (my themes (Modus, Ef, Standard) have always had the relevant "post load" hook). With Emacs 29, users can now use the enable-theme-functions to make this work with all themes:

(add-hook 'enable-theme-functions #'logos-update-fringe-in-buffers)

New logos-hide-header-line user option for logos-focus-mode

Users can now optionally hide the header-line when logos-focus-mode is enabled in the current buffer. This is done by setting logos-hide-header-line to a non-nil value and then enabling the mode.

[ Remember to read the manual for all such options. ]

Documented how to conditionally toggle org-indent-mode

The logos-focus-mode operates in the current buffer to make the changes that are needed for a more "focused" editing experience. Here we extend it to work with Org's virtual indentation.

It disables org-indent-mode when logos-focus-mode is enabled and restores it when logos-focus-mode is disabled. The logos-set-mode-arg function takes care of the technicalities.

(defun my-logos-org-indent ()
  (when logos-focus-mode
    (logos-set-mode-arg 'org-indent-mode -1)))

(add-hook 'logos-focus-mode-hook #'my-logos-org-indent)

Documented how to toggle the menu-bar, tool-bar, tab-bar, and tab-line

Continuing from above, the following code block below shows how to disable the menu-bar-mode, tool-bar-mode, tab-bar-mode, and tab-line-mode when logos-focus-mode is enabled. If the given mode is already disabled, the corresponding function does nothing. Otherwise, it toggles the mode off/on when logos-focus-mode is enabled/disabled.

(defun my-logos-hide-menu-bar ()
  (when logos-focus-mode
    (logos-set-mode-arg 'menu-bar-mode -1)))

(add-hook 'logos-focus-mode-hook #'my-logos-hide-menu-bar)

;; Assuming the `tool-bar-mode' is enabled by default...
(defun my-logos-hide-tool-bar ()
  (when logos-focus-mode
    (logos-set-mode-arg 'tool-bar-mode -1)))

(add-hook 'logos-focus-mode-hook #'my-logos-hide-tool-bar)

;; Assuming the `tab-bar-mode' is enabled by default...
(defun my-logos-hide-tab-bar ()
  (when logos-focus-mode
    (logos-set-mode-arg 'tab-bar-mode -1)))

(add-hook 'logos-focus-mode-hook #'my-logos-hide-tab-bar)

;; Assuming the `tab-line-mode' is enabled by default...
(defun my-logos-hide-tab-line ()
  (when logos-focus-mode
    (logos-set-mode-arg 'tab-line-mode -1)))

(add-hook 'logos-focus-mode-hook #'my-logos-hide-tab-line)

Fixed a malformed cond

This was affecting the logos-narrow-dwim function in some cases. Thanks to Edgar Vincent for the contribution, which happened in the … …