My Emacs Workflow For Programming, Notetaking, and Much More

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.

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

Refractoring Tools with wgrep and substitute

My workflow for large text operations was completely copied from this irreal post. Basically the idea is this:

  1. Call grep/rgrep/consult-grep to get a list of every occurrence of the function name. If consult-grep, use embark to export to buffer.
  2. Call wgrep so that you can edit the rgrep output and have the results reflected in the original files.
  3. Call substitute or query-replace-regexp to change every instance of the function name at once.
  4. Quit wgrep, writing the changes back to the files.

TODO 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.

TODO File Management with dired

TODO Window Management

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 langs.

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.

I essentially use the same setup as Protesilaos that he describes in this part of his configuration.

TODO Git

TODO Writing

org-mode

denote

Editing extensions

Time Management and Scheduling

I presented at EmacsConf 2024 to talk about my student workflow for Emacs. You can view 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.

TODO RSS Feeds with elfeed

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.

TODO "Frivoulous" Items

Modus and Ef Themes

As I stated in my opinionated list of programs, I like to

Fontaine