Why do I use emacs?

Philip Hartout

2020/11/18

Emacs is probably a hair-raising topic for a lot of people. All these configurations, shortcuts, and ultimately the danger of causing physical harm to yourself just by using a given software, probably prevent most people from adopting what I probably deem to be the tool that has fundamentally changed the way I look at computing. Although I will probably write on this topic in the future, I wanted to cover here important reasons why I use it, how I use it, and what I don’t do with emacs (and why the heresy of using another editor won’t last much longer). Please note that I do not want to take part in the infamous editor war; my intent with this blog post (and hopefully later ones as well) is to make clear why I chose Emacs over Vim.

How I got to know Emacs and why I started using it

Emacs is a cornerstone of the free software movement launched by Richard Stallman in the 1970s. Until very recently, I also saw it as such: some greatly written software pioneered by legends of computing, but not something that I would legitimately use daily - preferring Sublime text and VS Code most of the time. My first encounter with the Vim/Emacs ecosystem started when I pair-programmed with a friend of mine at a hospital software company. I was amazed by the speed at which bugs were resolved, the power of a terminal based text editor, and the fact that there is great benefit to never lifting your hands off the keyboard. But my first genuine encounter with emacs was when I worked with another friend on a project, when I witnessed the power of features like org-mode, together with all of the aforementioned features. This (and the fact that I was just done with my first ETH exam period) really made me want to do something else, so I started my config,

Template and design philosophy of my configuration

Although, in hindsight, it might have been good to learn some of the vim key bindings prior to learning emacs, which would probably have led me to choose a distribution of emacs with Vim key bindings, I started with psachin’s configuration, which my friend also happened to use, just in case I would run into problems.

I structure my configuration in such a way that it is clear what language or mode the configuration pertains to (e.g. myorgmode.org, python.org, etc) and that each file can be loaded and unloaded at will from a central ReadMe.org file in case something goes wrong in one of these .org files. I will soon share my dotfiles on my GitHub profile, once I have made sure no sensitive content appears in them.

Beyond my configuration, one important tweak I did to my computer is remapping my CapsLock key as a third control key, which has dramatically increased my quality of life in emacs and beyond. This has been suggested by many users as an essential step to take when starting to use emacs. While it takes some time to get used to it, making the switch definitely makes a big difference, and makes tab management in firefox, for instance, much easier.

What I do with emacs

Generally, anything that requires editing plain text file, such as writing code, documentation, a latex report, I do on emacs. I has great, programmable spelling checking programs and predictive typing packages, which I will delve a bit more into for each language in the future. I also read and reply to email using mu4e and mbsync, which can accomodate all of the email addresses I use, including gmail, ethz, uzh, and protonmail (using the protonmail bridge). The fabulous magit package also really boosted the use I get out of my git workflows as well, which I wholeheartedly recommend to any new emacs users.

What I don’t do with emacs

Probably the most important thing I do not do with emacs related to programming is python debugging, for which I found that PyCharm has a great interface. I found some options that I might try out in the future, but under time pressure, it really helps to have a reliable tool to use. There are some minor things for which I still use a more lightweight tool, such as editing files on a remote machine if I can’t use tramp-mode to get into them, or accessing some protected files. Even then, this list of specific use case will only get smaller over time as I learn to wield the power of emacs lisp.