By far the most useful weapon in my Emacs efficiency arsenal is abo-abo’s Ivy library and associated utilities. Everything from simple string searches with swiper
to finding files with counsel-M-x
is easier and faster than before. Therefore, when abo-abo suggests a way of improving efficiency, I pay close attention.
In a recent blog post, abo-abo writes about extending completion-at-point for Org mode. It turns out that there is a general purpose command, complete-symbol
(bound to Ctrl+Meta+i by default), that will complete the symbol at point depending on context. To do this you need a function that completes symbols in the current major mode. Some modes, like Elisp mode, have functions provided by default but, sadly, Org mode does not have any predefined.
Abo-abo’s post provides three functions that ease his workflow. The first completes ASCII marked-up symbols like this
. The second takes care of completing file names and the third handles references. These functions are all pretty simple and offer excellent go-bys if you want to write one to optimize your work flow.
This is a great post and definitely worth the 5 minutes of your time that it will take to read it.