I have used emacs for ~20 years (currently using spacemacs). Although I am very familiar with it, I have never really plumbed its depths. My "under the hood" usage of emacs does not go much beyond writing a few lines for a function to do some very specific thing I want in my editor. I would say I am one of those emacs users who principally uses emacs not because of its power, but because of its dependability. I know that emacs will quickly (a few years at most) get every feature in every editor that survives the test of time. However, more importantly to me, while all those editors will likely be discarded as people lose interest, emacs will keep plodding on. The Lindy effect applied to editors.
With that said, I am not uninterested in getting better at emacs; I am just lazy! I recently hit upon the idea of embedding an LLM in my emacs. Giving an LLM access to my emacs allows the LLM itself to do two things that are kind of neat.
- It can literally look at open buffers and variables in my actual emacs session (really, anything accessible within emacs lisp).
- It can execute elisp code in my running editor.
Getting this working was surprisingly easy. I basically just spun up a VM and cloned spacemacs within it. I then copied my own .spacemacs file into said VM. I then ssh into the VM with Claude Code and instruct Claude to start emacs with (emacs-server). On a second terminal, I ssh into the VM myself and connect to the (emacs-server) with emacsclient.
And we are done! I now have an emacs instance that Claude can fully inspect and interact with as I use it.
The first thing I did with my new (and very patient) friend was figure out exactly why I was seeing certain warnings and errors when starting emacs. These obviously were not breaking bugs, as I just ignored them previously. But it was really illuminating to have a very knowledgeable but unhurried guide to help me debug the problems. I'm not sure what I'll do next with it, but I think editors like emacs that are almost entirely introspectable will have somewhat of an advantage in an LLM assisted world.