Skip to content

Studium Emacs

· 7 min
Studium Emacs

In 2019, I started using DOOM emacs as my main emacs “distribution”. A decision which I figured I’d stick with for many years to come. In late 2023, I switched back to neovim for some time, and finally came back to the light early last year.

However, we all knew this day would come.

I have been bitten by the vanilla emacs bug, the call to craft my own lisp environment being too loud to ignore any longer. After some polishing work, I am content with introducing:

Studium Emacs.

The idea#

After building out a ~2200 line literate DOOM configuration, I felt it was time to declare emacs bankruptcy and move to a configuration in which I understood everything that was going on. I’m not going to talk badly about Doom emacs, I believe it is really good - and suggest people that are starting with emacs to use it if they’re coming from vim/neovim because they can immediately be productive. I also like the SPC leader key, and have adopted it for some of what I am doing, but I also think that vanilla keybinds are better in many respects (especially with a programmable keyboard). I also had been using evil mode pretty extensively for editing text, so modal editing is another aspect I stole for Studium Emacs.

With that being said, stock Emacs has come a long way since those days in 2018-19 which merited an emacs “distribution”.

Eglot is built in, use-package is a first class citizen, as is treesitter and various modes that were not present 5 years ago. In fact, this journey has surprised me in that so much is right there for you. Over the past ~6 months or so as I prepared to jump off the deep end, I had also been using the built in keybinds more and more, first with org-mode’s built ins, and then moving to more file management and generic keybinds, to the point that I would say navigationally, I use mostly emacs keys, and meow is a great addition to the standard emacs keybinds, falling back gracefully to native binds.

My main problem with DOOM is that is obfuscates much of the working system under helper macros and stuff that is now unnecessary with the release of Emacs 31 on the horizon.

I also want to know what is going on if this is the environment I go all in on for the rest of my natural computing life - for some time, I have thought emacs is the only argument for this endeavour. My goal is not to “go minimal” as is the pervasive meme in the emacs/unix world - but to reach feature parity with what I was previously doing in doom, and to do it in a way that is potentially lighter, all while understanding and becoming a builder not just some passive consumer.

The Architecture#

Studium is organized as a set of modular .el files within our /lisp/ directory, each responsible for a coherent (and, as much as possible, singular) domain. The init.el loads them in order at the end of the file, permitting ease of modularity. No magic; everything is right there. While I don’t think emacs load time is the end-all-be-all, I would like to aim for as quick a start-up time as possible. This is currently sub 1 second on all my machines (including my phone).

early-init.el#

Doom makes early init fairly opaque to the user, so it’s something that I really went deep on upon first seeing it in most vanilla configurations. I make sure the package system is disabled first, handing this off to elpaca (with use-package enabled), make sure garbage collection is properly setup, disable the UI that I have no use for (menu bar, scroll, etc.), and setup fonts.

init.el#

We do all the basic setup of user/authinfo, as well as elpaca bootstrap and defaults. We call all the lisp packages and create a modular methodology for import. I have systems that I only use org mode on (my typewriter x201 thinkpad for example) and I comment modules I don’t need out.

The packages#

Upon opening the repo, you will see in the /lisp directory these modules:

browser.el#

Sets default browser for opening links and integration with universal-launcher. I have been using EWW as my default browser for a few months and enjoying it immensely. I then push to ungoogled-chromium in the event I need a heavier browser.

completion.el#

Vertico/Marginalia/Orderless/Consult as well as Embark for actions. Corfu/Cape for completion in buffer.

dashboard.el#

Just a basic splash screen on emacs launch.

development.el#

Simple development settings including hideshow/hl-todo/envrc for direnv integration and agenix for nix secrets

dired-config.el#

Dired using Dirvish as a modern replacement for aesthetics and functionality.

editing.el#

Editing configuration with code folding, paren matching, and all the goodies. Grammars are contained in grammars.el

elfeed-config.el#

Elfeed configuration using elfeed-protocol to hook into the fever protocol for using miniflux as my feed reader.

elpher-config.el#

Elpher for gemini/gopher browsing

emms-config.el#

Music player settings. You will require MPD/MPC running on your machine to get all out of this. Supports album artwork/notifcations when song switches with notify-send.

erc-config.el#

IRC in emacs. What more need be said?

everywhere.el#

Emacs everywhere using thanos’ implementation for wayland.

evil-config.el#

I have replaced this with meow

flash-config.el#

Flash is a quick jump method for anywhere on screen. I have “f” bound in normal mode to jump anywhere, immediately initiating the search and providing a jump list. If only one candidate is present, automatically jump.

gnus-config.el#

GNUs for usenet usage.

grammars.el#

Treesit/eglot configuration for LSP support and editing in the various languages I work in/am exploring.

guix-config.el#

Adding guix support inside emacs, as I transition over to the endgame of distributions.

jabber-config.el#

XMPP inside emacs.

ledger-config.el#

Ledger for accounting in emacs.

llms.el#

LLMs inside emacs with gptel. No more web UIs.

magit-config.el#

Minor magit tweaks. Using stock keybinds mostly.

mail.el#

Email in emacs, using Mu4e.

markdown.el#

Markdown minor adjustment. We use org-mode mostly.

meow-setup.el#

This is where most keybinds live and configuration for meow for modal editing.

modeline.el#

Doom modeline as a nice status bar.

move-text-config.el#

Move text with move-text package.

org-config.el#

Extensive org-mode configuration with keys, templates for capture, etc.

org-roam-config.el#

roam configuration. Debating using Denote.

pass-config.el#

Password-store integration in emacs. I hit Alt-p globally for a password manager.

persist.el#

Persistence of buffers when emacs is closed/reopened.

reading.el#

PDF, nov.el additions and configuration.

spelling.el#

ispell/flyspell integrations.

tabs.el#

Tabs with centaur tabs and nerd-icons

test-runner.el#

test mode for programs.

tools.el#

Miscellaneous additions that didn’t merit files themselves.

tramp-config.el#

WIP - setting up tramp to play nicely for remote editing sessions.

vterm-config.el#

Vterm configuration as a popup buffer and defaults.

workspaces.el#

Workspaces with bufferlo as a replacement for persp.

writing.el#

Focused writing mode using olivetti, dictionary/thesaurus integration.

Custom Additions#

I have various custom lisp modules which I pulled over from DOOM, this is consistently expanding and evolving.

audio-record.el#

create-daily.el#

done-refile.el#

download-media.el#

elfeed-download.el#

gimp-tweet.el#

jb-0x0.el#

jb-clipboard-manager.el#

jitsi-meeting.el#

nm.el#

org-caldav-config.el#

pomodoro.el#

posse-twitter.el#

post-to-blog.el#

universal-launcher.el#

Themes#

I have brought in compline and lauds as my two main themes, running doom-themes as the engine for displaying them. I may eventually port them to vanilla configs, but I haven’t as of yet had the time. If anyone is running a vanilla version of compline/lauds, feel free to pull request the repository!

Snippets#

I have various snippets that I have built out over the years that I copied over from DOOM, yasnippet runs them, and I continually add them as I find useful ones.

Resources#

I am continually asked what the best resources for learning about emacs are. This is a non-exhaustive list:

Roadmap#

This is my own personal configuration for emacs, and as such is continually evolving as my understanding grows. Check back periodically for updates. I am open for pull requests or critiques if there are better ways to do things, I am in a state of perpetual learning with emacs, which is why I love it so.

As always, God bless, and until next time.

If you enjoyed this post, consider Supporting my work, Checking out my book, Working with me, or sending me an Email to tell me what you think..