Emacs: Lin version 2.0.0

Lin is a stylistic enhancement for Emacs’ built-in hl-line-mode. It remaps the hl-line face (or equivalent) buffer-locally to a style that is optimal for major modes where line selection is the primary mode of interaction.

The idea is that hl-line-mode cannot work equally well for contexts with competing priorities: (i) line selection, or (ii) simple line highlight. In the former case, the current line needs to be made prominent because it carries a specific meaning of some significance in the given context: the user has to select a line. Whereas in the latter case, the primary mode of interaction does not revolve around the line highlight itself: it may be because the focus is on editing text or reading through the buffer’s contents, so the current line highlight is more of a reminder of the point’s location on the vertical axis.

Below are the release notes


Version 2.0.0 on 2026-02-12

This is the first tagged release since 2024-08-05. The package is in a stable state: it does everything it is meant to. This version makes some small refinements, mostly in how parts of the code are written. Though there also are some nice user-facing changes:

  • The lin-gnome-accent-color-mode synchronises the accent colour of the GNOME desktop environment with Lin’ own lin-face. This happens live, so any buffers that are already using the lin-mode (directly or via lin-global-mode) will get the updated colour.

  • The user option lin-gnome-accent-color-override-foreground controls whether the faces that correspond to GNOME accent colours should override the underlying text colour or not. This is useful for improved colour contrast. The default is to not override the foreground. Setting lin-gnome-accent-color-override-foreground to non-nil changes that so, for example, the lin-face will be set to lin-red-override-fg instead of lin-red (of course, faces can be modified by users/themes to override the foreground anyway, so this is about the default behaviour).

  • New faces to style the current line when lin-mode is enabled include lin-purple, lin-orange, and lin-slate. Those do not override the underlying foreground colours by default. Whereas lin-purple-override-fg, lin-orange-override-fg, and lin-slate-override-fg apply their background while also setting the foreground (remember that you always control which face to use by changing the user option lin-face).

  • The lin-global-mode skips all private buffers. These are buffers that users normally do not interact with directly. Their names are prefixed with a space and, by default, are hidden from the view of switch-to-buffer and related commands.

  • The default value of the user option lin-mode-hooks now includes the world-clock-mode-hook and xref--xref-buffer-mode-hook. The former relates to the command world-clock, while the latter is used by any command that produces Grep-like results via the built-in Xref infrastructure (for example, my Denote package does that for a few of its commands). The lin-mode-hooks is a list of hooks for major modes that should use the Lin style for the selection line highlight.