2023-01-30 The benefits of everything being a buffer

For today I only have a very short tip – or maybe let’s call it an anecdote. (This is not because I didn’t have time for writing last week. Quite the opposite – I’ve been working very hard on one of the projects I mentioned in my 2023 planning post. I think I’ll be able to share some details next week.)

Anyway, back onto the topic. As all Emacs users probably know, one of the very basic Emacs concepts is the buffer. A few days ago I encountered an (admittedly, not very common) situation when this came in very handy.

I had a file whose name contained a few words. However, one of these words was notoriously difficult to spell correctly, and I was fairly sure I misspelled it. (Spoiler: I was right.) In any “traditional” file manager I would check the spelling somewhere, invoke the “file rename” feature and correct the word manually (maybe pasting the correct spelling from the spell checking application). But this is Emacs, the file manager (Dired) is just a buffer, so why not run the spell-checker directly there? I pressed C-x C-q to activate Wdired, then M-$ to spell-check at point, I chose the correct spelling and pressed C-c C-c to “commit” the filename change to the filesystem.

I admit that this is not something you’d use very often. But it’s so cool, and if you need it, it’s there. The very tight integration between Emacs subsystems (here, (W)dired and spell-check) is unparalleled – I haven’t heard of any other OS allowing this. Have you got any other examples of unexpected synergies between various Emacs “apps”?

CategoryEnglish, CategoryBlog, CategoryEmacs