gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNU ELPA] Cursory version 1.1.0


From: ELPA update
Subject: [GNU ELPA] Cursory version 1.1.0
Date: Sat, 14 Sep 2024 05:03:26 -0400

Version 1.1.0 of package Cursory has just been released in GNU ELPA.
You can now find it in M-x list-packages RET.

Cursory describes itself as:

  ==================================
  Manage cursor styles using presets
  ==================================

More at https://elpa.gnu.org/packages/cursory.html

## Summary:

              ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
               CURSORY.EL: MANAGE CURSOR STYLES USING PRESETS

                            Protesilaos Stavrou
                            info@protesilaos.com
              ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


  This manual, written by Protesilaos Stavrou, describes the customization
  options for `cursory' (or `cursory.el'), and provides every other piece
  of information pertinent to it.

  The documentation furnished herein corresponds to stable version 1.1.0,
  released on 2024-09-14.  Any reference to a newer feature which does not
  yet form part of the latest tagged commit, is explicitly marked as such.

  Current development target is 1.2.0-dev.

## Recent NEWS:

                       ━━━━━━━━━━━━━━━━━━━━━━━━━━
                        CHANGE LOG OF CURSORY.EL

                          Protesilaos Stavrou
                          info@protesilaos.com
                       ━━━━━━━━━━━━━━━━━━━━━━━━━━


This document contains the release notes for each tagged commit on the
project’s main git repository: <https://github.com/protesilaos/cursory>.

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

Table of Contents
─────────────────

1. Version 1.1.0 on 2024-09-14
2. Version 1.0.0 on 2023-06-09


1 Version 1.1.0 on 2024-09-14
═════════════════════════════

  Cursory is in a stable state. This version includes quality-of-life
  refinements.


1.1 The `cursory-mode' simplifies how the state is stored
─────────────────────────────────────────────────────────

  Cursory has functions to store and restore its state. In previous
  versions, we would document how to use those by adding them to the
  relevant hooks. This approach still works, though we now provide an
  easier way to achieve the same result: just enable the `cursory-mode'.

  Technically, all this does is to set the hooks if enabled, and unsets
  them if disabled.

  The “restore” phase is the same as before. For example:

  ┌────
  │ ;; Set last preset, if available, or fall back to the `bar' preset
  │ ;; from the `cursory-presets'.
  │ (cursory-set-preset (or (cursory-restore-latest-preset) 'bar))
  └────


1.2 Use the `cursory-set-preset-hook'
─────────────────────────────────────

  The `cursory-set-preset-hook' is a normal hook (where functions are
  invoked without any arguments), which is called after the command
  `cursory-set-preset'. Here are some ideas on how to use it:

  ┌────
  │ ;; Imagine you have a preset where you want minimal cursor styles.
  │ ;; You call this `focus' and want when you switch to it to change the
  │ ;; cursor color.
  │ (defun my-cursory-change-color ()
  │ "Change to a subtle color when the `focus' Cursory preset is selected."
  │   (if (eq cursory-last-selected-preset 'focus)
  │       (set-face-background 'cursor "#999999")
  │     (face-spec-recalc 'cursor nil)))
  │ 
  │ ;; Here we just show how to disable a given mode.  Of course, we can
  │ ;; have something more sophisticated, which stores the last value and
  │ ;; restores it if the condition we are testing for here is not met.
  │ ;; Keeping it simple for now.
  │ (defun my-cursory-change-color-disable-line-numbers ()
  │   "Disable line numbers if the Cursory preset is `presentation' or `focus'."
  │   (when (member cursory-last-selected-preset '(presentation focus))
  │     (display-line-numbers-mode -1)))
  └────

  I am happy to include more examples here, if users have any questions.


1.3 Miscellaneous
─────────────────

  • Fixed a dependency for older Emacs versions. The `subr-x', which is
    built into Emacs, needs to be explicitly loaded at compile time.
    This makes some parts of the code work as expected. Thanks to Mehdi
    Khawari for reporting the problem and Nicholas Vollmer for
    suggesting this change. The exchange took place in issue 1:
    <https://github.com/protesilaos/cursory/issues/1>. Users should
    already have this change, as I published a minor release for it
    (version `1.0.1').

  • Added some missing metadata to the manual. This is useful for the
    indices and COPYING section.

  • Updated the relevant links to the package sources. The main
    repository is now on GitHub.


2 Version 1.0.0 on 2023-06-09
═════════════════════════════

  Cursory has been in a stable state for a long time.  I use it daily
  and am happy with what it does.  This version refactors parts of the
  code in the interest of legibility/hackability, while providing a
  quality-of-life feature for users.


2.1 A preset can now inherit from another
─────────────────────────────────────────

  In the interest of defining multiple presets while avoiding
  duplication, the user option `cursory-presets' now accepts an …  …

reply via email to

[Prev in Thread] Current Thread [Next in Thread]