Emacs carnival: Mistakes and misconceptions
My mistake
Last month's Emacs carnival was on completion. There were some fantastic posts. Many discussed completion mechanisms for the mini-buffer and some dealt with in-buffer completion. I have been using the former very happily for a long time now and I've settled on the combination of vertico, orderless, and marginalia packages.
This happiness, and the prevalence of auto-correct and auto-complete on mobile phones, mistakenly led me to believe that I needed completion for writing, i.e. in-buffer completion. Total mistake! I've spent so many hours over the years trying to get any of the various features and/or packages available to work for me. I've looked at, amongst others, dabbrev, hippie-expand, corfu, and company mode. They all work to some extent but my use of them has never been satisfactory. In most cases, they introduce friction by needing me to stop in my flow to consider options given. Often the options provided are not what I want. Even when they are, and there is no intolerable friction, I usually find it faster to type the full word than use the completion mechanism.
My alternative
Most of my writing, not including email and toots, is prose.1 My solution is to avoid completion but make use of two key features available out of the box in Emacs: the abbrev and flyspell modes.
- abbrev mode
- I have been using
abbrevmode for years, decades actually. Whenever I use any other editor, this is arguably one of the features I miss the most. I have a small number of abbreviations for long words that appear often, especially in writing technical prose, words such as optimization, algorithm, and distillation, just to give some examples. Using abbreviations speed up my writing significantly and it is very easy to create new ones. Rahul Martim Juliato has an excellent blog post onabbrevmode. - flyspell mode
- For words that I do not use that often but which are either long or which challenge me in spelling (whether in English or Spanish as I write in both languages),
flyspellcomes to the rescue. I simply keep typing and, when there is a natural pause in my writing, I look back to see if I misspelled any words. A simple keystroke away isflyspell-auto-correct-previous-wordand almost always the word I misspelled is corrected properly.
Conclusions
Sometimes, what seems to be an obvious requirement (the need for completion for prose) is not necessarily what is really needed. Emacs has so many features, either built-in such as abbrev and flyspell or external2 packages, that there is always some combination of these that meets your or my needs perfectly. And, if not, you can always write your own code in Emacs Lisp…
Blog navigation
| Previous post | Blog | Next post |
|---|---|---|
| Emacs carnival: Ode to org Babel | Index | None (yet!) |
You can find me on Mastodon or you can email me should you wish to comment on this entry or the whole blog.