Table of Contents
- UI and basic configuration
- Org mode
- Start Emacs server
This is my literate Emacs configuration, written in org-mode and exported with ox-jekyll-md. You can see the raw, un-exported version on my emacs.d GitHub repo. Take a look at init.el there, which is first read by Emacs and does some basic bootstrapping, setting up package archives and
use-package, and then calls
emacs.org, the unexported version of this file, which pulls all the Emacs Lisp source blocks from this file, stitches them into an Emacs Lisp file called
emacs.el, and executes it.
This is my third or fourth Emacs configuration. I was a vim user but started using Emacs in grad school, some time around 2015 I think, when I discovered org-mode. I started out using Spacemacs then, but quickly got overwhelmed by how much stuff there was in it and moved to vanilla Emacs. Here is my last vanilla Emacs config, which probably grew out of that move. In the summer of 2019 I switched to doom-emacs and loved it — most of the defaults were sane and I felt like it showed the power and extensibility of Emacs without overwhelming me by forcing me to do things its way, like Spacemacs did.
I decided to roll my own config again because I started having to fight Doom Emacs defaults to make things work the way I wanted, and with each update of Doom there’d be more changes I’d have to make to my
config.el to keep my config working. Doom had introduced me to some new Emacs programs that I loved, like Magit and Ivy, but had a lot of features I didn’t use. Doom, as a project, has to target everyone — I just need a config that works for me.
This config is an active work in progress, and this web page is a living document of it. Eventually I’d like to set up a hook to export the web page whenever I push changes to
emacs.org, but right now it is generated by manually running C-c C-e P p to export the project (see Publishing), so it may not always be up to date.
UI and basic configuration
Disable blinking cursors and scroll bars and tool bars and menus, show line numbers:
Stop cluttering working directories with back up files and save them to
/tmp/. Everything is under version control anyway, right?
Org agenda files are saved
Configure TODO keywords:
Add a timestamp when you close a task:
Soft-wrap lines, and don’t do it mid-word.
Use indentation, not extra \*s for headings.
Don’t let org edit things under collapsed headings.
By default Babel will only allow you to execute
emacs-lisp source code blocks. You can enable Babel to allow execution of code blocks in a bunch of different languages though — a full list is here: https://orgmode.org/manual/Languages.html#Languages
This sets up Jekyll markdown export for my blog. See this post on orgmode.org.
Make it so if you have split windows, both with dired buffers, and you perform a rename or copy action on an item in one dired buffer, its default target is the other dired buffer.
.latex files as… LaTeX.
I had issues with syntax highlighting and identation breaking using
enh-ruby-mode, so I’m back to just plain
flymake-ruby for syntax checking.
irb in a buffer.
rubocop is a linter.
Start Emacs server
These are sources I’ve used to build my emacs configuration:
- My old emacs config: https://github.com/kylerjohnston/dot-files/blob/971496d42a1b7c65f28114442a5742a561b1e4f2/emacs/.emacs.d/init.el
- My doom config: https://github.com/kylerjohnston/ansible/blob/186986a6aa58bfc14f55a69c34554605c3a7178d/roles/graphical/files/config.el