Emacs Windows Configuration Desired State

From Deliberation to Liberation (in the Minutia of My Tools)

I use Emacs 📖 for my text editing. I came to Emacs having used several other text editors; It was a very deliberate decision to adopt Emacs. See Revisiting the Principles of My Text Editor.

Because of my later journey into Emacs relative to all of the other software I’ve used, I’ve grown accustomed to many design decisions. In particular the window/pane/frame management. Emacs is older than all of the other “applications” I use.

This blog post is me setting out to think through and commit to resolving what has remained a somewhat confounding experience.

In a Reddit thread on /r/emacs someone asked a question that was in the same constellation of what had been rattling in my brain. Namely “how do you get Emacs to open a file in the current window?”

FrostyX to create the current-window-only package. Curious, I reviewed the code, installed it, and enabled it. It was close to what I wanted, but had overcompensated. True to the label, everything opened in one window.

The primary workflow that changed was related to Magit.

Prior to current-window-only, when I would commit a change, I had a split window. The top window was where I would write my commit message. The bottom window was where I’d see a magit diff buffer; useful for reviewing changes that were part of the commit.

After enabling current-window-only, when I would commit, two windows would open. The focus started on the magit diff window. I’d close that and then get to the commit buffer. My mind began rationalizing this as acceptable. In part because of some of the reflections and realizations I identified in Using the Git Interactive Staging as a Moment to Facilitate Synthesis.

There were other small alterations, most notable in the help functions. Again, all as advertised.

At the bottom of current-window-only package’s README was the following “See Also” section:

And I realized up until this point, I hadn’t sought to more deeply understand the configuration, but more importantly I hadn’t articulated my desired state. I intuited what I think I wanted based on prior applications. But with Emacs, I can go beyond other constraints.

In other words, by introducing current-window-only package I realized that I needed to correct that over-simplification, but needed to understand how.

I did a read through of Demystifying Emac’s Window Manager, which was helpful but wasn’t quite sticky. I then watched Protesilaos Stavrou (Prot 📖)’s Emacs: window rules and parameters. In working on this blog post, I just discovered that Prot is now offering private coaching on Emacs, Linux, and Life.

Prot’s video walk through of “here’s the code and here’s what’s changing in Emacs” helped equip me with the language and perspective for better configuring my windows and frames. All of Prot’s packages and presentations deliver a quality knowledge-sharing/learning experience. He provides ample context, wonderful examples, and commentary to help create robust, welcoming, and accessible documentation.

Well, How Did I Get Here?

During the early years of building my Emacs configuration, I used the shackle package to tame some of the behavior. I accepted the foibles of Emacs windows and frames as I added packages to get to a somewhat stable present state.

Put another way, early in my Emacs adoption I was experimenting with things like packages and key bindings. Then I moved into writing functions to further improve my text editing experience.

My present state is that I’m more comfortable with Emacs Lisp (elisp 📖). I have built out functions to improve my workflow. I still have a list of functions I’m considering, but I am in an observation mode to determine if this is where I want to spend time. I frame writing functions, much like writing blog posts, as a time for practice, reflection, and learning.

Which leads me to turning my attention to Emacs windows and frames. To take inventory of “default” behavior, determine if that’s adequate, and then adjust accordingly. The benefit of this kind of ownership is that as new situations arise, I’m prepared to address them.

Conclusion, or To Wax Philosophical

This relates to a passage I recall in Eric Brinde’s book Better Off; an reflective account of joining an Amish community and adopting their lifestyle.

One through line I recall is as follows: This community looked at each bit of technology and determine through deliberation if it is something to bring into their daily lives.

, at this point of deliberation, I am again thankful that my text editor of choice, the primary tool for my occupation and vocation, is free, open, and almost unimaginably configurable.

I also marvel at the word “deliberate” itself; especially in relation to “liberate”. Normally the prefix of “de” indicates the “reversal of.” I only have the liberty to change because I had the opportunity to deliberate.

Now, instead of writing about these changes, it’s time to sip some coffee and hack on my text editor.