Emacs Carnival: Completion

*
planted: 28/02/2026last tended: 28/02/2026

The topic for the February 2026 Emacs Carnival is 'completion' - hosted by Sacha Chua.

Completion is a very interesting topic for me. As considering it made me realise that I've never actually really understood what it is or how it works in Emacs.

I use it all the time - it's everywhere in Emacs - I just don't much of a clue how it works behind the scenes. And I'm using it in the most basic way, I would assume.

I think partly this stems from using Emacs distributions (I use Spacemacs and Doom Emacs) where completion Just Works. So beyond the occasional tweak for a particular package (e.g. completion at point of roam links not working) I've never had to look behind the curtain.

But spend long enough in Spacemacs and you'll learn that something called helm is doing something for you related to completion, and maybe company is too, but you're not sure what does what and how or why.

And spend just a little bit of time in the Emacs community and you'll soon see talk of completion and mention of exciting and mysterious packages like ivy, vertico, consult, counsel, orderless, corfu, etc. And you'll feel confused… but intrigued.

The Spacemacs docs say:

Mastering your choice of completion system will make you a Spacemacs power user.

So this month's theme is a great learning experience for me.

Sacha's post already started things off with some useful distinction and definitions of the two types of completion in Emacs:

minibuffer completion, which happens in the small window at the bottom of the screen whenever you use M-x, find a file, etc.

in-buffer completion, like when you expand an abbreviation, insert a snippet, or fill in the rest of a variable name.

1. Mini-buffer completion

This is when you want to do something in Emacs, and doing that something involves choosing specifically what you want to do or do it on. You run the command, then you get a list of options to apply the command to. I get a nice vertical list and I can type and narrow them down and choose one. (I believe you can have horizontal lists if you like. But vertical works for me).

I would say that I use this most often for:

  • SPC SPC i.e. M-x for running a command
  • SPC f f for finding a file
  • SPC b b for finding a buffer
  • SPC p b for finding a buffer in the current project
  • SPC / for finding some instance of text in the current project
  • SPC a o / for finding an item in my org files
  • , r f / , r i for finding/inserting a node in org-roam

The default layer for completion in Spacemacs is Helm. I use these commands A LOT. Ergo, I use Helm a lot.

In fact, if I run describe-key on those I see what's happening when I run them:

  • SPC SPC: spacemacs/helm-M-x-fuzzy-matching
  • SPC f f: lazy-helm/spacemacs/helm-find-files
  • SPC b b: lazy-helm/helm-mini
  • SPC p b: helm-projectile-switch-to-buffer
  • SPC /: spacemacs/helm-project-smart-do-search
  • SPC a o /: helm-org-rifle
  • , r f / , r i: org-roam-node-find and org-roam-node-insert

So bar the org-roam ones, they all have Helm specific functions. It's doing a lot of heavy lifting!

What I don't know is how any of this actually works. I've never really needed to, as it just does.

To my understanding there's a bunch of different parts to completion:

  • deciding what needs completing and providing the list;
  • figuring out how to filter that list down based on user input;
  • displaying the list

Helm does all of that. But you can mix and match different things at those different layers. Spacemacs also has Ivy and Compleseus layers, but I've never tried them. Doom I believe defaults to a combo of Vertico/Consult/Embark/Marginalia/Orderless - which, interestingly, looks very similar to the Compleseus layer.

What I don't know is what switching away from Helm to something else would gain me. Like I say, it seems to just kind of work right now… but maybe it could be working better?

An interesting next step would be to try the Compleseus layer and see what happens.

2. In-buffer completion

I don't use in-buffer completion as much as minibuffer completion. I don't code as much as I used to, which seems like one of the likeliest places for this kind of completion. I did set up completion-at-point once for org-roam and it's quite helpful.

Now, here Spacemacs seems to use these out-of-the-box:

  • company/auto-complete
  • yasnippet
  • hippie-expand

3. Conclusion

There's a lot to discover when it comes to completion! I think I'm a bit spoilt by the distributions having set up much of it nicely for me already. It's good to have taken a bit of a dive into it to know a bit more about what is doing what behind the scenes - I'll know where to look if I ever want to change something or if something breaks.

4. Elsewhere

4.1. In my garden

Notes that link to this note (AKA backlinks).

4.3. Mentions

Recent changes. Source. Peer Production License.