Why use Emacs ?

Ulf HellströmUlf Hellström
5 min read

For many years, I primarily used vi or its variations, like vim and nvim, for the majority of my text editing tasks.

It wasn't until 3-4 years ago that I discovered org-mode in Emacs, which completely transformed my editing and programming experience. At the time, I was using Visual Studio Code when I came across an article about org-mode and Literate Programming.

The article explained how to use these tools for creating scientific documents, proving concepts, or sharing information with colleagues. This piqued my interest, and I knew I had to give it a try.

What particularly caught my attention was the fact that org-mode supported SQL and could connect directly to various databases.

Imagine not only including your SQL queries but also receiving the results directly within your document. Additionally, you could perform performance profiling on complex SQL queries, document your findings and results, and share them with a coworker who requested assistance.

Took me about 1-2 weeks of frustration before I had a working environment in Emacs that worked with me and my type of workflow.

Now, I live most of my working day inside Emacs, in a version called Doom Emacs. I also have the chance to write code in LISP which is one of my favorite programming languages of all time with emacs-lisp and have even programmed an emacs package to integrate one of Oracle's database utilities directly into Emacs.

Doom Emacs makes things so much easier to set up and the big plus is that it uses evil mode by default so coming from Vi(m) made the transition much easier.

So here are some reasons why you should consider using an editor/IDE that was developed in the mid-70s.

It's open-source.

No Microsoft spying on you enough said!

It's fast and handles large documents or large code files fine.

Yes, for me, it is faster and provides a more efficient workflow compared to Visual Studio Code. Some tips involve maintaining a clean personal configuration file. Additionally, if you run Emacs on Linux or Mac, you can initiate the Emacs binary as a server and launch the Emacs IDE as a client. This significantly reduces the startup time of the Emacs IDE to a split second, as the heavy lifting is done during the startup of your laptop or desktop.

It's Vi on steroids.

Doom Emacs boasts excellent Vim keybindings.

In contrast to Visual Studio Code, the Vim keybindings plugin is not sluggish; it feels as swift as native Vim. Additionally, these keybindings function universally, including in the terminal, while opening files, during search and replace, and in many other scenarios.

LSP-mode (Language Support Protocol mode).

The built-in LSP mode makes using Emacs as a fast IDE for programming a breeze. I use it for Python, C, SQL, Julia, and LISP programming, encompassing all the features I can imagine, such as linters, syntax checking, and code completion.

ORG-mode.

This was what prompted me to switch to Emacs. The documentation describes ORG-mode as:

"A GNU Emacs major mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more — in a fast and effective plain-text system."

I use ORG mode for various purposes, such as creating notebooks for documenting code examples and their results, as well as for numerous other tasks like presentations, journaling and more.

One of the most powerful aspects for me is the ability to write anything I want in pure text mode and then export it in any format I need. Most of the time, I export my org documents to PDF, ODT (Open Document Format), and HTML.

Another outstanding feature of org-mode is its agendas and to-do lists, which I utilize extensively.

There are many other ways you can utilize org-mode to aid you. I wrote a snippet of Emacs Lisp code that enables me to select a CSV file and effortlessly convert it into an org table. I can then export the org table to formats such as an HTML table, Excel sheet, or any other format I need for storage. Your imagination is the only limit to what you can achieve with some tinkering.

Keep your work in sync.

Numerous products enable you to synchronize your text across your devices. As Emacs stores all your documents in text format, it is effortless to keep your work in sync using whichever method suits you best.

I use a private Git repository to store all my org documents. Emacs has excellent support for Git with "Magit" (another great package for Emacs). I prefer to handle all my Git tasks within Emacs using "Magit" since it eliminates the need to switch to a terminal or another program. I simply navigate to the Git repo, invoke "Magit," and begin stashing, pulling, committing, and pushing.

So much more.

I just scraped the surface. But here are some other things that are good with Emacs.

Superior searching in documents.

Spell checking.

Terminal emulation. I prefer vterm that are superior to the terminal in VSC.

File management (Another great package called "dired")

Journaling and notes to keep track of life and work. I use a package called "denote" for generating small notes etc.

If you invest some time in learning "emacs-lisp," you can tailor Emacs to suit your needs. However, even if you don't, the community is fantastic, and there are numerous places where you can find code or ready-made packages to explore, modify, and adapt Emacs to your preferences. You can even play games within Emacs, and I've heard rumors about people using it as a window manager, logging directly into Emacs when booting and logging into their computers.

Over & out...

0
Subscribe to my newsletter

Read articles from Ulf Hellström directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ulf Hellström
Ulf Hellström

I've been using and developing on the Oracle platform since 1989. Now I call my self a Database Engineer and my focus areas are low-code (mainly Oracle APEX), machine-learning, architecture , performance tuning, sql and pl/sql. Beside Oracle I have a long expierence of Linux and all that comes with it like scripting, installation , hardware etc. Beside Oracle i do allot of programming since that what i'm passionate about. Programming languages I use frequently are python, Julia, C and LISP. On my spare time I do some simracing , bicycling, photography and playing games on Nintendo Swift and PC. This is my personal blog where I will write mainly about things that are interesting in the modern technology world so expect a variety of topics.