a cautionary tale on modelines and on updating your emacs config

Table of Contents

I recently began having major problems with emacs, including my emacs freezing for significant amounts of time and my exwm windows requiring a repeated command to share focus: one for emacs to think it was focusing there, and another for exwm to move its focus. It never occurred to me that they were related, and efforts to sort them out went to a recent juncture in which I’d both performed a rolling-system upgrade (3000+ packages and Linux kernel upgraded) and also some major upgrades to my emacs config.1 All the while my work-flow was debillitatingly riddled with system hang-ups I was having trouble debug. Finally I decided to take a break from the big fight and address an issue that had been popping up errors in my emacs Messages for a while: something about an error because my modeline code included an unused section that was referring to a dependency I no longer provided. I had ignored it because my modeline seemed looked great and I wasn’t having any issues with it. Finally, hitting yet another dead-end through heavy trudging to improve on my system’s big issues, I took a quick break to resolve this little, meaningless issue.

You can guess where this story is going. It turns out that invisible error was stacking up hundreds of error messages because it was triggered both whenever I changed windows (causing the gap and redundancy with exwm) and at the navbars own self-updating cycle several times per second. Over time it got worse and worse, causing unexpected errors elsewhere. Upon fixing it, my emacs became as snappy as I’d forgotten it had ever been, and those disparate errors of screen-switching and periodic freezing went away. So, lessons learned:

  • Second, don’t forget to be complete in your refactoring efforts; don’t leave something half-done.
  • Third, in Emacs modelines are pretty crucial. They are capable of brining your system down – something I’d learned with Doom Modeline previously2, and learned again here.

Footnotes

1 Principle one: don’t perform major system changes on multiple fronts at once. It’s stupid, for reasons here discussed.

2 Doom mode-line issues and more: reddit discussion

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist