Published 2024-08-21
tag(s): #emacs #programming
Content warning: some hyperbole in this post.
It isn't the first time I try Emacs without minibuffer completion, as I continue my
exploration of vanilla Emacs and built-in behaviours [1].
That's what I am running since yesterday afternoon, and it started as annoying as any other
time that I tried it. But something dawned on me yesterday, which prompted this post...
The idea of reducing distractions and bling came around one of the times I moved
between lsp-mode and eglot. I forgot to
disable the lsp-ui
features. My buffer was littered with breadcrumbs, squiggly
lines, code previews, and all sorts of hints. Which gives Emacs a semblance of what VS Code
does by default, and I am grateful it exists, because it is the expectation of a lot of
developers nowadays.[2]
That time though, after a couple days, I went back to the more minimal eglot :)
I dropped Company quite some time ago, which is interesting coming from someone that used Visual Studio for so many years. To think that I would want to write software without "Intellisense" at some point later in my journey as developer is...surprising?
When I removed it, my line of thinking was that I wanted a more focused typing experience. Less popups, annotations, or intrusions of any kind. Just me and the text. There is an eval/compilation step to deal with syntax errors or typos.C-M-i
to get completion on the exact spelling of any
variable[3], library functions, etc.
And it worked! I got used to asking for completion explicitly, and I also started typing more
without waiting for confirmation that what I was writing was 100% correct.
Honestly, in many cases it was correct, and letting go of the constant reassurance from the
popup was more difficult than I would like to admit.
But let's say I mixed up the name of a function, I would still go back and correct it...later. I didn't lose my train of thought over the exact name of some method, or get distracted over why the name wasn't auto-completed.
The last minibuffer completion framework I used (am using?) is fido-mode
, which
promised to behave like my very first completion companion, IDO. It kinda did. Apparently it
is very slow, but to be honest, I noticed this just a couple times. Usually it would Just
Work.
I was about give Prot's mct.el a try, just when he announced that he wasn't developing it anymore (he eventually did go back to maintain it). Around that time too I saw an excellent post about enhancements to Emacs' default completion, some of them prompted by mct, and figured, why not give it a try?
And it was so annoying. And I did try again at least two other separate times. Switching buffers, selecting files, even pick a command is somewhat cumbersome when you don't have the list of candidates filtering as-you-type.
Now we get to the hyperbolic and esoteric part of the post :)
All these tools are part confirmation, part saving of us of extra typing. But...why? I am not the fastest typer ever, but I do get a good 65~80 wpm in most tests. Is typing really getting in the way of my productivity? The confirmation that something is correct is maybe more understandable, but saving a few keystrokes...?
What I figured yesterday, is that doing away with completions changes the order of things completely, for example, I want to switch buffers with fido/icomplete:
C-x b
and get the list.
C-x b
and get...and empty prompt
C-i
to narrow down the input, if it wasn't complete, and hit EnterC-i
twice, to get the *Completions*
buffer, and then I can type more and narrow it down.
Think about what I need. Rather than visually search in the
list. The same applies to navigating directories, calling commands, SQL connections declared
in my config, and server names. The first step is to recall something, rather than scrolling
in a list.
And looking at my current (and past) annoyance with disabling minibuffer completion, I am
beginning to believe it was because of this hurdle: I need to change my ways, add that little
pause before I take an action. But that is not a bad thing, maybe?
Lately I've looking at some people working, my boss in particular, and noticed that he just remembers things: commands, server names, directories. I have quite good memory, as my #useless-facts tag attests[4], but I am taking a lot longer to internalize some of these - except maybe the few ones I use more regularly.
And my hypothesis of why I am not internalizing things, is that I am not giving myself a
chance to do it, because the tooling is helping too much. Giving me the opportunity to
visually search for an item doesn't promote a "think and recall" step, because I am quick
with my fingers to get to the list.
This is equivalent to going back in shell history for a command, and realizing that you could
have just typed it again instead of getting lost in a list.
Am I reading too much into my stubbornness to stick with the default completion? Am I hurting
myself by not using a tool to simplify things, in search of some promised Emacs vanilla
land?
There's only way one way to know. If in two days I make another post saying "Today I enabled
fido again", we'll have our answer :)
dabbrev-expand
takes care of this faster than LSP.