Using Emacs More
As I have spent a couple of professional years working on Windows systems with .net code, I have slipped away from Emacs a little. Now that I’m back on Linux, it’s taking some time to re-acquaint myself with it.
There are some things I’ve never stopped doing, because they are really the best alternative around for these things, on any system:
- I use Emacs to write prose (and this website!)
- I use the rpn calculator in Emacs.
- I use Magit as my interface to git.
- I use the Emacs notmuch client for email.
If you have not tried the Emacs calculator or Magit, I strongly recommend giving it a shot. You don’t have to use Emacs for anything else, but these are really good and you don’t know what you’re missing. It costs very little to try.
Now I’ve slowly added back things I used to do in Emacs, and started doing new things as well. I recently wrote about running non-readline clis in Emacs, but I’m also
- Finding my way back to using Org mode to manage tasks. I have used a physical notebook for the past year or so, which I like a lot, but it’s also a hassle to have to bring it everywhere. My phone is automatically with me.
- Starting using Eshell more instead of a VT100 terminal emulator. This is nice for its Emacs integration. To help with this, I’ve also changed the global shortcut I have in my window manager such that it opens a new Eshell session instead of mlterm.
- At the same time, I took the opportunity to add a global shortcut that opens the Emacs calculator in a new window, for more convenient access.
- I also added an Emacs command that runs the q script on any buffer content with a keypress. In other words, I no longer have to open a terminal to ask a question about something I’m looking at, I can just edit the file to contain the question and then run the script on it.
- Instead of
sudo vi /etc/sysctl.conf
I’ve tried to get into the habit of opening the filesudo::/etc/sysctl.conf
in Emacs, which opens the file with sudo privileges.
Why would one want to do all these things? There are two main reasons:
- Integration
- Things running in Emacs are generally well integrated with each other, meaning transitioning between them and sharing context from one to the next is not very difficult. This is one of those things Vim users have not experienced, because they tend to open a new Vim session for everything they do, and it integrates with the rest of their environment mainly through reading and writing files.
- Hackability
- Emacs, being effectively a Lisp vm, is incredibly hacker-friendly. We can look up the source code to any function, wrap any function with additional code, replace parts of the system as it is running, debug it live, and so on. If there’s any part of Emacs that doesn’t quite work the way we want it to, we can mostly write some Lisp code and change it, with little interruption to the rest of our work.
The latter is rather important to me. I use it rarely, but when I do, I’m very grateful I can. I try to avoid my work being shaped by the environment around me; preferring instead to mold my environment in a way that encourages effective work.