Emacs: lin version 1.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. In concrete terms: (i) let your theme use a subtle grey to highlight the current line in text-editing buffers like Org, and (ii) render the current line with a more prominent colour in Dired, Ibuffer, et cetera. Why? Because the two types of interaction have different requirements about how intensely the current line should be highlighted.

Below are the release notes.


  • Clarified the doc string of the user option lin-mode-hooks. This variable specifies the list of hooks that lin-global-mode will use to apply its effect. Lin enables hl-line-mode in the given buffer and remaps its face to the value of the lin-face user option.

  • Added pdf-outline-buffer-mode-hook (from the pdf-tools package) to the user option lin-mode-hooks. Thanks to Gautier Ponsinet for the patch which was sent to my personal email. The change is below the ~15 line threshold and thus requires no copyright assignment to the Free Software Foundation.

  • Named the mailing list address as the Maintainer: of Lin. Together with the other package headers, they help the user find our primary sources and/or communication channels. This change conforms with work being done upstream in package.el by Philip Kaludercic. I was informed about it here: https://lists.sr.ht/~protesilaos/general-issues/%3C875ykl84yi.fsf%40posteo.net%3E.

  • Made all user-facing variables specify the package version that introduced them or last affected their specification. This information is presented in Help buffers.

  • Configured the Lin group in Custom UI buffers to show a link to the package’s Info manual. Again, this helps the user find information about Lin.

  • Removed old forms that rendered obsolete certain functions or variables. This keeps the code base small and focused on the current feature set.

The switch to version 1.0.0 is mostly symbolic. Lin has been stable and feature-complete practically since its inception. This change shows that most (all?) of the work has been accomplished.


Sample configuration:

(require 'lin)

(setq lin-face 'lin-blue) ; check doc string for alternative styles

;; You can use this to live update the face:
;;
;; (customize-set-variable 'lin-face 'lin-green)

(setq lin-mode-hooks
      '(bongo-mode-hook
        dired-mode-hook
        elfeed-search-mode-hook
        git-rebase-mode-hook
        grep-mode-hook
        ibuffer-mode-hook
        ilist-mode-hook
        ledger-report-mode-hook
        log-view-mode-hook
        magit-log-mode-hook
        mu4e-headers-mode
        notmuch-search-mode-hook
        notmuch-tree-mode-hook
        occur-mode-hook
        org-agenda-mode-hook
        pdf-outline-buffer-mode-hook
        proced-mode-hook
        tabulated-list-mode-hook))

(lin-global-mode 1)