I'm a third-year Computer Science and Mathematics student at Northeastern University interested in programming languages and developer tooling.
(λx.x x) (λx.x x)
Why I use Emacs
The joys of Emacs
I started using Emacs in the Spring 2023 semester, primarily while working on my compiler project for the compilers class I was enrolled in. Prior to that, I was daily-driving Neovim. I had briefly tried using Doom Emacs in 2022, but I didn’t particularly enjoy it. What had prevented me from transitioning to Emacs sooner was the uncertainty I had with Emacs Lisp — I found it intimidating to build my own configuration from vanilla Emacs.
You can find both my Emacs and Neovim configuration here.
I found Neovim pleasant to work with. The choice of Lua as a configuration language was somewhat nice compared to the VimScript DSL. It was convenient to operate purely in the terminal (although I did eventually use Neovide in my final months of using Neovim).
I switched to Emacs after briefly tinkering with a minimal config for several reasons. I enjoy Lisp languages, particularly Racket, and I found Emacs Lisp — despite its many flaws — to be quite nice to work with. I have gradually begun to believe that Lisps are the ideal application-configuration language. Before switching to Emacs, I was experimenting with Fennel for Neovim, the language that compiles to Lua. I also use EWW for my Linux status bar, configured with the Yuck programming language — a dialect of Lisp specifically for EWW.
It’s fun to spend an evening or two writing Emacs Lisp to enhance my experience. For instance, I wrote a function that downloaded a PDF from a given URL for viewing inside of Emacs. While it wasn’t essential, I do like using it to view resumes now.
I do have some gripes with Emacs Lisp, including the common complaint of dynamic scoping. I don’t think the semantics of
if make sense, with a implicit
progn for the else expression. I also would prefer if brackets and curly braces maintained the same semantics as parentheses, similar to Racket. This would allow for clearer code. Emacs Lisp, however, is overall enjoyable to use.
;; elisp (if nil "hello") "a" "b")) ; Returns "b" ;; Racket (if #f "hello" "world!" "-") ; This errors, as `if` only expects three expressions -- you would ; need to wrap the `else` expression in a `begin`. This is explicit ; and makes sense.
;; elisp (let ((a 0) (b 1) (c 2)) (+ a b c)) ;; Racket (let ([a 0] ; With brackets, it's more clear what expressions are part of [b 1] ; our introduced bindings. Indentation helps, but brackets [c 2]) ; make it more explicit. (+ a b c))
I also believe (graphical) Emacs to be incredibly more powerful than Neovim. It’s convenient to open PDFs in a buffer, read my emails, or organize my life with
org-mode. I also find that Emacs packages feel quite fleshed-out; the keybinds for major modes make sense. For example,
racket-mode is an incredibly powerful package that needs little configuring out of the box. I enjoy writing and running Racket with intuitive keybindings. Major modes and minor modes also feel like an appropriate distinguishment of packages. With Emacs Lisp, it’s easy to write my own functions that configure the editor the way that I like. For mathematics classes, I used to use Neovim with Zathura to display my PDF. I can now effectively substitute that setup with Emacs.
For whatever reason, I enjoy pressing the control key to navigate around my documents and lifting it to continue editing as normal. I enjoy the keypress combinations that start with
C-x. I can also find the commands I’m looking for with simply
Emacs is powerful as an editor, so much so that it isn’t just an editor anymore. I can use it for various tasks, and enjoy the convenience it provides. Emacs Lisp is also expressive and powerful as a configuration language, and I enjoy the flexibility it provides. I stuck with Neo/vim for around three years. I hope to stay with Emacs for even longer.