Emacs: pulsar version 1.4.0

This is a small Emacs package that automatically highlights the current line after certain functions are invoked. It can also highlight a line or region on demand. The idea is to make it easier to find where the point is, what was affected, and also to bring attention to something in a buffer. Watch the original demo (2022-03-14).

Below are the release notes.


Version 1.4.0 on 2026-07-22

This version fixes a few bugs and brings quality-of-life improvements to an already stable package.

Correctly pulse the full line even in M-x shell and related

In certain buffers, we cannot use regular motions to reach a portion of text. This is done by text properties that make the propertized text inaccessible. One use-case is to prevent the user from deleting the shell prompt in M-x shell.

Pulsar is now designed to handle inhibit-field-text-motion correctly so that it works as intended in all relevant cases.

Thanks to Jake Miles for telling me that the shell buffer was not pulsing, which made me investigate the underlying problem. This was done in issue 40: https://github.com/protesilaos/pulsar/issues/40.

The pulsing behaviour of Evil commands is more refined

In short:

  • editing commands should pulse the region, not the entire line;
  • evil-delete-char should not produce a pulse;
  • evil-delete-marks is not an editing command, as it removes invisible marks from the buffer.

Thanks to Steven Allen from modifying the relevant variables in pull request 39: https://github.com/protesilaos/pulsar/pull/39. Steven has assigned copyright to the Free Software Foundation.

Also thanks to Javier Pacheco for adding more Evil-related commands to the list, in pull requests 37 and 38:

The pulsar-face is no longer hardcoded in one case

It is always meant to be a variable, specifically a user option, meaning that we want to use its value as defined by the user.

Thanks to irisjae for reporting the bug in issue 36: https://github.com/protesilaos/pulsar/issues/36.

Pulsing is done correctly on the TTY and other frames

The technicalities are covered in issue 33: https://github.com/protesilaos/pulsar/issues/33. Thanks to the participation of Sébastien Delafond who provided feedback about their Emacs environment and helped me test the snippets I had provided.

In a TTY we cannot use what we normally do, so I arrange for a standard colour to be used instead. My rationale for the choice of colour is this:

  • we are in an environment which does not guarantee accurate colour reproduction;
  • it is almost a given that the frame supports at least 8 colours;
  • of those 8 colours we have black, red, green, yellow, blue, magenta, cyan, white;
  • excluding black and white, the colour that contrasts best against both black and white is red;
  • picking red means we do not need to know the background-mode of the frame, which saves us the extra computations.

The contrast table for the six colours, using Org, where Λ is an alias for modus-themes-contrast:

|         | #000000 | #ffffff |
|---------+---------+---------|
| #ff0000 |    5.25 |    4.00 |
| #00ff00 |   15.30 |    1.37 |
| #0000ff |    2.44 |    8.59 |
| #ffff00 |   19.56 |    1.07 |
| #ff00ff |    6.70 |    3.14 |
| #00ffff |   16.75 |    1.25 |
#+TBLFM: $2='(Λ $1 @1$2);%.2f :: $3='(Λ $1 @1$3);%.2f

Pulsing is consistent even when the Emacs daemon is involved

In short, things should work as intended in all sorts of configurations.

Thanks to Koloszár Gergely, Mehrad Mahmoudian, and Nikolaos Bezirgiannis for reporting that the Emacs daemon would produce static highlights instead of pulsing them in and out of effect. This was done in issue 32: https://github.com/protesilaos/pulsar/issues/32.

In this context, also thanks to Gautier Ponsinet for removing an unnecessary let binding. This was sent to me as a patch via email.

The ace-window command is added to the default value of pulsar-pulse-functions

This means that it will produce a pulse effect after it is invoked.