RSS Amplifier

Martin's Blog · Aug 1, 2025

Nano-modeline

0
Sign in to vote or save

Martin Stemplinger · Martin's Blog

Nicolas P. Rougier has created numerous packages that give Emacs a nice clean appearance. After using his theme and some other parts of it for a while I decided to go back to the modus theme but still wanted to keep using the nano-modeline. He has shared on Reddit a while back that he performed a rewrite of it so that’s what I wanted to use.

I couldn’t find documentation for the rewrite beyond the source code and I found a few issues. The following configuration works for me in case it’s useful for others. Like most of my Emacs configuration it uses the use-package macro.

(use-package nano-modeline
  :vc (:url "https://github.com/rougier/nano-modeline"
            :rev :newest
            :branch "rewrite")
  :demand t
  :config
  (nano-modeline nano-modeline-format-default 'header t))

For the installation I use the new :vc keyword. Initially I just used the :branch keyword to get the new rewrite branch but for strange reasons that downloaded a version which required nano-theme which I didn’t want to use. I got rid of that by specifying the :rev keyword. Of course this risks breaking changes but these should be easy to fix.

I need the :demand t since I want the modeline directly after the start of Emacs.

As per the documentation I first only added (nano-modeline nil t) but that didn’t turn on the modeline. It only showed up once I manually called nano-modeline. Looking at the code I saw that nano-modeline now takes three optional parameters: the format, the position and a flag to use it as a default. After adding the format and position explicitly it works as expected and looks nice ☺️.

Read the original on mstempl.netlify.app

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.