My Emacs Workflow For Programming, Notetaking, and Much More

2024-05-22 Wed

Table of Contents

Tags: [Technology , Emacs]

Prefrace

I use Emacs everyday on all of my computers. It is my favorite program on my computer. I use it for school and personal use, and only on Linux. I have a separate configuration on my Emacs repository on the minimal branch that is lighter weight for my school computer.

🚩 A warning about this article 🚩

Although this article explains a most of what I do in Emacs, I am always finding new ways to do different things. I don't have just one color theme that I use (I try to stick to at least one per day). There are also many new things that I am learning when the need arises (e.g. how to use table calculations in org-mode). I can't possible document all of them, but I will try to show cool things on my YouTube channel.

General Packages

Editing Extensions

expand-region: This extension is really useful for selecting text. It's like a dwim solution for selecting text. You can repeatedly run the same key-sequence (I use C-=) and select a larger amount of text for every tool.

expand-region

tempel: This is a package for snippets. You can define text snippets in a lisp-like syntax. It's very conventient for quick snippets like this:

tempel snippets

Snippets with tempel

Snippets are a really helpful way of reducing time spent retyping the same things over and over again. I use snippets for common phrases and elisp functions that I type often.

I wrote an article about my favorite snippets here

TODO File Management with dired

Programming

Languages

Major Modes

Emacs comes with a lot of major modes, but not for languages like Haskell, Clojure, and Ada. I sometimes program with these, so I need to have them installed for auto completion and auto indentation.

Repls

Since I program in several lisp languages, I use repl-driven development. I use Cider, Sly, Geiser for my language repls.

  • Cider - Clojure
  • Sly - Common Lisp, always SBCL
  • Geiser - various scheme dialects. I mainly use Gauche repl but sometimes Racket

Here is a video that showcases how Sly works for Common Lisp.

Language Server (LSP)

Eglot just works, and it's built into Emacs. I mainly use it with clangd for C++. I don't really need it for other languages.

Completion

Completion in Emacs has always been a struggle for me. I only recently figured it out. At first I was like, I don't need it. Then I realized I wanted it and then I couldn't set it up. Then I gave up and said, "well I never needed you anyway". Finally, I figured it out and won't touch it for fear of it breaking.

TODO Git

Note taking, Time Management, and Scheduling

I presented at EmacsConf 2024 to talk about my student workflow for Emacs. You can view article about my presentation here. I show exactly how I use Emacs + Org mode as a student using demos and explanations.

Media

Multimedia with EMMS

I have written an article about how I use/setup EMMS here.

RSS Feeds with elfeed

I have written an article about how I use/setup Elfeed here.

IRC

Irc is pretty simple chat protocol. I don't use it very often, but it is important to at least know how to use it for open source project discussion.

Aesthetics

Modus and Ef Themes

Gruber Darker

Fontaine

Fontaine is a really simple package for font templates. You can see them in my emacs config.